01: package org.enhydra.shark.api.client.wfmodel;
02:
03: import org.enhydra.shark.api.client.wfbase.BaseBusinessObject;
04:
05: /**
06: * OMG definition: WfAssignment links WfActivity objects to WfResource objects. These
07: * links represent real assignments for enacting the activity. This interface may be
08: * specialized by resource management facilities that interpret the context of the
09: * activity to create and negotiate assignments with resources. Assignments are created as
10: * part of the resource selection process before an activity becomes ready for execution.
11: * The lifetime of an assignment is limited by that of the associated activity.
12: * <p>
13: * We extended OMG's interface by duplicating methods, and adding additional parameter
14: * that represents transaction. If you use methods without SharkTransaction parameter, the
15: * transaction will be implicitly created, and if you use it with SharkTransaction
16: * parameter you must obey to some rules explained in HowTo documentation.
17: * <p>
18: * Also, we added two additional methods for accepting assignment and getting accepted
19: * status.
20: */
21: public interface WfAssignment extends BaseBusinessObject {// , PersistenceInterface
22: /**
23: * A WfAssignment is associated with one WfActivity; the association is established
24: * when the assignment is created as part of the resource selection process for the
25: * activity. The following operation returns the associated WfActivity.
26: */
27: WfActivity activity() throws Exception;
28:
29: /**
30: * A WfAssignment is associated with one WfResource. The association is established
31: * when the assignment is created as part of the resource selection process for the
32: * activity; the assignment can be reassigned to another resource at a later point in
33: * time. The following operation support the assignee relationship.
34: */
35: WfResource assignee() throws Exception;
36:
37: /**
38: * A WfAssignment is associated with one WfResource. The association is established
39: * when the assignment is created as part of the resource selection process for the
40: * activity; the assignment can be reassigned to another resource at a later point in
41: * time. The following operation support changing the assignee relationship. An
42: * InvalidResource exception is raised by an attempt to assign an invalid resource to
43: * the assignment.
44: */
45: void set_assignee(WfResource new_value) throws Exception,
46: InvalidResource;
47:
48: // doesn't exist in original OMG spec - should we remove it???
49: /**
50: * Extension to OMG interface. Marks assignment's activity to be accepted by the
51: * assignment's assignee.
52: */
53: void set_accepted_status(boolean accept) throws Exception,
54: CannotAcceptSuspended;
55:
56: /**
57: * Extension to OMG interface. Returns if assignment is accepted.
58: */
59: boolean get_accepted_status() throws Exception;
60:
61: } // interface WfAssignment
|