org.enhydra.shark.api.client.wfmodel
Interface WfAssignment

All Superinterfaces:
BaseBusinessObject, java.io.Serializable

public interface WfAssignment
extends BaseBusinessObject

OMG definition: WfAssignment links WfActivity objects to WfResource objects. These links represent real assignments for enacting the activity. This interface may be specialized by resource management facilities that interpret the context of the activity to create and negotiate assignments with resources. Assignments are created as part of the resource selection process before an activity becomes ready for execution. The lifetime of an assignment is limited by that of the associated activity.

We extended OMG's interface by duplicating methods, and adding additional parameter that represents transaction. If you use methods without SharkTransaction parameter, the transaction will be implicitly created, and if you use it with SharkTransaction parameter you must obey to some rules explained in HowTo documentation.

Also, we added two additional methods for accepting assignment and getting accepted status.


Method Summary
 WfActivity activity()
          A WfAssignment is associated with one WfActivity; the association is established when the assignment is created as part of the resource selection process for the activity.
 WfResource assignee()
          A WfAssignment is associated with one WfResource.
 boolean get_accepted_status()
          Extension to OMG interface.
 void set_accepted_status(boolean accept)
          Extension to OMG interface.
 void set_assignee(WfResource new_value)
          A WfAssignment is associated with one WfResource.
 

Method Detail

activity

public WfActivity activity()
                    throws java.lang.Exception
A WfAssignment is associated with one WfActivity; the association is established when the assignment is created as part of the resource selection process for the activity. The following operation returns the associated WfActivity.

Throws:
java.lang.Exception

assignee

public WfResource assignee()
                    throws java.lang.Exception
A WfAssignment is associated with one WfResource. The association is established when the assignment is created as part of the resource selection process for the activity; the assignment can be reassigned to another resource at a later point in time. The following operation support the assignee relationship.

Throws:
java.lang.Exception

set_assignee

public void set_assignee(WfResource new_value)
                  throws java.lang.Exception,
                         InvalidResource
A WfAssignment is associated with one WfResource. The association is established when the assignment is created as part of the resource selection process for the activity; the assignment can be reassigned to another resource at a later point in time. The following operation support changing the assignee relationship. An InvalidResource exception is raised by an attempt to assign an invalid resource to the assignment.

Throws:
java.lang.Exception
InvalidResource

set_accepted_status

public void set_accepted_status(boolean accept)
                         throws java.lang.Exception,
                                CannotAcceptSuspended
Extension to OMG interface. Marks assignment's activity to be accepted by the assignment's assignee.

Throws:
java.lang.Exception
CannotAcceptSuspended

get_accepted_status

public boolean get_accepted_status()
                            throws java.lang.Exception
Extension to OMG interface. Returns if assignment is accepted.

Throws:
java.lang.Exception