Class VariableInstanceEntity

    • Field Detail

      • revision

        protected int revision
      • processDefinitionId

        protected String processDefinitionId
      • processInstanceId

        protected String processInstanceId
      • executionId

        protected String executionId
      • taskId

        protected String taskId
      • batchId

        protected String batchId
      • caseInstanceId

        protected String caseInstanceId
      • caseExecutionId

        protected String caseExecutionId
      • activityInstanceId

        protected String activityInstanceId
      • tenantId

        protected String tenantId
      • longValue

        protected Long longValue
      • doubleValue

        protected Double doubleValue
      • textValue

        protected String textValue
      • textValue2

        protected String textValue2
      • variableScopeId

        protected String variableScopeId
      • configuration

        protected String configuration
      • sequenceCounter

        protected long sequenceCounter
      • isConcurrentLocal

        protected boolean isConcurrentLocal

        Determines whether this variable is supposed to be a local variable in case of concurrency in its scope. This affects

        • tree expansion (not evaluated yet by the engine)
        • activity instance IDs of variable instances: concurrentLocal variables always receive the activity instance id of their execution (which may not be the scope execution), while non-concurrentLocal variables always receive the activity instance id of their scope (which is set in the parent execution)

        In the future, this field could be used for restoring the variable distribution when the tree is expanded/compacted multiple times. On expansion, the goal would be to keep concurrentLocal variables always with their concurrent replacing executions while non-concurrentLocal variables stay in the scope execution

      • isTransient

        protected boolean isTransient
        Determines whether this variable is stored in the data base.
    • Constructor Detail

      • VariableInstanceEntity

        public VariableInstanceEntity()
      • VariableInstanceEntity

        public VariableInstanceEntity​(String name,
                                      org.camunda.bpm.engine.variable.value.TypedValue value,
                                      boolean isTransient)
    • Method Detail

      • createAndInsert

        public static VariableInstanceEntity createAndInsert​(String name,
                                                             org.camunda.bpm.engine.variable.value.TypedValue value)
      • create

        public static VariableInstanceEntity create​(String name,
                                                    org.camunda.bpm.engine.variable.value.TypedValue value,
                                                    boolean isTransient)
      • delete

        public void delete()
      • getPersistentState

        public Object getPersistentState()
        Description copied from interface: DbEntity
        Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.
        Specified by:
        getPersistentState in interface DbEntity
      • setProcessInstanceId

        public void setProcessInstanceId​(String processInstanceId)
      • setProcessDefinitionId

        public void setProcessDefinitionId​(String processDefinitionId)
      • setExecutionId

        public void setExecutionId​(String executionId)
      • setCaseInstanceId

        public void setCaseInstanceId​(String caseInstanceId)
      • setCaseExecutionId

        public void setCaseExecutionId​(String caseExecutionId)
      • getByteArrayValueId

        public String getByteArrayValueId()
      • setByteArrayValueId

        public void setByteArrayValueId​(String byteArrayValueId)
      • deleteByteArrayValue

        protected void deleteByteArrayValue()
      • getTypedValue

        public org.camunda.bpm.engine.variable.value.TypedValue getTypedValue()
        Description copied from interface: VariableInstance
        Returns the TypedValue of this variable instance.
        Specified by:
        getTypedValue in interface VariableInstance
      • getTypedValue

        public org.camunda.bpm.engine.variable.value.TypedValue getTypedValue​(boolean deserializeValue)
        Specified by:
        getTypedValue in interface CoreVariableInstance
      • setValue

        public void setValue​(org.camunda.bpm.engine.variable.value.TypedValue value)
        Specified by:
        setValue in interface CoreVariableInstance
      • clearValueFields

        public void clearValueFields()
      • getTypeName

        public String getTypeName()
        Description copied from interface: VariableInstance
        Returns the name of the type of this variable instance
        Specified by:
        getTypeName in interface VariableInstance
        Returns:
        the type name of the variable
      • ensureExecutionInitialized

        protected void ensureExecutionInitialized()
      • setName

        public void setName​(String name)
      • setSerializerName

        public void setSerializerName​(String type)
      • setTaskId

        public void setTaskId​(String taskId)
      • setBatchId

        public void setBatchId​(String batchId)
      • setTask

        public void setTask​(TaskEntity task)
      • setActivityInstanceId

        public void setActivityInstanceId​(String activityInstanceId)
      • getSerializerName

        public String getSerializerName()
      • getErrorMessage

        public String getErrorMessage()
        Description copied from interface: VariableInstance
        If the variable value could not be loaded, this returns the error message.
        Specified by:
        getErrorMessage in interface VariableInstance
        Returns:
        an error message indicating why the variable value could not be loaded.
      • getVariableScopeId

        public String getVariableScopeId()
      • setVariableScopeId

        public void setVariableScopeId​(String variableScopeId)
      • getSequenceCounter

        public long getSequenceCounter()
      • setSequenceCounter

        public void setSequenceCounter​(long sequenceCounter)
      • incrementSequenceCounter

        public void incrementSequenceCounter()
      • isConcurrentLocal

        public boolean isConcurrentLocal()
      • setConcurrentLocal

        public void setConcurrentLocal​(boolean isConcurrentLocal)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • setTransient

        public void setTransient​(boolean isTransient)
        Parameters:
        isTransient - true, if the variable is not stored in the data base. Default is false.
      • isTransient

        public boolean isTransient()
        Returns:
        true, if the variable is transient. A transient variable is not stored in the data base.
      • getTenantId

        public String getTenantId()
        Description copied from interface: VariableInstance
        The id of the tenant this variable belongs to. Can be null if the variable belongs to no single tenant.
        Specified by:
        getTenantId in interface VariableInstance
      • setTenantId

        public void setTenantId​(String tenantId)
      • getReferencedEntityIds

        public Set<String> getReferencedEntityIds()
        Description copied from interface: HasDbReferences

        Scope: IN-MEMORY references

        Specified by:
        getReferencedEntityIds in interface HasDbReferences
        Returns:
        the ids of the entities that this entity references. Should only return ids for entities of the same type
      • getReferencedEntitiesIdAndClass

        public Map<String,​Class> getReferencedEntitiesIdAndClass()
        Description copied from interface: HasDbReferences

        Scope: IN-MEMORY references

        Specified by:
        getReferencedEntitiesIdAndClass in interface HasDbReferences
        Returns:
        a map of the ids and the entities' classes that this entity references. It's used when trying to determine if there was an Optimistic Locking occurrence on an INSERT or UPDATE of an object of this type.