Class PredefinedStep
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
org.cristalise.kernel.lifecycle.instance.predefined.PredefinedStep
- Direct Known Subclasses:
AddC2KObject,AddDomainContext,AddDomainPath,AddNewCollectionDescription,AddNewSlot,AssignItemToSlot,Authenticate,BulkImport,ChangeName,ClearSlot,ConfigureLogback,CreateItemFromDescription,CreateNewCollectionVersion,Erase,ForcedLogout,Import,ImportImportAgent,ImportImportItem,ImportImportRole,LoginTimeout,Logout,ManageMembersOfCollectionBase,PredefinedStepCollectionBase,RemoveC2KObject,RemoveDomainContext,RemoveDomainPath,RemoveRole,RemoveViewpoint,ReplaceDomainWorkflow,SetAgentPassword,SetAgentRoles,UpdateCollectionsFromDescription,UpdateImportReport,UpdateItemFromDescription,UpdateProperitesFromDescription,UpdateRole,WriteProperty,WriteViewpoint
PredefinedStep are always Active, and have only one transition.
Subclasses could override this method (if necessary)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cristalise.kernel.lifecycle.instance.WfVertex
WfVertex.Types -
Field Summary
FieldsFields inherited from class org.cristalise.kernel.lifecycle.instance.Activity
active, mErrors, PREDEF_STEPS_ELEMENT, state, XPATH_TOKENFields inherited from class org.cristalise.kernel.graph.model.GraphableVertex
mIsComposite -
Constructor Summary
ConstructorsConstructorDescriptionPredefinedStep(String description) PredefinedStep(String schemaName, String description) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbundleData(String data) Generic bundling of a single parameter.static StringbundleData(String... data) Generic bundling of parameters.voidcomputeUpdates(ItemPath currentItem, Activity currentActivity, Node outcomeNode, TransactionKey transactionKey) booleanstatic String[]getDataList(String xmlData) return the String that identifies the errors found in th activitygetName()getPredefStepOutcomeNode(Node predefStepNode) static StringgetPredefStepSchemaName(String stepName) static PredefinedStepgetStepInstance(String stepName) getType()Returns the type.voidmergeProperties(CastorHashMap newProps) request(AgentPath agent, ItemPath itemPath, String requestData, TransactionKey transactionKey) Use this method to run a Predefined steps during Bootstrap or during Activity.request()protected abstract StringrunActivityLogic(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, TransactionKey transactionKey) All predefined steps must override this to implement their actionstatic voidstoreOutcomeEventAndViews(ItemPath itemPath, Outcome newOutcome, Integer version, TransactionKey transactionKey) TODO Implement Bootstrap predefined stepstatic voidstoreOutcomeEventAndViews(ItemPath itemPath, Outcome newOutcome, TransactionKey transactionKey) TODO Implement Bootstrap predefined stepbooleanverify()Method verify.Methods inherited from class org.cristalise.kernel.lifecycle.instance.Activity
abort, addNext, calculateAllJobs, calculateJobs, getCurrentAgentName, getCurrentAgentRole, getDescription, getErrorTransitionId, getNext, getState, getStateDate, getStateMachine, getStateMachine, getStateName, getTypeName, isFinished, loop, reinit, request, request, run, runFirst, runNext, setActive, setActiveDate, setStartDate, setState, setStateDate, setType, toStringMethods 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
-
DONE
public static final int DONE- See Also:
-
AVAILABLE
public static final int AVAILABLE- See Also:
-
-
Constructor Details
-
PredefinedStep
-
PredefinedStep
-
-
Method Details
-
getActive
public boolean getActive() -
getErrors
Description copied from class:Activityreturn the String that identifies the errors found in th activity -
verify
public boolean verify()Description copied from class:WfVertexMethod verify. -
getType
Description copied from class:ActivityReturns the type. -
getName
-
getPredefStepSchemaName
-
getStepInstance
-
getPredefStepOutcomeNode
- Throws:
InvalidDataException
-
runActivityLogic
protected abstract String runActivityLogic(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, TransactionKey transactionKey) throws InvalidDataException, InvalidCollectionModification, ObjectAlreadyExistsException, ObjectCannotBeUpdated, ObjectNotFoundException, PersistencyException, CannotManageException, AccessRightsException All predefined steps must override this to implement their action- Overrides:
runActivityLogicin classActivity- Parameters:
agent-itemPath-transitionID-requestData-transactionKey-- Returns:
- Throws:
InvalidDataExceptionInvalidCollectionModificationObjectAlreadyExistsExceptionObjectCannotBeUpdatedObjectNotFoundExceptionPersistencyExceptionCannotManageExceptionAccessRightsException
-
bundleData
Generic bundling of parameters. Converts the array of strings to PredefinedStepOutcome XML. Uses CDATA so any of the string could also be an XML.- Parameters:
data- array of input string for a PredefinedStep- Returns:
- the result of the PredefienedStep execution
-
bundleData
Generic bundling of a single parameter. Converts the array of strings to PredefinedStepOutcome XML. Uses CDATA so the string could also be an XML.- Parameters:
input- string for a PredefinedStep- Returns:
- the result of the PredefienedStep execution
-
getDataList
-
storeOutcomeEventAndViews
public static void storeOutcomeEventAndViews(ItemPath itemPath, Outcome newOutcome, TransactionKey transactionKey) throws PersistencyException, ObjectNotFoundException, InvalidDataException TODO Implement Bootstrap predefined step- Parameters:
itemPath-newOutcome-- Throws:
PersistencyExceptionObjectNotFoundExceptionInvalidDataException
-
storeOutcomeEventAndViews
public static void storeOutcomeEventAndViews(ItemPath itemPath, Outcome newOutcome, Integer version, TransactionKey transactionKey) throws PersistencyException, ObjectNotFoundException, InvalidDataException TODO Implement Bootstrap predefined step- Parameters:
itemPath-newOutcome-version-- Throws:
PersistencyExceptionObjectNotFoundExceptionInvalidDataException
-
request
public String request(AgentPath agent, ItemPath itemPath, String requestData, TransactionKey transactionKey) throws AccessRightsException, InvalidTransitionException, InvalidDataException, ObjectNotFoundException, PersistencyException, ObjectAlreadyExistsException, ObjectCannotBeUpdated, CannotManageException, InvalidCollectionModification Use this method to run a Predefined steps during Bootstrap or during Activity.request()- Parameters:
agent-itemPath-requestData-transactioKey-- Returns:
- Throws:
AccessRightsExceptionInvalidTransitionExceptionInvalidDataExceptionObjectNotFoundExceptionPersistencyExceptionObjectAlreadyExistsExceptionObjectCannotBeUpdatedCannotManageExceptionInvalidCollectionModification
-
computeUpdates
public void computeUpdates(ItemPath currentItem, Activity currentActivity, Node outcomeNode, TransactionKey transactionKey) throws InvalidDataException, PersistencyException, ObjectNotFoundException, ObjectAlreadyExistsException, InvalidCollectionModification - Parameters:
currentItem-currentActivity-transactionKey-inputOutcome-- Throws:
InvalidDataExceptionPersistencyExceptionObjectNotFoundExceptionObjectAlreadyExistsExceptionInvalidCollectionModification
-
mergeProperties
-