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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<ChangedProperty<? extends Serializable>>
changedProperties
Change tracker for worklist item, cf.protected ReadWriteLock
lock
Lock for accessing all data structures.-
Fields inherited from interface de.aristaflow.adept2.model.worklistmodel.Adept2EbpRefProperties
RUNTIME_MANAGER_URIS
-
-
Constructor Summary
Constructors Constructor Description 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.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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object otherObject)
EBPInstanceReference
s are equal in case they reference the same executable business process, thereforeObject.equals(Object)
andObject.hashCode()
have to be overridden.String
getActivityReferenceType()
Returns the type of the activity, e.g.UUID
getBaseTemplateID()
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 String
getExecutableComponentName()
Gets the name of the executable component of the underlying activity in case this isan activity
.ExecutionControlProperties
getExecutionControlProperties()
Returns the execution control properties that reflect the abilities of the executable business process instance of this worklist item.URI[]
getExecutionManagerURIs()
Returns the communication protocol depended URIs of the execution manager which executes the referenced EBP-instance.abstract String
getGUIContextID()
Gets the ID of theGUIContext
the referenced activity/EBP needs.UUID
getInstanceID()
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.UUID
getInstanceLogId()
Gets the stable ID of the instance referred to byEBPInstanceReference.getInstanceID()
.int
getNodeID()
Returns the ID of the node of the process graph which contains the activity or which houses the sub-process.int
getNodeIteration()
Returns the iteration count of the node thisEBPInstanceReference
references.URI[]
getRuntimeManagerURIs()
Returns the communication protocol depended URIs of the runtime manager instance which is used for executing the referenced EBP-instance.EBPType
getType()
Gets the type of the executable business process, for instance an activity or a subprocess.int
hashCode()
EBPInstanceReference
s are equal in case they reference the same executable business process, thereforeObject.equals(Object)
andObject.hashCode()
have to be overridden.void
setRuntimeManagerURIs(URI[] runtimeManagerURI)
Sets the communication protocol depended URIs of theRuntimeManager
which is used for executing the referenced EBP-instance.String
toString()
-
Methods inherited from class de.aristaflow.adept2.model.common.defaultimplementation.DefaultUserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributes, setUserAttributeValue, subEquals, subHashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.aristaflow.adept2.model.common.UserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValue
-
-
-
-
Field Detail
-
lock
protected transient ReadWriteLock lock
Lock for accessing all data structures.
-
changedProperties
protected transient Set<ChangedProperty<? extends Serializable>> changedProperties
Change tracker for worklist item, cf.Adept2EbpRefProperties
.
-
-
Constructor Detail
-
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 theRuntimeManager
used 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 Detail
-
getActivityReferenceType
public String getActivityReferenceType()
Description copied from interface:ActivityReference
Returns the type of the activity, e.g. "de.aristaflow.ADEPT2ActivityReference".- Specified by:
getActivityReferenceType
in interfaceActivityReference
- Returns:
- The type of the activity.
-
getNodeIteration
public int getNodeIteration()
Description copied from interface:EBPInstanceReference
Returns the iteration count of the node thisEBPInstanceReference
references.- Specified by:
getNodeIteration
in interfaceEBPInstanceReference
- 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 beInteger.MIN_VALUE
.- Specified by:
getNodeID
in interfaceEBPInstanceReference
- 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 interfaceEBPInstanceReference
- 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 byEBPInstanceReference.getInstanceID()
.- Specified by:
getInstanceLogId
in interfaceEBPInstanceReference
- 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 interfaceEBPInstanceReference
- 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 interfaceEBPInstanceReference
- 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 interfaceEBPInstanceReference
- 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 interfaceEBPInstanceReference
- 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 theRuntimeManager
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 interfaceEBPInstanceReference
- Parameters:
runtimeManagerURI
- the URIs assigned to the appropriateRuntimeManager
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 isan activity
. Otherwisenull
will be returned.- Returns:
- The name of the executable component of the underlying activity if
this is
an activity
, otherwisenull
.
-
getGUIContextID
public abstract String getGUIContextID()
Gets the ID of theGUIContext
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:
AbstractActivity.getGUIContextID()
-
equals
public boolean equals(Object otherObject)
Description copied from interface:EBPInstanceReference
EBPInstanceReference
s are equal in case they reference the same executable business process, thereforeObject.equals(Object)
andObject.hashCode()
have to be overridden.- Specified by:
equals
in interfaceEBPInstanceReference
- Overrides:
equals
in classObject
- Parameters:
otherObject
- An instance of another object to compare thisEBPInstanceReference
with.- Returns:
- True, if this instance references the same instance of an executable business process as the designated object.
- See Also:
Object.equals(Object)
,Object.hashCode()
-
hashCode
public int hashCode()
Description copied from interface:EBPInstanceReference
EBPInstanceReference
s are equal in case they reference the same executable business process, thereforeObject.equals(Object)
andObject.hashCode()
have to be overridden.- Specified by:
hashCode
in interfaceEBPInstanceReference
- Overrides:
hashCode
in classObject
- See Also:
Object.equals(Object)
,Object.hashCode()
-
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 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.
-
-