public class AgentPOATie extends AgentPOA
| Constructor and Description |
|---|
AgentPOATie(AgentOperations delegate) |
AgentPOATie(AgentOperations delegate,
POA poa) |
| Modifier and Type | Method and Description |
|---|---|
POA |
_default_POA() |
AgentOperations |
_delegate() |
void |
_delegate(AgentOperations delegate) |
void |
addRole(String roleName)
Add this Agent to the given role
|
String |
delegatedAction(SystemKey agentKey,
SystemKey delegateAgentKey,
String stepPath,
int transitionID,
String requestData,
String attachmentType,
byte[] attachment) |
SystemKey |
getSystemKey()
System generated unique key of the Entity.
|
void |
initialise(SystemKey agentKey,
String itemProps,
String workflow,
String collections,
String viewpoint,
String outcome)
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 agentKey,
boolean filter)
Returns a set of Jobs for this Agent on this Item.
|
void |
refreshJobList(SystemKey itemKey,
String stepPath,
String newJobs)
Supplies the new set of jobs for the given item and activity.
|
void |
removeRole(String roleName)
Remove this Agent from the given role
|
String |
requestAction(SystemKey agentKey,
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 AgentPOATie(AgentOperations delegate)
public AgentPOATie(AgentOperations delegate, POA poa)
public AgentOperations _delegate()
public void _delegate(AgentOperations delegate)
public POA _default_POA()
_default_POA in class Servantpublic void refreshJobList(SystemKey itemKey, String stepPath, String newJobs)
itemKey - 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 ObjectNotFoundException, CannotManageException
roleName - the new role to addObjectNotFoundException - when the role doesn't existCannotManageException - when an error occurs writing the data to LDAPpublic void removeRole(String roleName) throws ObjectNotFoundException, CannotManageException
the - role name to removeCannotManageException - when an error occurs writing the data to LDAPObjectNotFoundExceptionpublic SystemKey getSystemKey()
public void initialise(SystemKey agentKey, String itemProps, String workflow, String collections, String viewpoint, String outcome) throws AccessRightsException, InvalidDataException, PersistencyException, ObjectNotFoundException, InvalidCollectionModification
agentKey - the Agent doing the initialisationitemProps - The XML marshalled PropertyArrayList containing the initial
Property objects of the Itemworkflow - The XML marshalled new lifecycle of the Itemcollection - The XML marshalled CollectionArrayList of the initial state of the Item's collectionsviewpoint - the XML marshalled Viewpoint to be stored to find the Outcomeoutcome - the XML data to be storedObjectNotFoundExceptionAccessRightsExceptionInvalidDataExceptionPersistencyExceptionInvalidCollectionModificationpublic String queryData(String path) throws AccessRightsException, ObjectNotFoundException, PersistencyException
path - - 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.ObjectNotFoundException - when the path is not present in this EntityAccessRightsException - Not currently implementedPersistencyException - when the path could not be loaded because of a problem with the storage subsystem.org.cristalise.kernel.persistency.ClusterStorage#getPathpublic String requestAction(SystemKey agentKey, String stepPath, int transitionID, String requestData, String attachmentType, byte[] attachment) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification
agentKey - 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 agentKey, SystemKey delegateAgentKey, String stepPath, int transitionID, String requestData, String attachmentType, byte[] attachment) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification
public String queryLifeCycle(SystemKey agentKey, boolean filter) throws AccessRightsException, ObjectNotFoundException, PersistencyException
agentKey - 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–2020 CRISTAL-iSE. All rights reserved.