KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
8  OMG definition: WfAssignment links WfActivity objects to WfResource objects. These links represent
9  real assignments for enacting the activity. This interface may be specialized by
10  resource management facilities that interpret the context of the activity to create and
11  negotiate assignments with resources.
12  Assignments are created as part of the resource selection process before an activity
13  becomes ready for execution. The lifetime of an assignment is limited by that of the
14  associated activity.
15  <p>We extended OMG's interface by duplicating methods, and adding additional
16  parameter that represents transaction. If you use methods without SharkTransaction
17  parameter, the transaction will be implicitly created, and if you use it with
18  SharkTransaction parameter you must obey to some rules explained in HowTo documentation.
19  <p>Also, we added two additional methods for accepting assignment and getting accepted status.
20  */

21 public interface WfAssignment extends BaseBusinessObject {//, PersistenceInterface
22
/**
23     A WfAssignment is associated with one WfActivity; the association is established when
24     the assignment is created as part of the resource selection process for the activity. The
25     following operation returns the associated WfActivity.
26     */

27    WfActivity activity () throws BaseException;
28    /**
29     A WfAssignment is associated with one WfActivity; the association is established when
30     the assignment is created as part of the resource selection process for the activity. The
31     following operation returns the associated WfActivity.
32     */

33    WfActivity activity (SharkTransaction t) throws BaseException;
34
35    /**
36     A WfAssignment is associated with one WfResource. The association is established
37     when the assignment is created as part of the resource selection process for the
38     activity; the assignment can be reassigned to another resource at a later point in time.
39     The following operation support the assignee relationship.
40     */

41    WfResource assignee () throws BaseException;
42
43    /**
44     A WfAssignment is associated with one WfResource. The association is established
45     when the assignment is created as part of the resource selection process for the
46     activity; the assignment can be reassigned to another resource at a later point in time.
47     The following operation support the assignee relationship.
48     */

49    WfResource assignee (SharkTransaction t) throws BaseException;
50
51    /**
52     A WfAssignment is associated with one WfResource. The association is established
53     when the assignment is created as part of the resource selection process for the
54     activity; the assignment can be reassigned to another resource at a later point in time.
55     The following operation support changing the assignee relationship. An InvalidResource
56     exception is raised by an attempt to assign an invalid resource to the assignment.
57     */

58    void set_assignee (WfResource new_value) throws BaseException, InvalidResource;
59
60    /**
61     A WfAssignment is associated with one WfResource. The association is established
62     when the assignment is created as part of the resource selection process for the
63     activity; the assignment can be reassigned to another resource at a later point in time.
64     The following operation support changing the assignee relationship. An InvalidResource
65     exception is raised by an attempt to assign an invalid resource to the assignment.
66     */

67    void set_assignee (SharkTransaction t,WfResource new_value) throws BaseException, InvalidResource;
68
69    // doesn't exist in original OMG spec - should we remove it???
70
/**
71     Extension to OMG interface. Marks assignment's activity to be accepted by
72     the assignment's assignee.
73     */

74    void set_accepted_status (boolean accept) throws BaseException, CannotAcceptSuspended;
75
76    /**
77     Extension to OMG interface. Marks assignment's activity to be accepted by
78     the assignment's assignee.
79     */

80    void set_accepted_status (SharkTransaction t,boolean accept) throws BaseException, CannotAcceptSuspended;
81
82    /**
83     Extension to OMG interface. Returns if assignment is accepted.
84     */

85    boolean get_accepted_status () throws BaseException;
86
87    /**
88     Extension to OMG interface. Returns if assignment is accepted.
89     */

90    boolean get_accepted_status (SharkTransaction t) throws BaseException;
91
92 } // interface WfAssignment
93
Popular Tags