Class CreateItemFromDescription
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
org.cristalise.kernel.lifecycle.instance.predefined.CreateItemFromDescription
- Direct Known Subclasses:
CreateAgentFromDescription
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cristalise.kernel.lifecycle.instance.WfVertex
WfVertex.Types -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringUse this constant to enforce the factory to generate the nameFields inherited from class org.cristalise.kernel.lifecycle.instance.predefined.PredefinedStep
AVAILABLE, DONEFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItemName(ItemPath descItemPath, String newName, TransactionKey transactionKey) protected voidinitialiseItem(ItemPath newItem, AgentProxy agent, ItemProxy descItem, PropertyArrayList initProps, String outcome, String newName, String descVer, DomainPath context, ItemPath newItemPath, TransactionKey transactionKey) static Collection<?> instantiateCollection(String collName, ItemProxy descItem, String descVer, PropertyArrayList newProps, TransactionKey transactionKey) protected CollectionArrayListinstantiateCollections(ItemProxy descItem, String descVer, PropertyArrayList newProps, TransactionKey transactionKey) Copies the CollectionDescriptions of the Item requesting this predefined step.protected PropertyArrayListinstantiateProperties(ItemProxy descItem, String descVer, PropertyArrayList initProps, String newName, TransactionKey transactionKey) protected ViewpointinstantiateViewpoint(ItemProxy descItem, String descVer, TransactionKey transactionKey) protected CompositeActivityinstantiateWorkflow(ItemProxy descItem, String descVer, TransactionKey transactionKey) Retrieve the Workflow dependency for the given description version, instantiate the loaded CompositeActivityDefprotected StringrunActivityLogic(AgentPath agentPath, ItemPath descItemPath, int transitionID, String requestData, TransactionKey transactionKey) Params: Item name Domain context Description version to use(optional) Initial properties to set in the new Agent (optional)static voidstoreItem(AgentPath agent, ItemPath item, PropertyArrayList props, CollectionArrayList colls, CompositeActivity ca, Viewpoint initViewpoint, String initOutcomeString, TransactionKey transactionKey) protected PropertyArrayListunmarshallInitProperties(String initPropString) Unmarshalls initial PropertiesMethods inherited from class org.cristalise.kernel.lifecycle.instance.predefined.PredefinedStep
bundleData, bundleData, computeUpdates, getActive, getDataList, getErrors, getName, getPredefStepOutcomeNode, getPredefStepSchemaName, getStepInstance, getType, mergeProperties, request, storeOutcomeEventAndViews, storeOutcomeEventAndViews, verifyMethods 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
-
FACTORY_GENERATED_NAME
Use this constant to enforce the factory to generate the name- See Also:
-
-
Constructor Details
-
CreateItemFromDescription
-
CreateItemFromDescription
public CreateItemFromDescription()
-
-
Method Details
-
runActivityLogic
protected String runActivityLogic(AgentPath agentPath, ItemPath descItemPath, int transitionID, String requestData, TransactionKey transactionKey) throws InvalidDataException, ObjectNotFoundException, ObjectAlreadyExistsException, CannotManageException, ObjectCannotBeUpdated, PersistencyException Params:- Item name
- Domain context
- Description version to use(optional)
- Initial properties to set in the new Agent (optional)
- Specified by:
runActivityLogicin classPredefinedStep- Parameters:
agentPath-descItemPath-transitionID-requestData-transactionKey-- Returns:
- Throws:
ObjectNotFoundExceptionInvalidDataException- The input parameters were incorrectObjectAlreadyExistsException- The Agent already existsCannotManageException- The Agent could not be createdObjectCannotBeUpdated- The addition of the new entries into the LookupManager failedPersistencyException
-
getItemName
public String getItemName(ItemPath descItemPath, String newName, TransactionKey transactionKey) throws InvalidDataException, PersistencyException, ObjectCannotBeUpdated, ObjectNotFoundException - Parameters:
descItemPath-newName-transactionKey-- Returns:
- Throws:
InvalidDataExceptionObjectNotFoundExceptionObjectCannotBeUpdatedPersistencyException
-
initialiseItem
protected void initialiseItem(ItemPath newItem, AgentProxy agent, ItemProxy descItem, PropertyArrayList initProps, String outcome, String newName, String descVer, DomainPath context, ItemPath newItemPath, TransactionKey transactionKey) throws ObjectCannotBeUpdated, CannotManageException, InvalidDataException, ObjectAlreadyExistsException, PersistencyException, ObjectNotFoundException - Parameters:
newItem-agent-descItem-initProps-outcome-newName-descVer-context-newItemPath-transactionKey-- Throws:
ObjectCannotBeUpdatedCannotManageExceptionInvalidDataExceptionObjectAlreadyExistsExceptionPersistencyExceptionObjectNotFoundException
-
unmarshallInitProperties
protected PropertyArrayList unmarshallInitProperties(String initPropString) throws InvalidDataException Unmarshalls initial Properties- Parameters:
initPropString-- Returns:
- unmarshalled initial PropertyArrayList
- Throws:
InvalidDataException
-
instantiateProperties
protected PropertyArrayList instantiateProperties(ItemProxy descItem, String descVer, PropertyArrayList initProps, String newName, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException - Parameters:
descVer-initProps-newName-transactionKey-descItemPath-agent-- Returns:
- props
- Throws:
ObjectNotFoundExceptionInvalidDataException
-
instantiateWorkflow
protected CompositeActivity instantiateWorkflow(ItemProxy descItem, String descVer, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException, PersistencyException Retrieve the Workflow dependency for the given description version, instantiate the loaded CompositeActivityDef- Parameters:
descVer-transactionKey-descItemPath-- Returns:
- the Workflow instance
- Throws:
ObjectNotFoundExceptionInvalidDataExceptionPersistencyException
-
instantiateCollections
protected CollectionArrayList instantiateCollections(ItemProxy descItem, String descVer, PropertyArrayList newProps, TransactionKey transactionKey) throws ObjectNotFoundException, PersistencyException, InvalidDataException Copies the CollectionDescriptions of the Item requesting this predefined step.- Parameters:
descVer-transactionKey-descItemPath-- Returns:
- the new collection
- Throws:
ObjectNotFoundExceptionPersistencyExceptionInvalidDataException
-
instantiateCollection
public static Collection<?> instantiateCollection(String collName, ItemProxy descItem, String descVer, PropertyArrayList newProps, TransactionKey transactionKey) throws PersistencyException, ObjectNotFoundException, InvalidDataException - Parameters:
collName-descVer-newProps-transactionKey-descItemPath-- Returns:
- Throws:
PersistencyExceptionObjectNotFoundExceptionInvalidDataException
-
instantiateViewpoint
protected Viewpoint instantiateViewpoint(ItemProxy descItem, String descVer, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException, PersistencyException - Parameters:
descVer-transactionKey-descItemPath-- Returns:
- Throws:
ObjectNotFoundExceptionInvalidDataExceptionPersistencyException
-
storeItem
public static void storeItem(AgentPath agent, ItemPath item, PropertyArrayList props, CollectionArrayList colls, CompositeActivity ca, Viewpoint initViewpoint, String initOutcomeString, TransactionKey transactionKey) throws PersistencyException, ObjectNotFoundException, InvalidDataException - Parameters:
agent-item-props-colls-ca-initViewpoint-initOutcomeString-transactionKey-- Throws:
PersistencyExceptionObjectNotFoundExceptionInvalidDataExceptionorg.exolab.castor.xml.MarshalExceptionorg.exolab.castor.xml.ValidationExceptionIOExceptionorg.exolab.castor.mapping.MappingException
-