Class ADEPT2EBPReference

java.lang.Object
de.aristaflow.adept2.model.common.defaultimplementation.DefaultUserAttributeContainer
de.aristaflow.adept2.model.common.defaultimplementation.SerialisableUserAttributeContainer
de.aristaflow.adept2.model.worklistmodel.ADEPT2EBPReference
All Implemented Interfaces:
PropertyTracker, UserAttributeContainer, EBPInstanceReference, ActivityReference, Adept2EbpRefProperties, Serializable
Direct Known Subclasses:
ADEPT2ActivityReference, LWPActivityReference

public abstract class ADEPT2EBPReference extends de.aristaflow.adept2.model.common.defaultimplementation.SerialisableUserAttributeContainer implements EBPInstanceReference, ActivityReference, Adept2EbpRefProperties
The default implementation of an activity reference. This class intended to be extended for every system which uses the ADEPT2 worklist manager (e.g. ADEPT2 itself, ADEPT2ActivityReference)
See Also:
  • Field Details

  • Constructor Details

    • ADEPT2EBPReference

      public ADEPT2EBPReference(EBPType type, UUID instanceId, UUID instanceLogId, UUID baseTemplateId, int nodeId, int iteration, URI[] executionManagerUris, URI[] runtimeManagerUris, ExecutionControlProperties executionControlProperties, String activityReferenceType, Map<String,String> userAttributes)
      Creates a new activity reference object for ADEPT2-EBPs.
      Parameters:
      type - The type of the activity reference.
      instanceId - The ID of the ADEPT2 process instance.
      instanceLogId - The log ID of the ADEPT2 process instance.
      baseTemplateId - The ID of the instance's base template.
      nodeId - The ID of the corresponding node.
      iteration - The current iteration of the node.
      executionManagerUris - The URI of the execution manager responsible for the corresponding process instance.
      runtimeManagerUris - The URI of the RuntimeManager used for executing the referenced EBP-Instance or null in case it is yet unknown.
      executionControlProperties - The execution control properties as defined for the corresponding ExecutableBusinessProcessInstance.
      activityReferenceType - The type of the reference (activity or LWP).
      userAttributes - The user attributes of this reference.
    • ADEPT2EBPReference

      public ADEPT2EBPReference(EBPType type, UUID instanceId, UUID instanceLogId, UUID baseTemplateId, int nodeId, int iteration, URI[] executionManagerUris, ExecutionControlProperties executionControlProperties, String activityReferenceType, Map<String,String> userAttributes)
      Creates a new activity reference object for ADEPT2-EBPs with no runtime manager set.
      Parameters:
      type - The type of the activity reference.
      instanceId - The ID of the ADEPT2 process instance.
      instanceLogId - The log ID of the ADEPT2 process instance.
      baseTemplateId - The ID of the instance's base template.
      nodeId - The ID of the corresponding node.
      iteration - The current iteration of the node.
      executionManagerUris - The URI of the execution manager responsible for the corresponding process instance.
      executionControlProperties - The execution control properties as defined for the corresponding ExecutableBusinessProcessInstance.
      activityReferenceType - The type of the reference (activity or LWP).
      userAttributes - The user attributes of this reference.
    • ADEPT2EBPReference

      public ADEPT2EBPReference(EBPInstanceReference ebpIR, ExecutableBusinessProcessInstance ebpInstance, String activityReferenceType, Map<String,String> userAttributes)
      Creates a new activity reference object for ADEPT2-EBPs based on the designated EBP-Instance-Reference.
      Parameters:
      ebpIR - The reference to the corresponding EBP containing all information on identifying the EBP in the process context, for instance, instance ID, node ID and node iteration.
      ebpInstance - The corresponding EBP-instance containing the activity type ID and the execution control properties.
      activityReferenceType - The type of the reference (activity or LWP).
      userAttributes - The user attributes of this reference.
  • Method Details

    • getActivityReferenceType

      public String getActivityReferenceType()
      Description copied from interface: ActivityReference
      Returns the type of the activity, e.g. "de.aristaflow.ADEPT2ActivityReference".
      Specified by:
      getActivityReferenceType in interface ActivityReference
      Returns:
      The type of the activity.
    • getNodeIteration

      public int getNodeIteration()
      Description copied from interface: EBPInstanceReference
      Returns the iteration count of the node this EBPInstanceReference references.
      Specified by:
      getNodeIteration in interface EBPInstanceReference
      Returns:
      The iteration count of the node.
    • getNodeID

      public int getNodeID()
      Description copied from interface: EBPInstanceReference
      Returns the ID of the node of the process graph which contains the activity or which houses the sub-process. In case of a reference for a top-level instance, this will be Integer.MIN_VALUE.
      Specified by:
      getNodeID in interface EBPInstanceReference
      Returns:
      The ID of the process node containing the activity or sub-process.
    • getInstanceID

      public UUID getInstanceID()
      Description copied from interface: EBPInstanceReference
      Returns the ID of the process instance the activity belongs to, the corresponding super-process instance or the instance itself in case of a reference to a top-level instance.
      Specified by:
      getInstanceID in interface EBPInstanceReference
      Returns:
      The ID of the corresponding process instance.
    • getInstanceLogId

      public UUID getInstanceLogId()
      Description copied from interface: EBPInstanceReference
      Gets the stable ID of the instance referred to by EBPInstanceReference.getInstanceID().
      Specified by:
      getInstanceLogId in interface EBPInstanceReference
      Returns:
      The stable ID of the corresponding process instance.
    • getBaseTemplateID

      public UUID getBaseTemplateID()
      Description copied from interface: EBPInstanceReference
      Gets the ID of the unmodified template of the corresponding process instance.
      Specified by:
      getBaseTemplateID in interface EBPInstanceReference
      Returns:
      The ID of the unmodified template of the corresponding process instance.
    • getType

      public EBPType getType()
      Description copied from interface: EBPInstanceReference
      Gets the type of the executable business process, for instance an activity or a subprocess.
      Specified by:
      getType in interface EBPInstanceReference
      Returns:
      The type of the executable business process, for instance an activity or a subprocess.
    • getExecutionManagerURIs

      public URI[] getExecutionManagerURIs()
      Description copied from interface: EBPInstanceReference
      Returns the communication protocol depended URIs of the execution manager which executes the referenced EBP-instance.
      Specified by:
      getExecutionManagerURIs in interface EBPInstanceReference
      Returns:
      The URIs of the execution manager responsible for the referenced EBP-instance.
    • getRuntimeManagerURIs

      public URI[] getRuntimeManagerURIs()
      Description copied from interface: EBPInstanceReference
      Returns the communication protocol depended URIs of the runtime manager instance which is used for executing the referenced EBP-instance. This reference is only valid after the EBP-instance has been started. Before this method will return null.
      These URIs have to be set by the worklist when starting the corresponding entry.
      Specified by:
      getRuntimeManagerURIs in interface EBPInstanceReference
      Returns:
      The communication protocol depended URIs of the runtime manager responsible for starting the referenced EBP-Instance or null if the EBP-Instance has not been started yet.
    • setRuntimeManagerURIs

      public void setRuntimeManagerURIs(URI[] runtimeManagerURI)
      Description copied from interface: EBPInstanceReference
      Sets the communication protocol depended URIs of the RuntimeManager which is used for executing the referenced EBP-instance.

      Note: This method should only be called from the worklist (e.g. on the client side).

      Specified by:
      setRuntimeManagerURIs in interface EBPInstanceReference
      Parameters:
      runtimeManagerURI - the URIs assigned to the appropriate RuntimeManager instance.
    • getExecutionControlProperties

      public ExecutionControlProperties getExecutionControlProperties()
      Returns the execution control properties that reflect the abilities of the executable business process instance of this worklist item.
      Returns:
      The execution control properties of the EBP instance of this worklist item.
    • getExecutableComponentName

      public abstract String getExecutableComponentName()
      Gets the name of the executable component of the underlying activity in case this is an activity. Otherwise null will be returned.
      Returns:
      The name of the executable component of the underlying activity if this is an activity, otherwise null.
    • getGUIContextID

      public abstract String getGUIContextID()
      Gets the ID of the GUIContext the referenced activity/EBP needs. This allows the user to differentiate whether the worklist item can be executed on the current client. In case of a lightweight process, GUIConstants.NULL_CONTEXT will be returned.
      Returns:
      The ID of the GUIContext the referenced activity/EBP needs.
      See Also:
    • equals

      public boolean equals(Object otherObject)
      Description copied from interface: EBPInstanceReference
      EBPInstanceReferences are equal in case they reference the same executable business process, therefore Object.equals(Object) and Object.hashCode() have to be overridden.
      Specified by:
      equals in interface EBPInstanceReference
      Overrides:
      equals in class Object
      Parameters:
      otherObject - An instance of another object to compare this EBPInstanceReference with.
      Returns:
      True, if this instance references the same instance of an executable business process as the designated object.
      See Also:
    • hashCode

      public int hashCode()
      Description copied from interface: EBPInstanceReference
      EBPInstanceReferences are equal in case they reference the same executable business process, therefore Object.equals(Object) and Object.hashCode() have to be overridden.
      Specified by:
      hashCode in interface EBPInstanceReference
      Overrides:
      hashCode in class Object
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getChangedProperties

      public Set<ChangedProperty<? extends Serializable>> getChangedProperties(boolean reset)
      Description copied from interface: PropertyTracker
      Gets all (types of) properties that have been changed since creation of the corresponding/implementing object or last resetting of the change tracking and resets the tracking afterwards if appropriate.
      The returned set is always a snapshot of the current state.
      Specified by:
      getChangedProperties in interface PropertyTracker
      Parameters:
      reset - Whether to clear the changes.
      Returns:
      All (types of) properties that have been changed since creation of this item or resetting the tracking and resets the tracking afterwards if appropriate.