public class ActiveEntity extends AgentPOA
| Constructor and Description |
|---|
ActiveEntity(AgentPath key,
POA poa) |
| Modifier and Type | Method and Description |
|---|---|
POA |
_default_POA() |
void |
addRole(String roleName)
Add this Agent to the given role
|
String |
delegatedAction(SystemKey agentId,
SystemKey delegateAgentId,
String stepPath,
int transitionID,
String requestData,
String attachmentType,
byte[] attachment) |
SystemKey |
getSystemKey()
System generated unique key of the Entity.
|
void |
initialise(SystemKey agentId,
String propString,
String initWfString,
String initCollsString,
String initViewpointString,
String initOutcomeString)
Initialises a new Item.
|
String |
queryData(String path)
Returns a chunk of XML which may be a serialized C2KLocalObject, or in the case of Outcomes is merely a fragment of XML.
|
String |
queryLifeCycle(SystemKey agentId,
boolean filter)
Returns a set of Jobs for this Agent on this Item.
|
void |
refreshJobList(SystemKey sysKey,
String stepPath,
String newJobs)
Called by an activity when it reckons we need to update our joblist for it
|
void |
removeRole(String roleName)
Remove this Agent from the given role
|
String |
requestAction(SystemKey agentID,
String stepPath,
int transitionID,
String requestData,
String attachmentType,
byte[] attachment)
Requests a transition of an Activity in this Item's workflow.
|
_all_interfaces, _invoke, _this, _this_get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_objectpublic POA _default_POA()
_default_POA in class Servantpublic SystemKey getSystemKey()
ItemOperationspublic String queryData(String path) throws AccessRightsException, ObjectNotFoundException, PersistencyException
ItemOperationspath - - All Entity data is arranged in a tree structure which uniquely identifies that object within the Entity it is contained, according to the following scheme:
LifeCycle/workflow (Items only): The Workflow object for this Item, containing the graph of activities defining the Item's lifecycle, and the Predefined Step container for data modificationCollection/{Name} (Items only): Collection objects defining links between ItemsProperty/{Name}: Name value pairs to idenfity this Entity, define its type, and hold any other oft-changing indicators that would be heavy to extract from OutcomesAuditTrail/{ID} (Items only): Events describing all activity state changes in this Item.Outcome/{Schema name}/{Schema version}/{Event ID} (Items only): XML fragments resulting from the execution of an Activity, validated against the XML Schema defined by that activity.ViewPoint/{Schema name}/{Name} (Items only): A named pointer to the latest version of an Outcome, defined by the Activity.Job/{ID} (Agents only): A persistent Job, reflecting a request for execution of an Activity to this Agent. Not all roles create persistent Jobs like this, only those specifically flagged to do so.AccessRightsException - Not currently implementedObjectNotFoundException - when the path is not present in this EntityPersistencyException - when the path could not be loaded because of a problem with the storage subsystem.ClusterStorage.getPath(org.cristalise.kernel.entity.C2KLocalObject)public void refreshJobList(SystemKey sysKey, String stepPath, String newJobs)
sysKey - the item which generated the jobs. The Agent should discard any existing jobs for that Item.stepPath - the Activity within the lifecycle of the item which the jobs relate tonewJobs - an XML marshalled JobArrayList containing the new Jobspublic void addRole(String roleName) throws CannotManageException, ObjectNotFoundException
AgentOperationsroleName - the new role to addCannotManageException - when an error occurs writing the data to LDAPObjectNotFoundException - when the role doesn't existpublic void removeRole(String roleName) throws CannotManageException, ObjectNotFoundException
AgentOperationsCannotManageException - when an error occurs writing the data to LDAPObjectNotFoundExceptionpublic void initialise(SystemKey agentId, String propString, String initWfString, String initCollsString, String initViewpointString, String initOutcomeString) throws AccessRightsException, InvalidDataException, PersistencyException, ObjectNotFoundException
ItemOperationsagentId - the Agent doing the initialisationpropString - The XML marshalled PropertyArrayList containing the initial
Property objects of the IteminitWfString - The XML marshalled new lifecycle of the IteminitViewpointString - the XML marshalled Viewpoint to be stored to find the OutcomeinitOutcomeString - the XML data to be storedObjectNotFoundExceptionAccessRightsExceptionInvalidDataExceptionPersistencyExceptionpublic String requestAction(SystemKey agentID, String stepPath, int transitionID, String requestData, String attachmentType, byte[] attachment) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification
ItemOperationsagentID - The SystemKey of the Agent. Some activities may be restricted in which roles may execute them.
Some transitions cause the activity to be assigned to the executing Agent.stepPath - The path in the Workflow to the desired ActivitytransitionID - The transition to be performedrequestData - The XML Outcome of the work defined by the Activity. Must be valid to the XML Schema,
though this is not verified on the server, rather in the AgentProxy in the Client API.attachmentType - the MimeType of the attachment (can be empty)attachment - binary data associated with the Outcome (can be empty)AccessRightsException - The Agent is not permitted to perform the operation. Either it does not
have the correct role, or the Activity is reserved by another Agent. Also thrown when the given Agent ID doesn't exist.InvalidTransitionException - The Activity is not in the correct state to make the requested transition.ObjectNotFoundException - The Activity or a container of it does not exist.InvalidDataException - An activity property for the requested Activity was invalid e.g. SchemaVersion was not a number.
Also thrown when an uncaught Java exception or error occurred.PersistencyException - There was a problem committing the changes to storage.ObjectAlreadyExistsException - Not normally thrown, but reserved for PredefinedSteps to throw if they need to.InvalidCollectionModificationpublic String delegatedAction(SystemKey agentId, SystemKey delegateAgentId, String stepPath, int transitionID, String requestData, String attachmentType, byte[] attachment) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification
public String queryLifeCycle(SystemKey agentId, boolean filter) throws AccessRightsException, ObjectNotFoundException, PersistencyException
ItemOperationsagentId - The system key of the Agent requesting Jobs.filter - If true, then only Activities which are currently active will be included.JobArrayListAccessRightsException - - when the Agent doesn't existObjectNotFoundException - - when the Item doesn't have a lifecyclePersistencyException - - when there was a storage or other unknown errorCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.