| org.enhydra.shark.api.client.wfmodel.WfExecutionObject
WfExecutionObject | public interface WfExecutionObject extends BaseBusinessObject(Code) | | OMG definition: WfExecutionObject is an abstract base interface that defines common
attributes, states, and operations for WfProcess and WfActivity. It provides the
capability to get and set and internal states. Operations are provided to get the
current state and to make a transition from the current state into another state.
Operations are also provided for specific state transitions. These operations are
suspend, resume, terminate, and abort. States returned by these operations should not
be confused with the state of the process which is calculated by the top level
WfProcess. States returned by these operations pertain only to the object they are
returned from. For example, regardless of what activity is currently enabled, a process
as a whole can be paused and resumed. The propagation of state change of a WfProcess
object down to WfActivity objects or subprocesses is implementation and process
definition dependent.
The interface includes name, description, priority, and key attributes. It also
provides an operation for monitoring WfExecutionObject executions by returning, based
on filter specified, event audit records that represent the history of the execution.
Other operations include methods for getting and setting context.
We extended OMG's interface by duplicating methods, and adding additional parameter
that represents transaction. If you use methods without SharkTransaction parameter, the
transaction will be implicitly created, and if you use it with SharkTransaction
parameter you must obey to some rules explained in HowTo documentation.
|
Method Summary | |
void | abort() Requests enactment of a suspended execution object to be aborted before its normal
completion. | void | change_state(String new_state) Updates the current state of the execution object. | String | description() Returns description of the execution object. | WfEventAuditIterator | get_iterator_history(String query, Map names_in_query) Zero or more WfEventAudit items can be associated with an execution object. | WfEventAudit[] | get_sequence_history(int max_number) Zero or more WfEventAudit items can be associated with an execution object. | how_closedType | how_closed() Returns the sub-state of execution object that is in closed state: completed,
aborted or terminated. | int | how_many_history() Zero or more WfEventAudit items can be associated with an execution object. | boolean | is_member_of_history(WfExecutionObject member) Zero or more WfEventAudit items can be associated with an execution object. | String | key() Gets the identifier of the execution object. | UtcT | last_state_time() Returns the time when WfExecutionObject changed its state to the current one. | String | name() Returns human readable, descriptive identifier of the execution object. | short | priority() Returns relative priority of the execution element in the set of all execution
objects of a given type. | Map | process_context() The process context is described by a set of named properties; the following
operation support access to the context of an execution object. | void | resume() Requests enactment of a suspended execution object to be resumed. | void | set_description(String new_value) Sets description of the execution object. | void | set_name(String new_value) Sets the human readable, descriptive identifier of the execution object. | void | set_priority(short new_value) Sets the relative priority of the execution element in the set of all execution
objects of a given type. | void | set_process_context(Map new_value) Sets the process relevant data that define the context of the execution object. | String | state() Gets the current state of the object. | void | suspend() Requests enactment of an execution object to be suspended. | void | terminate() Requests enactment of an execution object to be terminated before its normal
completion. | String[] | valid_states() The following operations support access to a potentially extended set of states; a
state is represented by a dot-notation representing hierarchical states (e.g.,
open.running). | while_openType | while_open() Returns the sub-state of execution object that is in open state: running or not
running. | why_not_runningType | why_not_running() Returns the sub-state of execution object that is in open.not_running state: not
started or suspended. | workflow_stateType | workflow_state() Returns the basic state of execution object: open or closed. |
abort | void abort() throws Exception, CannotStop, NotRunning(Code) | | Requests enactment of a suspended execution object to be aborted before its normal
completion. The state is set to closed.aborted.
throws: CannotStop - raised when the execution object cannot be aborted. throws: NotRunning - raised when the object is not running. throws: Exception - |
change_state | void change_state(String new_state) throws Exception, InvalidState, TransitionNotAllowed(Code) | | Updates the current state of the execution object. As a result the state of
execution objects associated with this execution object might be updated, too.
throws: InvalidState - raised when the new_state is not a valid state for theexecution object throws: TransitionNotAllowed - raised when the transition from the current state tonew_state is not allowed. throws: Exception - |
get_iterator_history | WfEventAuditIterator get_iterator_history(String query, Map names_in_query) throws Exception, HistoryNotAvailable(Code) | | Zero or more WfEventAudit items can be associated with an execution object. An event
audit item is generated (and associated with the source object) for each workflow
relevant status change (change of state, context or result and change of resource
assignment) of a WfExecutionObject. Status changes can be explicitly triggered by
operations that request a change of the objects status or implicitly by the workflow
process logic. We will indicate which operations trigger generation of WfEventAudit
items.
The following operation returns iterator for qurying associated event audits based
on some criteria.
|
get_sequence_history | WfEventAudit[] get_sequence_history(int max_number) throws Exception, HistoryNotAvailable(Code) | | Zero or more WfEventAudit items can be associated with an execution object. An event
audit item is generated (and associated with the source object) for each workflow
relevant status change (change of state, context or result and change of resource
assignment) of a WfExecutionObject. Status changes can be explicitly triggered by
operations that request a change of the objects status or implicitly by the workflow
process logic. We will indicate which operations trigger generation of WfEventAudit
items.
The following operation returns max_number of WfEventAudit objects associated with
an WfExecutionObject. If max_number is less or eaqual to zero, or it is greater than
the number of existing event audits, all associated WfEventAudit objects will be
returned.
|
how_closed | how_closedType how_closed() throws Exception(Code) | | Returns the sub-state of execution object that is in closed state: completed,
aborted or terminated.
|
how_many_history | int how_many_history() throws Exception, HistoryNotAvailable(Code) | | Zero or more WfEventAudit items can be associated with an execution object. An event
audit item is generated (and associated with the source object) for each workflow
relevant status change (change of state, context or result and change of resource
assignment) of a WfExecutionObject. Status changes can be explicitly triggered by
operations that request a change of the objects status or implicitly by the workflow
process logic. We will indicate which operations trigger generation of WfEventAudit
items.
The following operation provide the information about the number of WfEventAudit
items currently associated with a WfExecutionObject.
|
is_member_of_history | boolean is_member_of_history(WfExecutionObject member) throws Exception(Code) | | Zero or more WfEventAudit items can be associated with an execution object. An event
audit item is generated (and associated with the source object) for each workflow
relevant status change (change of state, context or result and change of resource
assignment) of a WfExecutionObject. Status changes can be explicitly triggered by
operations that request a change of the objects status or implicitly by the workflow
process logic. We will indicate which operations trigger generation of WfEventAudit
items.
The following operation returns true if given event audit is associated with
WfExecutionObject.
|
key | String key() throws Exception(Code) | | Gets the identifier of the execution object. The key of a WfProcess is unique among
the set of all WfProcesses created by a particular WfProcessMgr; the key of a
WfActivity is unique within the set of all WfActivities contained in a particular
WfProcess. A key is assigned to the execution object by its WfProcessMgr when it is
created.
The key of a workflow object should not be confused with an object identifier. It is
used for reference to the process or activity independently of the lifetime of the
execution object.
|
last_state_time | UtcT last_state_time() throws Exception(Code) | | Returns the time when WfExecutionObject changed its state to the current one.
|
name | String name() throws Exception(Code) | | Returns human readable, descriptive identifier of the execution object.
|
priority | short priority() throws Exception(Code) | | Returns relative priority of the execution element in the set of all execution
objects of a given type.
Valid values are numbers between one and five, with three being 'normal' and one as
the 'highest' priority.
|
process_context | Map process_context() throws Exception(Code) | | The process context is described by a set of named properties; the following
operation support access to the context of an execution object. The Map structure
identifies a set of property names and values matching the signature of the
execution object. The signature of a WfProcess can be obtained using the
get_context_signature operation provided by the WfProcessMgr of the process.
|
resume | void resume() throws Exception, CannotResume, NotSuspended(Code) | | Requests enactment of a suspended execution object to be resumed. The state is set
to open.running (or a substate) from open.not_running.suspended.
throws: CannotResume - raised when the execution object cannot be resumed. Forexample, resuming a WfActivity might not be allowed when the containingWfProcess is suspended. throws: NotSuspended - raised when the object is not suspended. throws: Exception - |
set_description | void set_description(String new_value) throws Exception(Code) | | Sets description of the execution object.
|
set_name | void set_name(String new_value) throws Exception(Code) | | Sets the human readable, descriptive identifier of the execution object.
|
set_priority | void set_priority(short new_value) throws Exception(Code) | | Sets the relative priority of the execution element in the set of all execution
objects of a given type.
Valid values are numbers between one and five, with three being 'normal' and one as
the 'highest' priority.
A request for update of the priority will raise an exception when the specified
priority is out of range, or when the priority cannot be updated.
|
set_process_context | void set_process_context(Map new_value) throws Exception, InvalidData, UpdateNotAllowed(Code) | | Sets the process relevant data that define the context of the execution object. The
process context is described by a set of named properties. The Map structure
identifies a set of property names and values matching the signature of the
execution object. The signature of a WfProcess can be obtained using the
get_context_signature operation provided by the WfProcessMgr of the process.
When this method has been called, only those name-value pairs in the parameter will
be set. Several set_process_context() calls could be used to set the entire context.
Parameters: new_value - a Map throws: Exception - throws: InvalidData - raised when an update request does not match this signature. throws: UpdateNotAllowed - raised when the implementation of the WfM Facility or thespecific workflow process does not allow an update of the context. |
suspend | void suspend() throws Exception, CannotSuspend, NotRunning, AlreadySuspended(Code) | | Requests enactment of an execution object to be suspended. The state is set to
open.not_running.suspended (or one of its substates).
throws: CannotSuspend - exception is raised when the execution object cannot besuspended. For example, an implementation of the WfM Facility might notsupport suspension of a WfActivity. throws: NotRunning - raised when the object is not running. throws: AlreadySuspended - raised when the object is already suspended. throws: Exception - |
terminate | void terminate() throws Exception, CannotStop, NotRunning(Code) | | Requests enactment of an execution object to be terminated before its normal
completion. A terminate request is different from an abort request in its effect of
execution object associated with the current execution object. The state is set to
closed.terminated (or one of its substates) from open.running (or one of its
substates).
throws: CannotStop - raised when the execution object cannot be terminated; forexample, termination of a WfActivity might not be allowed when itsimplementation is still active and cannot be terminated. throws: NotRunning - raised when the object is not running. throws: Exception - |
valid_states | String[] valid_states() throws Exception(Code) | | The following operations support access to a potentially extended set of states; a
state is represented by a dot-notation representing hierarchical states (e.g.,
open.running).
Returns a list of all the valid states that can be reached from the current state.
For example, open.running and closed.terminated would be in the list of valid states
if the current state was open.not_running.not_started - open.not_running.suspended
probably would not be in that list.
|
while_open | while_openType while_open() throws Exception(Code) | | Returns the sub-state of execution object that is in open state: running or not
running.
|
why_not_running | why_not_runningType why_not_running() throws Exception(Code) | | Returns the sub-state of execution object that is in open.not_running state: not
started or suspended.
|
|
|