KickJava   Java API By Example, From Geeks To Geeks.

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


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:WfActivity is a step in a process that is associated, as part of an aggregation, with a
11  single WfProcess. It represents a request for work in the context of the containing
12  WfProcess. There can be many active WfActivity objects within a WfProcess at a given
13  point in time.
14  The WfActivity interface specializes WfExecutionObject with an explicit complete
15  operation to signal completion of the step, and with an operation to set the result of the
16  WfActivity. It also adds relationships with WfProcess and WfAssignment.
17  <p>We extended OMG's interface by duplicating methods, and adding additional
18  parameter that represents transaction. If you use methods without SharkTransaction
19  parameter, the transaction will be implicitly created, and if you use it with
20  SharkTransaction parameter you must obey to some rules explained in HowTo documentation.
21  */

22 public interface WfActivity extends WfExecutionObject, WfRequester {
23
24    /**
25     Zero or more WfAssignments can be associated with a WfActivity. The association is
26     established when the assignment is created as part of the resource selection process for
27     the activity.
28     <p>The following operation returns the number of WfAssignments
29     associated with an activity.
30     */

31    int how_many_assignment () throws BaseException;
32
33    /**
34     Zero or more WfAssignments can be associated with a WfActivity. The association is
35     established when the assignment is created as part of the resource selection process for
36     the activity.
37     <p>The following operation returns the number of WfAssignments
38     associated with an activity.
39     */

40    int how_many_assignment (SharkTransaction t) throws BaseException;
41
42    /**
43     Zero or more WfAssignments can be associated with a WfActivity. The association is
44     established when the assignment is created as part of the resource selection process for
45     the activity.
46     <p>The following operation returns iterator for qurying associated
47     assignments based on some criteria.
48     */

49    WfAssignmentIterator get_iterator_assignment () throws BaseException;
50
51    /**
52     Zero or more WfAssignments can be associated with a WfActivity. The association is
53     established when the assignment is created as part of the resource selection process for
54     the activity.
55     <p>The following operation returns iterator for qurying associated
56     assignments based on some criteria.
57     */

58    WfAssignmentIterator get_iterator_assignment (SharkTransaction t) throws BaseException;
59
60    /**
61     Zero or more WfAssignments can be associated with a WfActivity. The association is
62     established when the assignment is created as part of the resource selection process for
63     the activity.
64     <p>The following operation returns max_number of WfAssignment objects
65     associated with an activity. If max_number is less or eaqual to zero, or it is
66     greater than the number of existing assignments, all associated WfAssignments
67     objects will be returned.
68     */

69    WfAssignment[] get_sequence_assignment (int max_number) throws BaseException;
70
71    /**
72     Zero or more WfAssignments can be associated with a WfActivity. The association is
73     established when the assignment is created as part of the resource selection process for
74     the activity.
75     <p>The following operation returns max_number of WfAssignment objects
76     associated with an activity. If max_number is less or eaqual to zero, or it is
77     greater than the number of existing assignments, all associated WfAssignments
78     objects will be returned.
79     */

80    WfAssignment[] get_sequence_assignment (SharkTransaction t,int max_number) throws BaseException;
81
82    /**
83     Zero or more WfAssignments can be associated with a WfActivity. The association is
84     established when the assignment is created as part of the resource selection process for
85     the activity.
86     <p>The following operation returns true if given assignment is
87     associated with activity.
88     */

89    boolean is_member_of_assignment (WfAssignment member) throws BaseException;
90
91    /**
92     Zero or more WfAssignments can be associated with a WfActivity. The association is
93     established when the assignment is created as part of the resource selection process for
94     the activity.
95     <p>The following operation returns true if given assignment is
96     associated with activity.
97     */

98    boolean is_member_of_assignment (SharkTransaction t,WfAssignment member) throws BaseException;
99
100    /** This operation returns the WfProcess that this activity is a part of. */
101    WfProcess container () throws BaseException;
102
103    /** This operation returns the WfProcess that this activity is a part of. */
104    WfProcess container (SharkTransaction t) throws BaseException;
105
106    /**
107     Represents the result produced by the realization of the work request represented by an
108     activity. An implementation of the WfM Facility may or may not provide access to the
109     result of an activity. If it does not, or if the result data are not available yet, a
110     ResultNotAvailable exception is raised by the result access operation.
111     */

112    Map JavaDoc result () throws BaseException, ResultNotAvailable;
113
114    /**
115     Represents the result produced by the realization of the work request represented by an
116     activity. An implementation of the WfM Facility may or may not provide access to the
117     result of an activity. If it does not, or if the result data are not available yet, a
118     ResultNotAvailable exception is raised by the result access operation.
119     */

120    Map JavaDoc result (SharkTransaction t) throws BaseException, ResultNotAvailable;
121
122    /**
123     The set_result operation is used to pass process data back to the workflow process.
124     An InvalidData exception is raised when the data do not match the signature of the
125     activity or when an invalid attempt is made to update the results of an activity; lack of
126     access rights might be one of those reasons.
127     */

128    void set_result (Map JavaDoc result) throws BaseException, InvalidData;
129
130    /**
131     The set_result operation is used to pass process data back to the workflow process.
132     An InvalidData exception is raised when the data do not match the signature of the
133     activity or when an invalid attempt is made to update the results of an activity; lack of
134     access rights might be one of those reasons.
135     */

136    void set_result (SharkTransaction t,Map JavaDoc result) throws BaseException, InvalidData;
137
138    /**
139     This operation is used by an application to signal completion of the WfActivity. It will
140     be used together with the set_result operation to pass results of the activity back to
141     the workflow process. A CannotComplete exception is raised when the activity
142     cannot be completed yet.
143     */

144    void complete () throws BaseException, CannotComplete;
145
146    /**
147     This operation is used by an application to signal completion of the WfActivity. It will
148     be used together with the set_result operation to pass results of the activity back to
149     the workflow process. A CannotComplete exception is raised when the activity
150     cannot be completed yet.
151     */

152    void complete (SharkTransaction t) throws BaseException, CannotComplete;
153
154 }
155
Popular Tags