001: package org.enhydra.shark.api.client.wfmodel;
002:
003: import org.enhydra.shark.api.client.timebase.UtcT;
004: import org.enhydra.shark.api.client.wfbase.BaseBusinessObject;
005:
006: /**
007: * OMG definition: WfEventAudit provides audit records of workflow event information. It
008: * provides information on the source of the event and contains specific event data.
009: * Workflow events include state changes, change of a resource assignment, and data
010: * changes. Workflow events are persistent and can be accessed navigating the history
011: * relationship of a WfExecutionObject. Workflow audit event objects are not part of the
012: * persistent state of their source workflow object.
013: * <p>
014: * A workflow event audit object is created when a workflow object changes its status
015: * (state change, process data change or assignment change); its lifetime is not limited
016: * by the lifetime of the event source object. Operations for managing the retention,
017: * archiving, and deletion of workflow events are not specified in this specification. The
018: * WfEventAudit defines a set of event properties common to all workflow audit events. In
019: * particular, it provides an identification of the source of the event in terms of
020: * (business) identifiers of the workflow entities WfProcessMgr, WfProcess, and
021: * WfActivity.
022: * <p>
023: * We extended OMG's interface by duplicating method source, and adding additional
024: * parameter that represents transaction. If you use method without SharkTransaction
025: * parameter, the transaction will be implicitly created, and if you use it with
026: * SharkTransaction parameter you must obey to some rules explained in HowTo
027: * documentation.
028: */
029: public interface WfEventAudit extends BaseBusinessObject { // PersistenceInterface
030:
031: /**
032: * A WfEventAudit can be associated with the WfExecutionObject that triggered the
033: * event. Event audit items are meant to provide information on the execution history
034: * of workflow object even after the source object has been deleted; in this case, no
035: * source would be associated with the WfEventAudit.
036: * <p>
037: * The following operation returns the source of the event, when available; if the
038: * source is not available, a SourceNotAvailable exception is raised.
039: */
040: WfExecutionObject source() throws Exception, SourceNotAvailable;
041:
042: /**
043: * Records the time the status change of the source occurred that triggered the event
044: * audit item to be created, using the TimeBase::UtcT data type defined by the OMG Time
045: * Service.
046: */
047: UtcT time_stamp() throws Exception;
048:
049: /**
050: * Identifies the specific event type. The following is a set of pre-defined event
051: * types; implementations of the WfM Facility may decide to support additional audit
052: * event types.
053: * <ul>
054: * <li>processCreated - A WfProcess was created
055: * <li>processStateChanged - The state of a WfProcess was changed
056: * <li>processContextChanged - The context of a WfProcess was initialized or changed
057: * <li>activityStateChanged - The state of a WfActivity was changed
058: * <li>activityContextChanged - The context of a WfActivity was changed
059: * <li>activityResultChanged - The result of a WfActivity was set
060: * <li>activityAssigmentChanged - The status or the resource assignment of a
061: * WfAssignment was initialized or changed
062: * </ul>
063: */
064: String event_type() throws Exception;
065:
066: /**
067: * If the event is triggered by a status change of a WfActivity, the key and the name
068: * of the activity is recorded with the WfEventAudit. Otherwise, the activity related
069: * attributes contain a NULL value.
070: * <p>
071: * The following operation returns the key of the WfActivity associated with the event.
072: */
073: String activity_key() throws Exception;
074:
075: /**
076: * If the event is triggered by a status change of a WfActivity, the key and the name
077: * of the activity is recorded with the WfEventAudit. Otherwise, the activity related
078: * attributes contain a NULL value.
079: * <p>
080: * The following operation return the name of the WfActivity associated with the event.
081: */
082: String activity_name() throws Exception;
083:
084: /**
085: * The key and the name of the WfProcess associated with the source of an event are
086: * recorded with the WfEventAudit. If the event was triggered by a WfActivity, this is
087: * the containing WfProcess. If it was triggered by a status change of a WfProcess, it
088: * is that process.
089: * <p>
090: * The following operation returns the key of the WfProcess associated with the event.
091: */
092: String process_key() throws Exception;
093:
094: /**
095: * The key and the name of the WfProcess associated with the source of an event are
096: * recorded with the WfEventAudit. If the event was triggered by a WfActivity, this is
097: * the containing WfProcess. If it was triggered by a status change of a WfProcess, it
098: * is that process.
099: * <p>
100: * The following operation returns the name of the WfProcess associated with the event.
101: */
102: String process_name() throws Exception;
103:
104: /**
105: * The WfProcessMgr associated with the workflow object that triggered the event is
106: * identified via its name and version. If the event was triggered by a status change
107: * of an activity, this is the manager of the process that contains the activity. If it
108: * was triggered by a status change of a process, this is the manager of that process.
109: * <p>
110: * The following operation returns the name of the WfProcessMgr associated with the
111: * event.
112: */
113: String process_mgr_name() throws Exception;
114:
115: /**
116: * The WfProcessMgr associated with the workflow object that triggered the event is
117: * identified via its name and version. If the event was triggered by a status change
118: * of an activity, this is the manager of the process that contains the activity. If it
119: * was triggered by a status change of a process, this is the manager of that process.
120: * <p>
121: * The following operation returns the version of the WfProcessMgr associated with the
122: * event.
123: */
124: String process_mgr_version() throws Exception;
125:
126: } // interface WfEventAuditOperations
|