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 Summary
FieldsModifier and TypeFieldDescriptionprotected Set<ChangedProperty<? extends Serializable>>Change tracker for worklist item, cf.protected ReadWriteLockLock for accessing all data structures.Fields inherited from interface de.aristaflow.adept2.model.worklistmodel.Adept2EbpRefProperties
RUNTIME_MANAGER_URIS -
Constructor Summary
ConstructorsConstructorDescriptionADEPT2EBPReference(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.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.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. -
Method Summary
Modifier and TypeMethodDescriptionbooleanEBPInstanceReferences are equal in case they reference the same executable business process, thereforeObject.equals(Object)andObject.hashCode()have to be overridden.Returns the type of the activity, e.g.Gets the ID of the unmodified template of the corresponding process instance.Set<ChangedProperty<? extends Serializable>>getChangedProperties(boolean reset) 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.abstract StringGets the name of the executable component of the underlying activity in case this isan activity.Returns the execution control properties that reflect the abilities of the executable business process instance of this worklist item.URI[]Returns the communication protocol depended URIs of the execution manager which executes the referenced EBP-instance.abstract StringGets the ID of theGUIContextthe referenced activity/EBP needs.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.Gets the stable ID of the instance referred to byEBPInstanceReference.getInstanceID().intReturns the ID of the node of the process graph which contains the activity or which houses the sub-process.intReturns the iteration count of the node thisEBPInstanceReferencereferences.URI[]Returns the communication protocol depended URIs of the runtime manager instance which is used for executing the referenced EBP-instance.getType()Gets the type of the executable business process, for instance an activity or a subprocess.inthashCode()EBPInstanceReferences are equal in case they reference the same executable business process, thereforeObject.equals(Object)andObject.hashCode()have to be overridden.voidsetRuntimeManagerURIs(URI[] runtimeManagerURI) Sets the communication protocol depended URIs of theRuntimeManagerwhich is used for executing the referenced EBP-instance.toString()Methods inherited from class de.aristaflow.adept2.model.common.defaultimplementation.DefaultUserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributes, setUserAttributeValue, subEquals, subHashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.aristaflow.adept2.model.common.UserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValue
-
Field Details
-
lock
Lock for accessing all data structures. -
changedProperties
Change tracker for worklist item, cf.Adept2EbpRefProperties.
-
-
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 theRuntimeManagerused for executing the referenced EBP-Instance or null in case it is yet unknown.executionControlProperties- The execution control properties as defined for the correspondingExecutableBusinessProcessInstance.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 correspondingExecutableBusinessProcessInstance.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
Description copied from interface:ActivityReferenceReturns the type of the activity, e.g. "de.aristaflow.ADEPT2ActivityReference".- Specified by:
getActivityReferenceTypein interfaceActivityReference- Returns:
- The type of the activity.
-
getNodeIteration
public int getNodeIteration()Description copied from interface:EBPInstanceReferenceReturns the iteration count of the node thisEBPInstanceReferencereferences.- Specified by:
getNodeIterationin interfaceEBPInstanceReference- Returns:
- The iteration count of the node.
-
getNodeID
public int getNodeID()Description copied from interface:EBPInstanceReferenceReturns 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 beInteger.MIN_VALUE.- Specified by:
getNodeIDin interfaceEBPInstanceReference- Returns:
- The ID of the process node containing the activity or sub-process.
-
getInstanceID
Description copied from interface:EBPInstanceReferenceReturns 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:
getInstanceIDin interfaceEBPInstanceReference- Returns:
- The ID of the corresponding process instance.
-
getInstanceLogId
Description copied from interface:EBPInstanceReferenceGets the stable ID of the instance referred to byEBPInstanceReference.getInstanceID().- Specified by:
getInstanceLogIdin interfaceEBPInstanceReference- Returns:
- The stable ID of the corresponding process instance.
-
getBaseTemplateID
Description copied from interface:EBPInstanceReferenceGets the ID of the unmodified template of the corresponding process instance.- Specified by:
getBaseTemplateIDin interfaceEBPInstanceReference- Returns:
- The ID of the unmodified template of the corresponding process instance.
-
getType
Description copied from interface:EBPInstanceReferenceGets the type of the executable business process, for instance an activity or a subprocess.- Specified by:
getTypein interfaceEBPInstanceReference- Returns:
- The type of the executable business process, for instance an activity or a subprocess.
-
getExecutionManagerURIs
Description copied from interface:EBPInstanceReferenceReturns the communication protocol depended URIs of the execution manager which executes the referenced EBP-instance.- Specified by:
getExecutionManagerURIsin interfaceEBPInstanceReference- Returns:
- The URIs of the execution manager responsible for the referenced EBP-instance.
-
getRuntimeManagerURIs
Description copied from interface:EBPInstanceReferenceReturns 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:
getRuntimeManagerURIsin interfaceEBPInstanceReference- Returns:
- The communication protocol depended URIs of the runtime manager
responsible for starting the referenced EBP-Instance or
nullif the EBP-Instance has not been started yet.
-
setRuntimeManagerURIs
Description copied from interface:EBPInstanceReferenceSets the communication protocol depended URIs of theRuntimeManagerwhich 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:
setRuntimeManagerURIsin interfaceEBPInstanceReference- Parameters:
runtimeManagerURI- the URIs assigned to the appropriateRuntimeManagerinstance.
-
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
Gets the name of the executable component of the underlying activity in case this isan activity. Otherwisenullwill be returned.- Returns:
- The name of the executable component of the underlying activity if
this is
an activity, otherwisenull.
-
getGUIContextID
Gets the ID of theGUIContextthe 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_CONTEXTwill be returned.- Returns:
- The ID of the
GUIContextthe referenced activity/EBP needs. - See Also:
-
equals
Description copied from interface:EBPInstanceReferenceEBPInstanceReferences are equal in case they reference the same executable business process, thereforeObject.equals(Object)andObject.hashCode()have to be overridden.- Specified by:
equalsin interfaceEBPInstanceReference- Overrides:
equalsin classObject- Parameters:
otherObject- An instance of another object to compare thisEBPInstanceReferencewith.- 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:EBPInstanceReferenceEBPInstanceReferences are equal in case they reference the same executable business process, thereforeObject.equals(Object)andObject.hashCode()have to be overridden.- Specified by:
hashCodein interfaceEBPInstanceReference- Overrides:
hashCodein classObject- See Also:
-
toString
-
getChangedProperties
Description copied from interface:PropertyTrackerGets 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:
getChangedPropertiesin interfacePropertyTracker- 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.
-