KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > api > client > wfservice > ExecutionAdministration


1 package org.enhydra.shark.api.client.wfservice;
2
3 import org.enhydra.shark.api.client.wfbase.BaseException;
4 import org.enhydra.shark.api.SharkTransaction;
5
6 import org.enhydra.shark.api.client.wfmodel.*;
7
8 import java.util.Map JavaDoc;
9
10 /**
11  * Interface used to perform some administrative operations that
12  * concern execution engine objects.
13  * <p> The first method to be called by client application is the first method
14  * of this interface - connect(), and only if user authentication is OK,
15  * other methods can be used (otherwise, every method throws NotConnected
16  * exception).
17  *
18  * @author Sasa Bojanic
19  * @author Vladimir Puskas
20  */

21 public interface ExecutionAdministration {
22
23    /**
24     * This is the first method to be called in order to communicate with the
25     * engine. If the login parameters are correct, user can use other
26     * methods of this interface to communicate with the shark engine,
27     * and if not, he can't do anything.
28     *
29     * @param userId String representing user Id.
30     * @param password user password.
31     * @param engineName engine name.
32     * @param scope scope.
33     *
34     * @throws BaseException If something unexpected happens.
35     * @throws ConnectFailed If authentication parameters are not correct.
36     */

37    void connect (String JavaDoc userId, String JavaDoc password,String JavaDoc engineName,String JavaDoc scope) throws BaseException, ConnectFailed;
38
39    /**
40     * This is the first method to be called in order to communicate with the
41     * engine. If the login parameters are correct, user can use other
42     * methods of this interface to communicate with the shark engine,
43     * and if not, he can't do anything.
44     *
45     * @param t SharkTransaction.
46     * @param userId String representing user Id.
47     * @param password user password.
48     * @param engineName engine name.
49     * @param scope scope.
50     *
51     * @throws BaseException If something unexpected happens.
52     * @throws ConnectFailed If authentication parameters are not correct.
53     */

54    void connect (SharkTransaction t,String JavaDoc userId, String JavaDoc password,String JavaDoc engineName,String JavaDoc scope) throws BaseException, ConnectFailed;
55
56    /**
57     * Disconnects from shark engine.
58     *
59     * @throws BaseException If something unexpected happens.
60     * @throws NotConnected If user wasn't connected (the connect()
61     * wasn't called or authentication failed).
62     *
63     */

64    void disconnect () throws BaseException, NotConnected;
65
66    /**
67     * Disconnects from shark engine.
68     *
69     * @param t SharkTransaction.
70     * @throws BaseException If something unexpected happens.
71     * @throws NotConnected If user wasn't connected (the connect()
72     * wasn't called or authentication failed).
73     *
74     */

75    void disconnect (SharkTransaction t) throws BaseException, NotConnected;
76
77    /**
78     * Returns an iterator that can be used to retrieve WfProcessMgr objects
79     * that represent appropriate XPDL process definitions, and are used to
80     * create new process instances.
81     *
82     * @return WfProcessMgrIterator for retrieving WfProcessMgr objects.
83     *
84     * @throws BaseException If something unexpected happens.
85     * @throws NotConnected If user wasn't connected (the connect()
86     * wasn't called or authentication failed).
87     */

88    WfProcessMgrIterator get_iterator_processmgr () throws BaseException, NotConnected;
89
90    /**
91     * Returns an iterator that can be used to retrieve WfProcessMgr objects
92     * that represent appropriate XPDL process definitions, and are used to
93     * create new process instances.
94     *
95     * @param t SharkTransaction.
96     * @return WfProcessMgrIterator for retrieving WfProcessMgr objects.
97     *
98     * @throws BaseException If something unexpected happens.
99     * @throws NotConnected If user wasn't connected (the connect()
100     * wasn't called or authentication failed).
101     */

102    WfProcessMgrIterator get_iterator_processmgr (SharkTransaction t) throws BaseException, NotConnected;
103
104    /**
105     * Returns an array of WfProcessMgr objects.
106     *
107     * @param max_number The maximum number of WfProcessMgr instances to
108     * be returned. If set to 0, all existing instances will be returned (this
109     * will be equal to the number of XPDL process definitions in all packages
110     * that are loaded into engine).
111     * @return Array of specified WfProcessMgr objects.
112     *
113     * @throws BaseException If something unexpected happens.
114     * @throws NotConnected If user wasn't connected (the connect()
115     * wasn't called or authentication failed).
116     */

117    WfProcessMgr[] get_sequence_processmgr (int max_number) throws BaseException, NotConnected;
118
119    /**
120     * Returns an array of WfProcessMgr objects.
121     *
122     * @param t SharkTransaction.
123     * @param max_number The maximum number of WfProcessMgr instances to
124     * be returned. If set to 0, all existing instances will be returned (this
125     * will be equal to the number of XPDL process definitions in all packages
126     * that are loaded into engine).
127     * @return Array of specified WfProcessMgr objects.
128     *
129     * @throws BaseException If something unexpected happens.
130     * @throws NotConnected If user wasn't connected (the connect()
131     * wasn't called or authentication failed).
132     */

133    WfProcessMgr[] get_sequence_processmgr (SharkTransaction t,int max_number) throws BaseException, NotConnected;
134
135
136    /**
137     * Returns a map which keys are connection Ids, and values are usernames of
138     * the users that are logged on this instance of shark.
139     *
140     * @return Map which keys are connection Ids and values are usernames of
141     * the users that are logged on this instance of shark.
142     * @throws BaseException If something unexpected happens.
143     * @throws NotConnected If user wasn't connected (the connect()
144     * wasn't called or authentication failed).
145     */

146    Map JavaDoc getLoggedUsers () throws BaseException, NotConnected;
147
148    /**
149     * Returns a map which keys are connection Ids, and values are usernames of
150     * the users that are logged on this instance of shark.
151     *
152     * @param t SharkTransaction.
153     * @return Map which keys are connection Ids and values are usernames of
154     * the users that are logged on this instance of shark.
155     * @throws BaseException If something unexpected happens.
156     * @throws NotConnected If user wasn't connected (the connect()
157     * wasn't called or authentication failed).
158     *
159     */

160    Map JavaDoc getLoggedUsers (SharkTransaction t) throws BaseException, NotConnected;
161
162    /**
163     * Returns an iterator that can be used to retrieve WfResource objects
164     * that represent appropriate shark users.
165     *
166     * @return WfResourceIterator for retrieving WfResource objects.
167     * that represent appropriate shark users.
168     * @throws BaseException If something unexpected happens.
169     * @throws NotConnected If user wasn't connected (the connect()
170     * wasn't called or authentication failed).
171     */

172    WfResourceIterator get_iterator_resource () throws BaseException, NotConnected;
173
174    /**
175     * Returns an iterator that can be used to retrieve WfResource objects
176     * that represent appropriate shark users.
177     *
178     * @param t SharkTransaction.
179     * @return WfResourceIterator for retrieving WfResource objects.
180     * that represent appropriate shark users.
181     * @throws BaseException If something unexpected happens.
182     * @throws NotConnected If user wasn't connected (the connect()
183     * wasn't called or authentication failed).
184     */

185    WfResourceIterator get_iterator_resource (SharkTransaction t) throws BaseException, NotConnected;
186
187    /**
188     * Returns an array of WfResource objects.
189     *
190     * @param max_number The maximum number of WfResource instances to
191     * be returned. If set to 0, all existing instances will be returned.
192     * @return Specified array of WfResource objects.
193     * @throws BaseException If something unexpected happens.
194     * @throws NotConnected If user wasn't connected (the connect()
195     * wasn't called or authentication failed).
196     */

197    WfResource[] get_sequence_resource (int max_number) throws BaseException, NotConnected;
198
199    /**
200     * Returns an array of WfResource objects.
201     *
202     * @param t SharkTransaction.
203     * @param max_number The maximum number of WfResource instances to
204     * be returned. If set to 0, all existing instances will be returned.
205     * @return Specified array of WfResource objects.
206     * @throws BaseException If something unexpected happens.
207     * @throws NotConnected If user wasn't connected (the connect()
208     * wasn't called or authentication failed).
209     */

210    WfResource[] get_sequence_resource (SharkTransaction t,int max_number) throws BaseException, NotConnected;
211
212    /**
213     * Allows administrator to manually start an activity.
214     *
215     * @param procId Id of process instance.
216     * @param blockActIdString Id of block activity instance (if activity
217     * we want to start is not in block, this parameter can be null or empty string).
218     * @param actDefId Id of XPDL activity definition for the
219     * activity we want to manually start.
220     * @throws BaseException If something unexpected happens.
221     * @throws NotConnected If user wasn't connected (the connect()
222     * wasn't called or authentication failed).
223     */

224    void startActivity (String JavaDoc procId,String JavaDoc blockActIdString,String JavaDoc actDefId) throws BaseException, NotConnected;
225
226    /**
227     * Allows administrator to manually start an activity.
228     *
229     * @param t SharkTransaction.
230     * @param procId Id of process instance.
231     * @param blockActIdString Id of block activity instance (if activity
232     * we want to start is not in block, this parameter can be null or empty string).
233     * @param actDefId Id of XPDL activity definition for the
234     * activity we want to manually start.
235     * @throws BaseException If something unexpected happens.
236     * @throws NotConnected If user wasn't connected (the connect()
237     * wasn't called or authentication failed).
238     */

239    void startActivity (SharkTransaction t,String JavaDoc procId,String JavaDoc blockActIdString,String JavaDoc actDefId) throws BaseException, NotConnected;
240
241    /**
242     * Returns WfProcessMgr object that has the given name, or null if such
243     * does not exist.
244     *
245     * @param name WfProcessMgr object name.
246     * @return WfProcessMgr with the given name, or null if does not exist.
247     * @throws BaseException If something unexpected happens.
248     * @throws NotConnected If user wasn't connected (the connect()
249     * wasn't called or authentication failed).
250     */

251    WfProcessMgr getProcessMgr (String JavaDoc name) throws BaseException, NotConnected;
252
253    /**
254     * Returns WfProcessMgr object that has the given name, or null if such
255     * does not exist.
256     *
257     * @param t SharkTransaction.
258     * @param name WfProcessMgr object name.
259     * @return WfProcessMgr with the given name, or null if does not exist.
260     * @throws BaseException If something unexpected happens.
261     * @throws NotConnected If user wasn't connected (the connect()
262     * wasn't called or authentication failed).
263     */

264    WfProcessMgr getProcessMgr (SharkTransaction t,String JavaDoc name) throws BaseException, NotConnected;
265
266    /**
267     * Returns WfProcessMgr object that has the given name, or null if such
268     * does not exist.
269     *
270     * @param pkgId package Id for process mgr.
271     * @param pDefId process definition Id for process mgr.
272     * @return WfProcessMgr with the given name, or null if does not exist.
273     * @throws BaseException If something unexpected happens.
274     * @throws NotConnected If user wasn't connected (the connect()
275     * wasn't called or authentication failed).
276     */

277    WfProcessMgr getProcessMgr (String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException, NotConnected;
278
279    /**
280     * Returns WfProcessMgr object that has the given name, or null if such
281     * does not exist.
282     *
283     * @param t SharkTransaction.
284     * @param pkgId package Id for process mgr.
285     * @param pDefId process definition Id for process mgr.
286     * @return WfProcessMgr with the given name, or null if does not exist.
287     * @throws BaseException If something unexpected happens.
288     * @throws NotConnected If user wasn't connected (the connect()
289     * wasn't called or authentication failed).
290     */

291    WfProcessMgr getProcessMgr (SharkTransaction t,String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException, NotConnected;
292
293
294    /**
295     * Returns WfProcessMgr object that has the given name, or null if such
296     * does not exist.
297     *
298     * @param pkgId package Id for process mgr.
299     * @param pkgVer package version for process mgr.
300     * @param pDefId process definition Id for process mgr.
301     * @return WfProcessMgr with the given name, or null if does not exist.
302     * @throws BaseException If something unexpected happens.
303     * @throws NotConnected If user wasn't connected (the connect()
304     * wasn't called or authentication failed).
305     */

306    WfProcessMgr getProcessMgr (String JavaDoc pkgId,String JavaDoc pkgVer,String JavaDoc pDefId) throws BaseException, NotConnected;
307
308    /**
309     * Returns WfProcessMgr object that has the given name, or null if such
310     * does not exist.
311     *
312     * @param t SharkTransaction.
313     * @param pkgId package Id for process mgr.
314     * @param pkgVer package version for process mgr.
315     * @param pDefId process definition Id for process mgr.
316     * @return WfProcessMgr with the given name, or null if does not exist.
317     * @throws BaseException If something unexpected happens.
318     * @throws NotConnected If user wasn't connected (the connect()
319     * wasn't called or authentication failed).
320     */

321    WfProcessMgr getProcessMgr (SharkTransaction t,String JavaDoc pkgId,String JavaDoc pkgVer,String JavaDoc pDefId) throws BaseException, NotConnected;
322
323    /**
324     * Returns WfProcessMgr object that has the given name, or null if such
325     * does not exist.
326     *
327     * @param name WfProcessMgr object name.
328     * @return WfProcessMgr with the given name, or null if does not exist.
329     * @throws BaseException If something unexpected happens.
330     * @throws NotConnected If user wasn't connected (the connect()
331     * wasn't called or authentication failed).
332     */

333    Map JavaDoc getProcessMgrInputSignature(String JavaDoc name) throws BaseException, NotConnected;
334
335    /**
336     * Returns WfProcessMgr object that has the given name, or null if such
337     * does not exist.
338     *
339     * @param t SharkTransaction.
340     * @param name WfProcessMgr object name.
341     * @return WfProcessMgr with the given name, or null if does not exist.
342     * @throws BaseException If something unexpected happens.
343     * @throws NotConnected If user wasn't connected (the connect()
344     * wasn't called or authentication failed).
345     */

346    Map JavaDoc getProcessMgrInputSignature(SharkTransaction t,String JavaDoc name) throws BaseException, NotConnected;
347
348    /**
349     * Returns WfProcessMgr object that has the given name, or null if such
350     * does not exist.
351     *
352     * @param pkgId package Id for process mgr.
353     * @param pDefId process definition Id for process mgr.
354     * @return WfProcessMgr with the given name, or null if does not exist.
355     * @throws BaseException If something unexpected happens.
356     * @throws NotConnected If user wasn't connected (the connect()
357     * wasn't called or authentication failed).
358     */

359    Map JavaDoc getProcessMgrInputSignature(String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException, NotConnected;
360
361    /**
362     * Returns WfProcessMgr object that has the given name, or null if such
363     * does not exist.
364     *
365     * @param t SharkTransaction.a
366     * @param pkgId package Id for process mgr.
367     * @param pDefId process definition Id for process mgr.
368     * @return WfProcessMgr with the given name, or null if does not exist.
369     * @throws BaseException If something unexpected happens.
370     * @throws NotConnected If user wasn't connected (the connect()
371     * wasn't called or authentication failed).
372     */

373    Map JavaDoc getProcessMgrInputSignature(SharkTransaction t,String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException, NotConnected;
374
375
376    /**
377     * Returns WfProcessMgr object that has the given name, or null if such
378     * does not exist.
379     *
380     * @param pkgId package Id for process mgr.
381     * @param pkgVer package version for process mgr.
382     * @param pDefId process definition Id for process mgr.
383     * @return WfProcessMgr with the given name, or null if does not exist.
384     * @throws BaseException If something unexpected happens.
385     * @throws NotConnected If user wasn't connected (the connect()
386     * wasn't called or authentication failed).
387     */

388    Map JavaDoc getProcessMgrInputSignature(String JavaDoc pkgId,String JavaDoc pkgVer,String JavaDoc pDefId) throws BaseException, NotConnected;
389
390    /**
391     * Returns WfProcessMgr object that has the given name, or null if such
392     * does not exist.
393     *
394     * @param t SharkTransaction.
395     * @param pkgId package Id for process mgr.
396     * @param pkgVer package version for process mgr.
397     * @param pDefId process definition Id for process mgr.
398     * @return WfProcessMgr with the given name, or null if does not exist.
399     * @throws BaseException If something unexpected happens.
400     * @throws NotConnected If user wasn't connected (the connect()
401     * wasn't called or authentication failed).
402     */

403    Map JavaDoc getProcessMgrInputSignature(SharkTransaction t,String JavaDoc pkgId,String JavaDoc pkgVer,String JavaDoc pDefId) throws BaseException, NotConnected;
404
405    /**
406     * Returns WfResource object that has the given username, or null if such
407     * doesn't exist.
408     *
409     * @param username username of WfResource instance.
410     * @return WfResource with the given name, or null if does not exist.
411     * @throws BaseException If something unexpected happens.
412     * @throws NotConnected If user wasn't connected (the connect()
413     * wasn't called or authentication failed).
414     */

415    WfResource getResource (String JavaDoc username) throws BaseException, NotConnected;
416
417    /**
418     * Returns WfResource object that has the given username, or null if such
419     * doesn't exist.
420     *
421     * @param t SharkTransaction.
422     * @param username username of WfResource instance.
423     * @return WfResource with the given name, or null if does not exist.
424     * @throws BaseException If something unexpected happens.
425     * @throws NotConnected If user wasn't connected (the connect()
426     * wasn't called or authentication failed).
427     */

428    WfResource getResource (SharkTransaction t,String JavaDoc username) throws BaseException, NotConnected;
429
430    /**
431     * Returns WfProcess object that has the given Id, or null if such
432     * does not exist.
433     *
434     * @param procId process instance Id.
435     * @return WfProcess with the given name, or null if does not exist.
436     * @throws BaseException If something unexpected happens.
437     * @throws NotConnected If user wasn't connected (the connect()
438     * wasn't called or authentication failed).
439     */

440    WfProcess getProcess (String JavaDoc procId) throws BaseException, NotConnected;
441
442    /**
443     * Returns WfProcess object that has the given Id, or null if such
444     * does not exist.
445     *
446     * @param t SharkTransaction.
447     * @param procId process instance Id.
448     * @return WfProcess with the given name, or null if does not exist.
449     * @throws BaseException If something unexpected happens.
450     * @throws NotConnected If user wasn't connected (the connect()
451     * wasn't called or authentication failed).
452     */

453    WfProcess getProcess (SharkTransaction t,String JavaDoc procId) throws BaseException, NotConnected;
454
455    /**
456     * Returns WfProcess object that has the given Id, or null if such
457     * does not exist.
458     *
459     * @param procId process instance Id.
460     * @return WfProcess with the given name, or null if does not exist.
461     * @throws BaseException If something unexpected happens.
462     * @throws NotConnected If user wasn't connected (the connect()
463     * wasn't called or authentication failed).
464     */

465    Object JavaDoc getProcessContext(String JavaDoc procId, String JavaDoc variableName) throws BaseException, NotConnected;
466
467    /**
468     * Returns WfProcess object that has the given Id, or null if such
469     * does not exist.
470     *
471     * @param t SharkTransaction.
472     * @param procId process instance Id.
473     * @return WfProcess with the given name, or null if does not exist.
474     * @throws BaseException If something unexpected happens.
475     * @throws NotConnected If user wasn't connected (the connect()
476     * wasn't called or authentication failed).
477     */

478    Object JavaDoc getProcessContext(SharkTransaction t,String JavaDoc procId, String JavaDoc variableName) throws BaseException, NotConnected;
479
480    /**
481     * Returns WfProcess object that has the given Id, or null if such
482     * does not exist.
483     *
484     * @param procId process instance Id.
485     * @return WfProcess with the given name, or null if does not exist.
486     * @throws BaseException If something unexpected happens.
487     * @throws NotConnected If user wasn't connected (the connect()
488     * wasn't called or authentication failed).
489     */

490    Map JavaDoc getProcessContext(String JavaDoc procId, String JavaDoc[] variableNames) throws BaseException, NotConnected;
491
492    /**
493     * Returns WfProcess object that has the given Id, or null if such
494     * does not exist.
495     *
496     * @param t SharkTransaction.
497     * @param procId process instance Id.
498     * @return WfProcess with the given name, or null if does not exist.
499     * @throws BaseException If something unexpected happens.
500     * @throws NotConnected If user wasn't connected (the connect()
501     * wasn't called or authentication failed).
502     */

503    Map JavaDoc getProcessContext(SharkTransaction t,String JavaDoc procId, String JavaDoc[] variableNames) throws BaseException, NotConnected;
504
505    /**
506     * Returns WfActivity object that has the given Id, or null if such doesn't
507     * exist.
508     *
509     * @param procId activity's process Id.
510     * @param actId activity instance Id.
511     * @return WfActivity with the given Id, or null if does not exist.
512     * @throws BaseException If something unexpected happens.
513     * @throws NotConnected If user wasn't connected (the connect()
514     * wasn't called or authentication failed).
515     */

516    WfActivity getActivity (String JavaDoc procId,String JavaDoc actId) throws BaseException, NotConnected;
517
518    /**
519     * Returns WfActivity object that has the given Id, or null if such doesn't
520     * exist.
521     *
522     * @param t SharkTransaction.
523     * @param procId activity's process Id.
524     * @param actId activity instance Id.
525     * @return WfActivity with the given Id, or null if does not exist.
526     * @throws BaseException If something unexpected happens.
527     * @throws NotConnected If user wasn't connected (the connect()
528     * wasn't called or authentication failed).
529     */

530    WfActivity getActivity (SharkTransaction t,String JavaDoc procId,String JavaDoc actId) throws BaseException, NotConnected;
531
532    /**
533     * Returns WfActivity object that has the given Id, or null if such doesn't
534     * exist.
535     *
536     * @param procId activity's process Id.
537     * @param actId activity instance Id.
538     * @return WfActivity with the given Id, or null if does not exist.
539     * @throws BaseException If something unexpected happens.
540     * @throws NotConnected If user wasn't connected (the connect()
541     * wasn't called or authentication failed).
542     */

543    Object JavaDoc getActivityContext(String JavaDoc procId,String JavaDoc actId, String JavaDoc variableName) throws BaseException, NotConnected;
544
545    /**
546     * Returns WfActivity object that has the given Id, or null if such doesn't
547     * exist.
548     *
549     * @param t SharkTransaction.
550     * @param procId activity's process Id.
551     * @param actId activity instance Id.
552     * @return WfActivity with the given Id, or null if does not exist.
553     * @throws BaseException If something unexpected happens.
554     * @throws NotConnected If user wasn't connected (the connect()
555     * wasn't called or authentication failed).
556     */

557    Object JavaDoc getActivityContext(SharkTransaction t,String JavaDoc procId,String JavaDoc actId, String JavaDoc variableName) throws BaseException, NotConnected;
558
559    /**
560     * Returns WfActivity object that has the given Id, or null if such doesn't
561     * exist.
562     *
563     * @param procId activity's process Id.
564     * @param actId activity instance Id.
565     * @return WfActivity with the given Id, or null if does not exist.
566     * @throws BaseException If something unexpected happens.
567     * @throws NotConnected If user wasn't connected (the connect()
568     * wasn't called or authentication failed).
569     */

570    Map JavaDoc getActivityContext(String JavaDoc procId,String JavaDoc actId, String JavaDoc[] variableNames) throws BaseException, NotConnected;
571
572    /**
573     * Returns WfActivity object that has the given Id, or null if such doesn't
574     * exist.
575     *
576     * @param t SharkTransaction.
577     * @param procId activity's process Id.
578     * @param actId activity instance Id.
579     * @return WfActivity with the given Id, or null if does not exist.
580     * @throws BaseException If something unexpected happens.
581     * @throws NotConnected If user wasn't connected (the connect()
582     * wasn't called or authentication failed).
583     */

584    Map JavaDoc getActivityContext(SharkTransaction t,String JavaDoc procId,String JavaDoc actId, String JavaDoc[] variableNames) throws BaseException, NotConnected;
585
586    /**
587     * Returns WfAssignment object for activity with given Id, and resource with
588     * the given username, or null if such doesn't exist.
589     *
590     * @param procId the assignment's activity's process instance Id.
591     * @param actId the assignment's activity instance Id.
592     * @param username the assignement's username
593     * @return Specified WfAssignment , or null if does not exist.
594     * @throws BaseException If something unexpected happens.
595     * @throws NotConnected If user wasn't connected (the connect()
596     * wasn't called or authentication failed).
597     */

598    WfAssignment getAssignment (String JavaDoc procId,String JavaDoc actId,String JavaDoc username) throws BaseException, NotConnected;
599
600    /**
601     * Returns WfAssignment object for activity with given Id, and resource with
602     * the given username, or null if such doesn't exist.
603     *
604     * @param t SharkTransaction.
605     * @param procId the assignment's activity's process instance Id.
606     * @param actId the assignment's activity instance Id.
607     * @param username the assignement's username
608     * @return Specified WfAssignment , or null if does not exist.
609     * @throws BaseException If something unexpected happens.
610     * @throws NotConnected If user wasn't connected (the connect()
611     * wasn't called or authentication failed).
612     */

613    WfAssignment getAssignment (SharkTransaction t,String JavaDoc procId,String JavaDoc actId,String JavaDoc username) throws BaseException, NotConnected;
614
615    /**
616     * Returns WfAssignment object for given Id, or null if such doesn't exist.
617     * NOTE: this method is here only because of standardization (having
618     * one method with transaction, and other without), and is not supposed
619     * to be used in normal situations - tool agents can call the same method
620     * but with additional transaction parameter, and user applications should
621     * call the same method but with actId and username parameters instead of
622     * assId parameter.
623     *
624     * @param procId the assignment's activity's process instance Id.
625     * @param assId the assignment Id.
626     * @return Specified WfAssignment , or null if does not exist.
627     * @throws BaseException If something unexpected happens.
628     * @throws NotConnected If user wasn't connected (the connect()
629     * wasn't called or authentication failed).
630     */

631    WfAssignment getAssignment (String JavaDoc procId,String JavaDoc assId) throws BaseException, NotConnected;
632
633    /**
634     * Returns WfAssignment object for given Id, or null if such doesn't exist.
635     * This method is supposed to be called only by some specific
636     * implementation of tool agents, with the assId being the same as
637     * provided to tool agent by the engine - otherwise, in some cases, you could
638     * get an unexpected assignment.
639     *
640     * @param t SharkTransaction.
641     * @param procId the assignment's activity's process instance Id.
642     * @param assId the assignment Id.
643     * @return Specified WfAssignment , or null if does not exist.
644     * @throws BaseException If something unexpected happens.
645     * @throws NotConnected If user wasn't connected (the connect()
646     * wasn't called or authentication failed).
647     */

648    WfAssignment getAssignment (SharkTransaction t,String JavaDoc procId,String JavaDoc assId) throws BaseException, NotConnected;
649
650    /**
651     * Reevaluates all assignments (for all activities belonging to all process
652     * instances that are created based on all process definitions of all packages
653     *
654     * @throws BaseException If something unexpected happens.
655     * @throws NotConnected If user wasn't connected (the connect()
656     * wasn't called or authentication failed).
657     */

658    void reevaluateAssignments () throws BaseException, NotConnected;
659
660    /**
661     * Reevaluates all assignments (for all activities belonging to all process
662     * instances that are created based on all process definitions of all packages
663     *
664     * @param t SharkTransaction.
665     * @throws BaseException If something unexpected happens.
666     * @throws NotConnected If user wasn't connected (the connect()
667     * wasn't called or authentication failed).
668     */

669    void reevaluateAssignments (SharkTransaction t) throws BaseException, NotConnected;
670
671    /**
672     * Reevaluates assignments for activities belonging to the process instances
673     * that are created from process definitions belonging to specified package.
674     *
675     * @param pkgId package Id.
676     * @throws BaseException If something unexpected happens.
677     * @throws NotConnected If user wasn't connected (the connect()
678     * wasn't called or authentication failed).
679     */

680    void reevaluateAssignments (String JavaDoc pkgId) throws BaseException, NotConnected;
681
682    /**
683     * Reevaluates assignments for activities belonging to the process instances
684     * that are created from process definitions belonging to specified package.
685     *
686     * @param t SharkTransaction.
687     * @param pkgId package Id.
688     * @throws BaseException If something unexpected happens.
689     * @throws NotConnected If user wasn't connected (the connect()
690     * wasn't called or authentication failed).
691     */

692    void reevaluateAssignments (SharkTransaction t,String JavaDoc pkgId) throws BaseException, NotConnected;
693
694    /**
695     * Reevaluates assignments for activities belonging to the process instances
696     * that are created from specified process definition belonging to the
697     * specified package.
698     *
699     * @param pkgId package Id.
700     * @param pDefId process definition Id.
701     * @throws BaseException If something unexpected happens.
702     * @throws NotConnected If user wasn't connected (the connect()
703     * wasn't called or authentication failed).
704     */

705    void reevaluateAssignments (String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException, NotConnected;
706
707    /**
708     * Reevaluates assignments for activities belonging to the process instances
709     * that are created from specified process definition belonging to the
710     * specified package.
711     *
712     * @param t SharkTransaction.
713     * @param pkgId package Id.
714     * @param pDefId process definition Id.
715     * @throws BaseException If something unexpected happens.
716     * @throws NotConnected If user wasn't connected (the connect()
717     * wasn't called or authentication failed).
718     */

719    void reevaluateAssignments (SharkTransaction t,String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException, NotConnected;
720
721    /**
722     * Reevaluates assignments for activities that are instantiated based on
723     * specified activity definition from specified process definition from
724     * specified package.
725     *
726     * @param pkgId package Id.
727     * @param pDefId process definition Id.
728     * @param aDefId activity definition Id.
729     * @throws BaseException If something unexpected happens.
730     * @throws NotConnected If user wasn't connected (the connect()
731     * wasn't called or authentication failed).
732     */

733    void reevaluateAssignments (String JavaDoc pkgId,String JavaDoc pDefId,String JavaDoc aDefId) throws BaseException, NotConnected;
734
735    /**
736     * Reevaluates assignments for activities that are instantiated based on
737     * specified activity definition from specified process definition from
738     * specified package.
739     *
740     * @param t SharkTransaction.
741     * @param pkgId package Id.
742     * @param pDefId process definition Id.
743     * @param aDefId activity definition Id.
744     * @throws BaseException If something unexpected happens.
745     * @throws NotConnected If user wasn't connected (the connect()
746     * wasn't called or authentication failed).
747     */

748    void reevaluateAssignments (SharkTransaction t,String JavaDoc pkgId,String JavaDoc pDefId,String JavaDoc aDefId) throws BaseException, NotConnected;
749
750    /**
751     * Deletes all closed processes from instance DB.
752     *
753     * @throws BaseException If something unexpected happens.
754     * @throws NotConnected If user wasn't connected (the connect()
755     * wasn't called or authentication failed).
756     */

757    void deleteClosedProcesses () throws BaseException, NotConnected;
758
759    /**
760     * Deletes all closed processes from instance DB.
761     *
762     * @param t SharkTransaction.
763     * @throws BaseException If something unexpected happens.
764     * @throws NotConnected If user wasn't connected (the connect()
765     * wasn't called or authentication failed).
766     */

767    void deleteClosedProcesses (SharkTransaction t) throws BaseException, NotConnected;
768
769    /**
770     * Deletes from instance DB all closed processes.
771     *
772     * @param procPerTrans
773     * @param failures2ignore
774     * @throws BaseException If something unexpected happens.
775     * @throws NotConnected If user wasn't connected (the connect()
776     * wasn't called or authentication failed).
777     */

778    String JavaDoc[] deleteClosedProcesses (int procPerTrans, int failures2ignore) throws BaseException, NotConnected;
779
780    /**
781     * Deletes all closed processes from instance DB that entered closed state
782     * before given time.
783     *
784     * @throws BaseException If something unexpected happens.
785     * @throws NotConnected If user wasn't connected (the connect()
786     * wasn't called or authentication failed).
787     */

788    void deleteClosedProcesses (java.util.Date JavaDoc closedBefore) throws BaseException, NotConnected;
789
790    /**
791     * Deletes all closed processes from instance DB that entered closed state
792     * before given time.
793     *
794     * @param t SharkTransaction.
795     * @throws BaseException If something unexpected happens.
796     * @throws NotConnected If user wasn't connected (the connect()
797     * wasn't called or authentication failed).
798     */

799    void deleteClosedProcesses (SharkTransaction t,java.util.Date JavaDoc closedBefore) throws BaseException, NotConnected;
800
801    /**
802     * Deletes from instance DB all closed processes that are created based
803     * on definitions from given package.
804     *
805     * @param pkgId package Id for process mgr.
806     * @throws BaseException If something unexpected happens.
807     * @throws NotConnected If user wasn't connected (the connect()
808     * wasn't called or authentication failed).
809     */

810    void deleteClosedProcesses (String JavaDoc pkgId) throws BaseException, NotConnected;
811
812    /**
813     * Deletes from instance DB all closed processes that are created based
814     * on definitions from given package.
815     *
816     * @param t SharkTransaction.
817     * @param pkgId package Id for process mgr.
818     * @throws BaseException If something unexpected happens.
819     * @throws NotConnected If user wasn't connected (the connect()
820     * wasn't called or authentication failed).
821     */

822    void deleteClosedProcesses (SharkTransaction t,String JavaDoc pkgId) throws BaseException, NotConnected;
823
824    /**
825     * Deletes from instance DB all closed processes that are created based
826     * on given manager.
827     *
828     * @param mgrName name of the process mgr.
829     * @throws BaseException If something unexpected happens.
830     * @throws NotConnected If user wasn't connected (the connect()
831     * wasn't called or authentication failed).
832     */

833    void deleteClosedProcessesForMgr (String JavaDoc mgrName) throws BaseException, NotConnected;
834
835    /**
836     * Deletes from instance DB all closed processes that are created based
837     * on given manager.
838     *
839     * @param t SharkTransaction.
840     * @param mgrName name of the process mgr.
841     * @throws BaseException If something unexpected happens.
842     * @throws NotConnected If user wasn't connected (the connect()
843     * wasn't called or authentication failed).
844     */

845    void deleteClosedProcessesForMgr (SharkTransaction t,String JavaDoc mgrName) throws BaseException, NotConnected;
846
847    /**
848     * Deletes from instance DB all closed processes that are created based
849     * on given manager.
850     *
851     * @param mgrName name of the process mgr.
852     * @param procPerTrans
853     * @param failures2ignore
854     * @throws BaseException If something unexpected happens.
855     * @throws NotConnected If user wasn't connected (the connect()
856     * wasn't called or authentication failed).
857     */

858    String JavaDoc[] deleteClosedProcessesForMgr (String JavaDoc mgrName, int procPerTrans, int failures2ignore) throws BaseException, NotConnected;
859
860    /**
861     * Deletes from instance DB all closed processes that are created based
862     * on given process definition and version.
863     *
864     * @param pkgId package Id for process mgr.
865     * @param pkgVer package version.
866     * @throws BaseException If something unexpected happens.
867     * @throws NotConnected If user wasn't connected (the connect()
868     * wasn't called or authentication failed).
869     */

870    void deleteClosedProcessesWithVersion (String JavaDoc pkgId,String JavaDoc pkgVer) throws BaseException, NotConnected;
871
872    /**
873     * Deletes from instance DB all closed processes that are created based
874     * on given process definition and version.
875     *
876     * @param t SharkTransaction.
877     * @param pkgId package Id for process mgr.
878     * @param pkgVer package version.
879     * @throws BaseException If something unexpected happens.
880     * @throws NotConnected If user wasn't connected (the connect()
881     * wasn't called or authentication failed).
882     */

883    void deleteClosedProcessesWithVersion (SharkTransaction t,String JavaDoc pkgId,String JavaDoc pkgVer) throws BaseException, NotConnected;
884
885
886    /**
887     * Deletes from instance DB all closed processes that are created based
888     * on given process definition.
889     *
890     * @param pkgId package Id for process mgr.
891     * @param pDefId process definition Id.
892     * @throws BaseException If something unexpected happens.
893     * @throws NotConnected If user wasn't connected (the connect()
894     * wasn't called or authentication failed).
895     */

896    void deleteClosedProcesses (String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException, NotConnected;
897
898    /**
899     * Deletes from instance DB all closed processes that are created based
900     * on given process definition.
901     *
902     * @param t SharkTransaction.
903     * @param pkgId package Id for process mgr.
904     * @param pDefId process definition Id.
905     * @throws BaseException If something unexpected happens.
906     * @throws NotConnected If user wasn't connected (the connect()
907     * wasn't called or authentication failed).
908     */

909    void deleteClosedProcesses (SharkTransaction t,String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException, NotConnected;
910
911    /**
912     * Deletes closed process with a given Id from instance DB.
913     *
914     * @param procId process instance Id.
915     * @throws BaseException If something unexpected happens.
916     * @throws NotConnected If user wasn't connected (the connect()
917     * wasn't called or authentication failed).
918     */

919    void deleteClosedProcess (String JavaDoc procId) throws BaseException, NotConnected;
920
921    /**
922     * Deletes closed process with a given Id from instance DB.
923     *
924     * @param t SharkTransaction.
925     * @param procId process instance Id.
926     * @throws BaseException If something unexpected happens.
927     * @throws NotConnected If user wasn't connected (the connect()
928     * wasn't called or authentication failed).
929     */

930    void deleteClosedProcess (SharkTransaction t,String JavaDoc procId) throws BaseException, NotConnected;
931
932    /**
933     * @return unbound assignment iterator
934     * @throws NotConnected
935     * @throws BaseException
936     */

937    WfAssignmentIterator get_iterator_assignment() throws NotConnected, BaseException;
938    WfAssignmentIterator get_iterator_assignment(SharkTransaction t) throws NotConnected, BaseException;
939
940
941    /**
942     * @return unbound process iterator
943     * @throws NotConnected
944     * @throws BaseException
945     */

946    WfProcessIterator get_iterator_process() throws NotConnected, BaseException;
947    WfProcessIterator get_iterator_process(SharkTransaction t) throws NotConnected, BaseException;
948
949    /**
950     * @return unbound activity iterator
951     * @throws NotConnected
952     * @throws BaseException
953     */

954    WfActivityIterator get_iterator_activity() throws NotConnected, BaseException;
955    WfActivityIterator get_iterator_activity(SharkTransaction t) throws NotConnected, BaseException;
956 }
957
Popular Tags