KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > api > client > wfmodel > WfEventAudit


1 package org.enhydra.shark.api.client.wfmodel;
2
3
4 import org.enhydra.shark.api.client.wfbase.*;
5
6 import org.enhydra.shark.api.client.timebase.*;
7 import org.enhydra.shark.api.SharkTransaction;
8
9 /**
10  OMG definition: WfEventAudit provides audit records of workflow event information. It provides
11  information on the source of the event and contains specific event data. Workflow
12  events include state changes, change of a resource assignment, and data changes.
13  Workflow events are persistent and can be accessed navigating the history relationship
14  of a WfExecutionObject. Workflow audit event objects are not part of the persistent
15  state of their source workflow object.
16  <p>
17  A workflow event audit object is created when a workflow object changes its status
18  (state change, process data change or assignment change); its lifetime is not limited by
19  the lifetime of the event source object. Operations for managing the retention,
20  archiving, and deletion of workflow events are not specified in this specification.
21  The WfEventAudit defines a set of event properties common to all workflow audit
22  events. In particular, it provides an identification of the source of the event in terms of
23  (business) identifiers of the workflow entities WfProcessMgr, WfProcess, and
24  WfActivity.
25  <p>We extended OMG's interface by duplicating method source, and adding additional
26  parameter that represents transaction. If you use method without SharkTransaction
27  parameter, the transaction will be implicitly created, and if you use it with
28  SharkTransaction parameter you must obey to some rules explained in HowTo documentation.
29  */

30 public interface WfEventAudit extends BaseBusinessObject { //PersistenceInterface
31

32    /**
33     A WfEventAudit can be associated with the WfExecutionObject that triggered the
34     event. Event audit items are meant to provide information on the execution history of
35     workflow object even after the source object has been deleted; in this case, no source
36     would be associated with the WfEventAudit.
37     <p>The following operation returns the source of the event, when available; if the source is
38     not available, a SourceNotAvailable exception is raised.
39     */

40    WfExecutionObject source () throws BaseException, SourceNotAvailable;
41
42    /**
43     A WfEventAudit can be associated with the WfExecutionObject that triggered the
44     event. Event audit items are meant to provide information on the execution history of
45     workflow object even after the source object has been deleted; in this case, no source
46     would be associated with the WfEventAudit.
47     <p>The following operation returns the source of the event, when available; if the source is
48     not available, a SourceNotAvailable exception is raised.
49     */

50    WfExecutionObject source (SharkTransaction t) throws BaseException, SourceNotAvailable;
51
52    /**
53     Records the time the status change of the source occurred that triggered the event audit
54     item to be created, using the TimeBase::UtcT data type defined by the OMG Time Service.
55     */

56    UtcT time_stamp () throws BaseException;
57
58    /**
59     Identifies the specific event type. The following is a set of pre-defined event types;
60     implementations of the WfM Facility may decide to support additional audit event
61     types.
62     <ul>
63     <li>processCreated - A WfProcess was created
64     <li>processStateChanged - The state of a WfProcess was changed
65     <li>processContextChanged - The context of a WfProcess was initialized or changed
66     <li>activityStateChanged - The state of a WfActivity was changed
67     <li>activityContextChanged - The context of a WfActivity was changed
68     <li>activityResultChanged - The result of a WfActivity was set
69     <li>activityAssigmentChanged - The status or the resource assignment of a
70     WfAssignment was initialized or changed
71     </ul>
72     */

73    String JavaDoc event_type () throws BaseException;
74
75    /**
76     If the event is triggered by a status change of a WfActivity, the key and the name of the
77     activity is recorded with the WfEventAudit. Otherwise, the activity related attributes
78     contain a NULL value.
79     <p>The following operation returns the key of the WfActivity associated with the event.
80     */

81    String JavaDoc activity_key () throws BaseException;
82
83    /**
84     If the event is triggered by a status change of a WfActivity, the key and the name of the
85     activity is recorded with the WfEventAudit. Otherwise, the activity related attributes
86     contain a NULL value.
87     <p>The following operation return the name of the WfActivity associated with the event.
88     */

89    String JavaDoc activity_name () throws BaseException;
90
91    /**
92     The key and the name of the WfProcess associated with the source of an event are
93     recorded with the WfEventAudit. If the event was triggered by a WfActivity, this is the
94     containing WfProcess. If it was triggered by a status change of a WfProcess, it is that
95     process.
96     <p>The following operation returns the key of the WfProcess associated with the event.
97     */

98    String JavaDoc process_key () throws BaseException;
99
100    /**
101     The key and the name of the WfProcess associated with the source of an event are
102     recorded with the WfEventAudit. If the event was triggered by a WfActivity, this is the
103     containing WfProcess. If it was triggered by a status change of a WfProcess, it is that
104     process.
105     <p>The following operation returns the name of the WfProcess associated with the event.
106     */

107    String JavaDoc process_name () throws BaseException;
108
109    /**
110     The WfProcessMgr associated with the workflow object that triggered the event is
111     identified via its name and version. If the event was triggered by a status change of an
112     activity, this is the manager of the process that contains the activity. If it was triggered
113     by a status change of a process, this is the manager of that process.
114     <p>The following operation returns the name of the WfProcessMgr associated with the event.
115     */

116    String JavaDoc process_mgr_name () throws BaseException;
117
118    /**
119     The WfProcessMgr associated with the workflow object that triggered the event is
120     identified via its name and version. If the event was triggered by a status change of an
121     activity, this is the manager of the process that contains the activity. If it was triggered
122     by a status change of a process, this is the manager of that process.
123     <p>The following operation returns the version of the WfProcessMgr associated with the event.
124     */

125    String JavaDoc process_mgr_version () throws BaseException;
126
127 } // interface WfEventAuditOperations
128
Popular Tags