KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.api.client.wfservice;
2
3 import org.enhydra.shark.api.SharkTransaction;
4 import org.enhydra.shark.api.client.wfbase.BaseException;
5 import org.enhydra.shark.api.common.DeadlineInfo;
6
7 /**
8  * Interface used to perform some administrative operations.
9  * @author Sasa Bojanic
10  * @author Vladimir Puskas
11  */

12 public interface DeadlineAdministration {
13
14    /**
15     * This method is used to let shark know who uses this API.
16     *
17     * @param userId String representing user Id.
18     *
19     */

20    void connect (String JavaDoc userId);
21
22    /**
23     When this operation is called, shark checks for deadlines of all
24     active activities for all active processes, and takes appropriate
25     action if deadlines are exceeded.
26     */

27    void checkDeadlines () throws BaseException;
28
29    /**
30     When this operation is called, shark checks for deadlines of all
31     active activities for all active processes, and takes appropriate
32     action if deadlines are exceeded.
33     */

34    void checkDeadlines (SharkTransaction t) throws BaseException;
35
36    /**
37     When this operation is called, shark checks for deadlines of all
38     active activities for the processes which Ids are given in a list,
39     and takes appropriate action if deadlines are exceeded.
40     */

41    void checkDeadlines (String JavaDoc[] procIds) throws BaseException;
42
43    /**
44     When this operation is called, shark checks for deadlines of all
45     active activities for the processes which Ids are given in a list,
46     and takes appropriate action if deadlines are exceeded.
47     */

48    void checkDeadlines (SharkTransaction t,String JavaDoc[] procIds) throws BaseException;
49
50    /**
51     When this operation is called, shark checks for deadlines of all
52     active activities for the process instance with a given Id, and takes appropriate
53     action if deadlines are exceeded.
54     */

55    void checkDeadlines (String JavaDoc procId) throws BaseException;
56
57    /**
58     When this operation is called, shark checks for deadlines of all
59     active activities for the process instance with a given Id, and takes appropriate
60     action if deadlines are exceeded.
61     */

62    void checkDeadlines (SharkTransaction t,String JavaDoc procId) throws BaseException;
63
64    /**
65     When this operation is called, shark checks for deadlines of an
66     activity specified by given parameters, and takes appropriate
67     action if deadlines are exceeded.
68     */

69    void checkDeadline (String JavaDoc procId,String JavaDoc actId) throws BaseException;
70
71    /**
72     When this operation is called, shark checks for deadlines of an
73     activity specified by given parameters, and takes appropriate
74     action if deadlines are exceeded.
75     */

76    void checkDeadline (SharkTransaction t,String JavaDoc procId,String JavaDoc actId) throws BaseException;
77
78    /**
79     When this operation is called, shark checks for deadlines of all
80     active activities for all active processes, and takes appropriate
81     action if deadlines are exceeded.
82     <p>This is an optimized version of the same method without parameters, and
83     user can decide how many process instances to handle before transaction is
84     commited, and how many possible failures (probably caused by process locking)
85     to ignore before returning the array of process ids that haven't suceeded
86     to be processed for a deadline.
87     */

88    String JavaDoc[] checkDeadlines (int instancesPerTransaction, int failuresToIgnore) throws BaseException;
89
90    /**
91     * Use in special use cases when reaching deadline actually means finishing the process.
92     */

93    String JavaDoc[] checkDeadlinesWithTermination() throws BaseException;
94
95    /**
96     * Returns information on all deadlines of a given process's active activities.
97     *
98     * @param procId Id of process instance
99     *
100     */

101    DeadlineInfo[] getDeadlineInfo(String JavaDoc procId) throws BaseException;
102
103    /**
104     * Returns information on all deadlines of a given process's active activities.
105     *
106     * @param t a SharkTransaction
107     * @param procId Id of process instance
108     *
109     */

110    DeadlineInfo[] getDeadlineInfo(SharkTransaction t,String JavaDoc procId) throws BaseException;
111
112    /**
113     * Returns information on all deadlines of a given activity.
114     *
115     * @param procId Id of process instance
116     * @param actId Id of activity instance
117     */

118    DeadlineInfo[] getDeadlineInfo(String JavaDoc procId, String JavaDoc actId) throws BaseException;
119
120    /**
121     * Returns information on all deadlines of a given activity.
122     *
123     * @param t a SharkTransaction
124     * @param procId Id of process instance
125     * @param actId Id of activity instance
126     */

127    DeadlineInfo[] getDeadlineInfo(SharkTransaction t,String JavaDoc procId, String JavaDoc actId) throws BaseException;
128    
129 }
130
Popular Tags