Class Activity
java.lang.Object
org.cristalise.kernel.graph.model.Vertex
org.cristalise.kernel.graph.model.GraphableVertex
org.cristalise.kernel.lifecycle.instance.WfVertex
org.cristalise.kernel.lifecycle.instance.Activity
- Direct Known Subclasses:
CompositeActivity,PredefinedStep
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cristalise.kernel.lifecycle.instance.WfVertex
WfVertex.Types -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleantrue is available to be executedvector of errors (Strings) that is constructed each time verify() was launchedstatic final Stringprotected intprotected static final StringFields inherited from class org.cristalise.kernel.graph.model.GraphableVertex
mIsComposite -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort(AgentPath agent, ItemPath itemPath, TransactionKey transactionKey) adds a New link between the current Activity and the WfVertex passed in paramcalculateAllJobs(AgentPath agent, ItemPath itemPath, boolean recurse) calculateJobs(AgentPath agent, ItemPath itemPath, boolean recurse) Calculates the lists of jobs for the activity and its children (cf org.cristalise.kernel.entity.Job)booleanreturn the String that identifies the errors found in th activityintReturns the id of the error Transition associated with the current stategetNext()intgetState()Returns the startDate.getStateMachine(TransactionKey transKey) getType()Returns the type.booleanbooleanloop()Used in verify()voidreinit(int idLoop) reinitialises the Activity and propagate (for Loop)request(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, String attachmentType, byte[] attachment, boolean validateOutcome, TransactionKey transactionKey) request(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, String attachmentType, byte[] attachment, TransactionKey transactionKey) voidrun(TransactionKey transactionKey) called by precedent Activity runNext() for setting the activity able to be executedprotected StringrunActivityLogic(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, TransactionKey transactionKey) Overridden in predefined stepsvoidrunFirst(TransactionKey transactionKey) sets the activity available to be executed on start of Workflow or composite activity (when it is the first one of the (sub)processvoidrunNext(TransactionKey transactionKey) sets the next activity available if possiblevoidsetActive(boolean acti) sets the ability to be executedvoidsetActiveDate(GTimeStamp date) Deprecated.voidsetStartDate(GTimeStamp date) Deprecated.voidsetState(int state) Sets a new StatevoidsetStateDate(GTimeStamp startDate) voidSets the type.toString()booleanverify()Method verify.Methods inherited from class org.cristalise.kernel.lifecycle.instance.WfVertex
evaluateProperty, evaluatePropertyValue, evaluateScript, findLastVertex, findPair, getActContext, getWfMethods inherited from class org.cristalise.kernel.graph.model.GraphableVertex
addChild, deriveVersionNumber, getBuiltInProperty, getBuiltInProperty, getCentrePoint, getChildren, getChildrenEdges, getChildrenGraphModel, getCreationContext, getInEdgeIds, getInEdges, getInGraphables, getIsComposite, getIsLayoutable, getKeyValuePairs, getLayoutableChildren, getOtherPairingID, getOutEdgeIds, getOutEdges, getOutGraphables, getOutlinePoints, getPairingId, getParent, getPath, getProperties, isMyPair, search, setBuiltInProperty, setChildrenGraphModel, setIsComposite, setIsLayoutable, setKeyValuePairs, setParent, setProperties, updatePropertiesFromCollection, updatePropertiesFromCollectionMethods inherited from class org.cristalise.kernel.graph.model.Vertex
addInEdgeId, addOutEdgeId, clearTag, containsPoint, hasTag, isJoin, isLoop, moveAbsolute, removeInEdgeId, removeOutEdgeId, setInEdgeIds, setOutEdgeIds, setOutlinePoints, setTag
-
Field Details
-
PREDEF_STEPS_ELEMENT
- See Also:
-
XPATH_TOKEN
- See Also:
-
mErrors
vector of errors (Strings) that is constructed each time verify() was launched -
state
protected int state -
active
public boolean activetrue is available to be executed
-
-
Constructor Details
-
Activity
public Activity()
-
-
Method Details
-
addNext
adds a New link between the current Activity and the WfVertex passed in param -
getStateMachine
- Throws:
InvalidDataException
-
getStateMachine
- Throws:
InvalidDataException
-
getState
- Returns:
- The current State of the StateMachine (Used in Serialisation)
- Throws:
InvalidDataException- data was inconsistent
-
getErrorTransitionId
public int getErrorTransitionId()Returns the id of the error Transition associated with the current state- Returns:
- the id of the error Transition associated with the current state or -1 of there is no error Transition
-
getStateName
- Throws:
InvalidDataException
-
setState
public void setState(int state) Sets a new State -
isFinished
- Throws:
InvalidDataException
-
request
public String request(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, String attachmentType, byte[] attachment, TransactionKey transactionKey) throws AccessRightsException, InvalidTransitionException, InvalidDataException, ObjectNotFoundException, PersistencyException, ObjectAlreadyExistsException, ObjectCannotBeUpdated, CannotManageException, InvalidCollectionModification -
request
public String request(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, String attachmentType, byte[] attachment, boolean validateOutcome, TransactionKey transactionKey) throws AccessRightsException, InvalidTransitionException, InvalidDataException, ObjectNotFoundException, PersistencyException, ObjectAlreadyExistsException, ObjectCannotBeUpdated, CannotManageException, InvalidCollectionModification -
runActivityLogic
protected String runActivityLogic(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, TransactionKey transactionKey) throws InvalidDataException, InvalidCollectionModification, ObjectAlreadyExistsException, ObjectCannotBeUpdated, ObjectNotFoundException, PersistencyException, CannotManageException, AccessRightsException Overridden in predefined steps- Parameters:
agent-itemPath-transitionID-requestData-transactionKey-- Returns:
- Throws:
InvalidDataExceptionInvalidCollectionModificationObjectAlreadyExistsExceptionObjectCannotBeUpdatedObjectNotFoundExceptionPersistencyExceptionCannotManageExceptionAccessRightsException
-
verify
public boolean verify()Description copied from class:WfVertexMethod verify. -
loop
public boolean loop()Used in verify() -
runNext
sets the next activity available if possible- Specified by:
runNextin classWfVertex- Throws:
InvalidDataException
-
getNext
- Returns:
- the only Next of the Activity
-
reinit
reinitialises the Activity and propagate (for Loop)- Specified by:
reinitin classWfVertex- Throws:
InvalidDataException
-
getErrors
return the String that identifies the errors found in th activity -
run
called by precedent Activity runNext() for setting the activity able to be executed- Specified by:
runin classWfVertex- Throws:
InvalidDataException
-
runFirst
sets the activity available to be executed on start of Workflow or composite activity (when it is the first one of the (sub)process- Specified by:
runFirstin classWfVertex- Throws:
InvalidDataException
-
getActive
public boolean getActive()- Returns:
- the current ability to be executed
-
setActive
public void setActive(boolean acti) sets the ability to be executed -
getDescription
- Returns:
- the Description field of properties
-
getCurrentAgentName
-
getCurrentAgentRole
-
calculateJobs
public List<Job> calculateJobs(AgentPath agent, ItemPath itemPath, boolean recurse) throws ObjectNotFoundException, InvalidDataException Calculates the lists of jobs for the activity and its children (cf org.cristalise.kernel.entity.Job) -
calculateAllJobs
public List<Job> calculateAllJobs(AgentPath agent, ItemPath itemPath, boolean recurse) throws ObjectNotFoundException, InvalidDataException -
getStateDate
Returns the startDate.- Returns:
- GTimeStamp startDate
-
setStateDate
-
setActiveDate
Deprecated. -
setStartDate
Deprecated. -
getType
Returns the type.- Returns:
- String
-
getTypeName
-
setType
Sets the type.- Parameters:
type- The type to set
-
abort
public void abort(AgentPath agent, ItemPath itemPath, TransactionKey transactionKey) throws AccessRightsException, InvalidTransitionException, InvalidDataException, ObjectNotFoundException, PersistencyException, ObjectAlreadyExistsException, ObjectCannotBeUpdated, CannotManageException, InvalidCollectionModification -
toString
-