Class VariableInstanceEntity

    • Field Detail

      • id

        protected java.lang.String id
      • revision

        protected int revision
      • name

        protected java.lang.String name
      • processDefinitionId

        protected java.lang.String processDefinitionId
      • processInstanceId

        protected java.lang.String processInstanceId
      • executionId

        protected java.lang.String executionId
      • taskId

        protected java.lang.String taskId
      • batchId

        protected java.lang.String batchId
      • caseInstanceId

        protected java.lang.String caseInstanceId
      • caseExecutionId

        protected java.lang.String caseExecutionId
      • activityInstanceId

        protected java.lang.String activityInstanceId
      • tenantId

        protected java.lang.String tenantId
      • longValue

        protected java.lang.Long longValue
      • doubleValue

        protected java.lang.Double doubleValue
      • textValue

        protected java.lang.String textValue
      • textValue2

        protected java.lang.String textValue2
      • variableScopeId

        protected java.lang.String variableScopeId
      • configuration

        protected java.lang.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​(java.lang.String name,
                                      TypedValue value,
                                      boolean isTransient)
    • Method Detail

      • delete

        public void delete()
      • getPersistentState

        public java.lang.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​(java.lang.String processInstanceId)
      • setProcessDefinitionId

        public void setProcessDefinitionId​(java.lang.String processDefinitionId)
      • setExecutionId

        public void setExecutionId​(java.lang.String executionId)
      • setCaseInstanceId

        public void setCaseInstanceId​(java.lang.String caseInstanceId)
      • setCaseExecutionId

        public void setCaseExecutionId​(java.lang.String caseExecutionId)
      • getByteArrayValueId

        public java.lang.String getByteArrayValueId()
      • setByteArrayValueId

        public void setByteArrayValueId​(java.lang.String byteArrayValueId)
      • deleteByteArrayValue

        protected void deleteByteArrayValue()
      • getValue

        public java.lang.Object getValue()
        Description copied from interface: VariableInstance
        Returns the value of this variable instance.
        Specified by:
        getValue in interface VariableInstance
      • isObjectTyped

        protected boolean isObjectTyped​(ValueType newType,
                                        java.lang.String oldTypeAsString)
        The engine should only remove byte arrays in case the type changes but keep it when old and new types are object.
        Parameters:
        newType - of the variable overriding the old.
        oldTypeAsString - of the variable previously set.
        Returns:
        true if old and new variable are both object typed.
      • clearValueFields

        public void clearValueFields​(boolean deleteVariable)
      • getTypeName

        public java.lang.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()
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface DbEntity
        Specified by:
        getId in interface VariableInstance
        Returns:
        the Id of this variable instance
      • setId

        public void setId​(java.lang.String id)
        Specified by:
        setId in interface DbEntity
      • setLongValue

        public void setLongValue​(java.lang.Long longValue)
        Specified by:
        setLongValue in interface ValueFields
      • setDoubleValue

        public void setDoubleValue​(java.lang.Double doubleValue)
        Specified by:
        setDoubleValue in interface ValueFields
      • setName

        public void setName​(java.lang.String name)
      • setTextValue

        public void setTextValue​(java.lang.String textValue)
        Specified by:
        setTextValue in interface ValueFields
      • setSerializerName

        public void setSerializerName​(java.lang.String type)
      • setTextValue2

        public void setTextValue2​(java.lang.String textValue2)
        Specified by:
        setTextValue2 in interface ValueFields
      • setTaskId

        public void setTaskId​(java.lang.String taskId)
      • setBatchId

        public void setBatchId​(java.lang.String batchId)
      • setTask

        public void setTask​(TaskEntity task)
      • setActivityInstanceId

        public void setActivityInstanceId​(java.lang.String activityInstanceId)
      • getSerializerName

        public java.lang.String getSerializerName()
      • getErrorMessage

        public java.lang.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 java.lang.String getVariableScopeId()
      • setVariableScopeId

        public void setVariableScopeId​(java.lang.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)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.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 java.lang.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​(java.lang.String tenantId)
      • getReferencedEntityIds

        public java.util.Set<java.lang.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 java.util.Map<java.lang.String,​java.lang.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.