KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.api.client.wfmodel;
2
3
4 import org.enhydra.shark.api.client.wfbase.*;
5 import org.enhydra.shark.api.SharkTransaction;
6
7 import java.util.Map JavaDoc;
8
9 /**
10  OMG definition: A WfProcessMgr represents a template for a specific workflow process; it is used to
11  create instances of a workflow process. Logically it is the factory and locator for
12  WfProcess instances. It provides access to the meta information about the context a
13  process requires and the result a process produces.
14  A process manager is identified by its name which is unique within a given business
15  domain. It could located, for example, via name using the OMG Naming Service, via
16  name and other attributes (e.g., category) via the OMG Trader Service, or other
17  infrastructure mechanisms.
18  <p>We extended OMG's interface by duplicating methods, and adding additional
19  parameter that represents transaction. If you use methods without SharkTransaction
20  parameter, the transaction will be implicitly created, and if you use it with
21  SharkTransaction parameter you must obey to some rules explained in HowTo documentation.
22  */

23 public interface WfProcessMgr extends BaseBusinessObject {//, PersistenceInterface
24

25    /**
26     Zero or more WfProcesses are associated with the WfProcessMgr that was used to
27     create them. The association is established when a WfProcess is created.
28     <p>The following operation provide the information about the number of
29     WfProcess items associated with a WfProcessMgr.
30     */

31    int how_many_process () throws BaseException;
32
33    /**
34     Zero or more WfProcesses are associated with the WfProcessMgr that was used to
35     create them. The association is established when a WfProcess is created.
36     <p>The following operation provide the information about the number of
37     WfProcess items associated with a WfProcessMgr.
38     */

39    int how_many_process (SharkTransaction t) throws BaseException;
40
41    /**
42     Zero or more WfProcesses are associated with the WfProcessMgr that was used to
43     create them. The association is established when a WfProcess is created.
44     <p>The following operation returns iterator for qurying associated processes
45     based on some criteria.
46     */

47    WfProcessIterator get_iterator_process () throws BaseException;
48
49    /**
50     Zero or more WfProcesses are associated with the WfProcessMgr that was used to
51     create them. The association is established when a WfProcess is created.
52     <p>The following operation returns iterator for qurying associated processes
53     based on some criteria.
54     */

55    WfProcessIterator get_iterator_process (SharkTransaction t) throws BaseException;
56
57    /**
58     Zero or more WfProcesses are associated with the WfProcessMgr that was used to
59     create them. The association is established when a WfProcess is created.
60     <p>The following operation returns max_number of WfProcess objects associated
61     with an WfProcessMgr. If max_number is less or eaqual to zero, or it is greater
62     than the number of existing processes, all associated WfProcess objects will
63     be returned.
64     */

65    WfProcess[] get_sequence_process (int max_number) throws BaseException;
66
67    /**
68     Zero or more WfProcesses are associated with the WfProcessMgr that was used to
69     create them. The association is established when a WfProcess is created.
70     <p>The following operation returns max_number of WfProcess objects associated
71     with an WfProcessMgr. If max_number is less or eaqual to zero, or it is greater
72     than the number of existing processes, all associated WfProcess objects will
73     be returned.
74     */

75    WfProcess[] get_sequence_process (SharkTransaction t,int max_number) throws BaseException;
76
77    /**
78     Zero or more WfProcesses are associated with the WfProcessMgr that was used to
79     create them. The association is established when a WfProcess is created.
80     <p>The following operation returns true if given process is associated with WfProcessMgr.
81     */

82    boolean is_member_of_process (WfProcess member) throws BaseException;
83
84    /**
85     Zero or more WfProcesses are associated with the WfProcessMgr that was used to
86     create them. The association is established when a WfProcess is created.
87     <p>The following operation returns true if given process is associated with WfProcessMgr.
88     */

89    boolean is_member_of_process (SharkTransaction t,WfProcess member) throws BaseException;
90
91    /**
92     A WfProcessMgr can be enabled or disabled. This method returns its current state.
93     */

94    process_mgr_stateType process_mgr_state () throws BaseException;
95
96    /**
97     A WfProcessMgr can be enabled or disabled. This method returns its current state.
98     */

99    process_mgr_stateType process_mgr_state (SharkTransaction t) throws BaseException;
100
101    /**
102     A WfProcessMgr can be enabled or disabled. This method sets its state.
103     */

104    void set_process_mgr_state (process_mgr_stateType new_state) throws BaseException, TransitionNotAllowed;
105
106    /**
107     A WfProcessMgr can be enabled or disabled. This method sets its state.
108     */

109    void set_process_mgr_state (SharkTransaction t,process_mgr_stateType new_state) throws BaseException, TransitionNotAllowed;
110
111    /**
112     Returns the name of the process manager. The name uniquely identifies the
113     process manager in a business domain. It is set when the process manager is
114     initialized and cannot be modified.
115     */

116    String JavaDoc name () throws BaseException;
117
118    /**
119     Returns the name of the process manager. The name uniquely identifies the
120     process manager in a business domain. It is set when the process manager is
121     initialized and cannot be modified.
122     */

123    String JavaDoc name (SharkTransaction t) throws BaseException;
124
125    /**
126     Returns description of the process manager. It is set when the process manager is
127     initialized and cannot be modified.
128     */

129    String JavaDoc description () throws BaseException;
130
131    /**
132     This attribute is set when the process manager is installed.
133     Returns the name of the process manager. The name uniquely identifies the
134     process manager in a business domain.
135     */

136    String JavaDoc description (SharkTransaction t) throws BaseException;
137
138    /**
139     The category of a process manager is used for classification of process types.
140     It is set when the process manager is initialized and cannot be modified.
141     */

142    String JavaDoc category () throws BaseException;
143
144    /**
145     The category of a process manager is used for classification of process types.
146     It is set when the process manager is initialized and cannot be modified.
147     */

148    String JavaDoc category (SharkTransaction t) throws BaseException;
149
150    /**
151     The version attribute of a process manager is used to distinguish between different
152     versions of a process model. Note that this is a means to distinguish between different
153     process managers that have the same name; it is left to the implementation to define
154     the format of the version attribute. It is set when the process manager is initialized and
155     cannot be modified.
156     */

157    String JavaDoc version () throws BaseException;
158
159    /**
160     The version attribute of a process manager is used to distinguish between different
161     versions of a process model. Note that this is a means to distinguish between different
162     process managers that have the same name; it is left to the implementation to define
163     the format of the version attribute. It is set when the process manager is initialized and
164     cannot be modified.
165     */

166    String JavaDoc version (SharkTransaction t) throws BaseException;
167
168    /**
169     Meta information that defines how to set the context of an instance of this
170     interface is returned by this operation.
171     <p>The Map entry identifies the name and the data type (represented by its string name)
172     of the data item. Map contains an entry for each data item in the set of context.
173     */

174    Map JavaDoc context_signature () throws BaseException;
175
176    /**
177     Meta information that defines how to set the context of an instance of this
178     interface is returned by this operation.
179     <p>The Map entry identifies the name and the data type (represented by its string name)
180     of the data item. Map contains an entry for each data item in the set of context
181     data for the WfProcess.
182     */

183    Map JavaDoc context_signature (SharkTransaction t) throws BaseException;
184
185    /**
186     Meta information that defines how to return the result of an instance of this
187     interface is returned by this operation.
188     <p>The Map entry identifies the name and the data type (represented by its string name)
189     of the data item. Map contains an entry for each data item in the set of result
190     data for the WfProcess.
191     */

192    Map JavaDoc result_signature () throws BaseException;
193
194    /**
195     Meta information that defines how to set the context of an instance of this
196     interface is returned by this operation.
197     <p>The Map entry identifies the name and the data type (represented by its string name)
198     of the data item. Map contains an entry for each data item in the set of context.
199     */

200    Map JavaDoc result_signature (SharkTransaction t) throws BaseException;
201
202    /**
203     This operation is used to create instances of a process model and link its requester.
204     When the process is created it enters state not_running.not_started.
205     <p>It is up to the implementation of the WfM Facility to decide which WfRequester
206     objects to accept or not. When a WfRequester is rejected, the invoking application
207     might decide not to register a WfRequester with the WfProcess.
208     * @param requester a WfRequester
209     *
210     * @return a WfProcess
211     *
212     * @throws BaseException
213     * @throws NotEnabled raised when the process manager is disabled.
214     * @throws InvalidRequester raised when a WfRequester is being identified
215     that cannot be a 'parent' of instances of the process model.
216     * @throws RequesterRequired raised when the process definition requires a
217     WfRequester and an invalid WfRequester is supplied in the parameter.
218     *
219     */

220    WfProcess create_process (WfRequester requester) throws BaseException, NotEnabled, InvalidRequester, RequesterRequired;
221
222    /**
223     This operation is used to create instances of a process model and link its requester.
224     When the process is created it enters state not_running.not_started.
225     <p>It is up to the implementation of the WfM Facility to decide which WfRequester
226     objects to accept or not. When a WfRequester is rejected, the invoking application
227     might decide not to register a WfRequester with the WfProcess.
228     * @param requester a WfRequester
229     *
230     * @return a WfProcess
231     *
232     * @throws BaseException
233     * @throws NotEnabled raised when the process manager is disabled.
234     * @throws InvalidRequester raised when a WfRequester is being identified
235     that cannot be a 'parent' of instances of the process model.
236     * @throws RequesterRequired raised when the process definition requires a
237     WfRequester and an invalid WfRequester is supplied in the parameter.
238     *
239     */

240    WfProcess create_process (SharkTransaction t,WfRequester requester) throws BaseException, NotEnabled, InvalidRequester, RequesterRequired;
241
242 } // interface WfProcessMgr
243
Popular Tags