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

All Superinterfaces:
BaseBusinessObject, java.io.Serializable, WfExecutionObject, WfRequester

public interface WfActivity
extends WfExecutionObject, WfRequester

OMG definition:WfActivity is a step in a process that is associated, as part of an aggregation, with a single WfProcess. It represents a request for work in the context of the containing WfProcess. There can be many active WfActivity objects within a WfProcess at a given point in time. The WfActivity interface specializes WfExecutionObject with an explicit complete operation to signal completion of the step, and with an operation to set the result of the WfActivity. It also adds relationships with WfProcess and WfAssignment.

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.


Method Summary
 void complete()
          This operation is used by an application to signal completion of the WfActivity.
 WfProcess container()
          This operation returns the WfProcess that this activity is a part of.
 WfAssignmentIterator get_iterator_assignment()
          Zero or more WfAssignments can be associated with a WfActivity.
 WfAssignment[] get_sequence_assignment(int max_number)
          Zero or more WfAssignments can be associated with a WfActivity.
 int how_many_assignment()
          Zero or more WfAssignments can be associated with a WfActivity.
 boolean is_member_of_assignment(WfAssignment member)
          Zero or more WfAssignments can be associated with a WfActivity.
 java.util.Map result()
          Represents the result produced by the realization of the work request represented by an activity.
 void set_result(java.util.Map result)
          The set_result operation is used to pass process data back to the workflow process.
 
Methods inherited from interface org.enhydra.shark.api.client.wfmodel.WfExecutionObject
abort, change_state, description, get_iterator_history, get_sequence_history, how_closed, how_many_history, is_member_of_history, key, last_state_time, name, priority, process_context, resume, set_description, set_name, set_priority, set_process_context, state, suspend, terminate, valid_states, while_open, why_not_running, workflow_state
 
Methods inherited from interface org.enhydra.shark.api.client.wfmodel.WfRequester
get_iterator_performer, get_sequence_performer, how_many_performer, is_member_of_performer, receive_event
 

Method Detail

how_many_assignment

int how_many_assignment()
                        throws java.lang.Exception
Zero or more WfAssignments can be associated with a 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 number of WfAssignments associated with an activity.

Throws:
java.lang.Exception

get_iterator_assignment

WfAssignmentIterator get_iterator_assignment()
                                             throws java.lang.Exception
Zero or more WfAssignments can be associated with a WfActivity. The association is established when the assignment is created as part of the resource selection process for the activity.

The following operation returns iterator for qurying associated assignments based on some criteria.

Throws:
java.lang.Exception

get_sequence_assignment

WfAssignment[] get_sequence_assignment(int max_number)
                                       throws java.lang.Exception
Zero or more WfAssignments can be associated with a WfActivity. The association is established when the assignment is created as part of the resource selection process for the activity.

The following operation returns max_number of WfAssignment objects associated with an activity. If max_number is less or eaqual to zero, or it is greater than the number of existing assignments, all associated WfAssignments objects will be returned.

Throws:
java.lang.Exception

is_member_of_assignment

boolean is_member_of_assignment(WfAssignment member)
                                throws java.lang.Exception
Zero or more WfAssignments can be associated with a WfActivity. The association is established when the assignment is created as part of the resource selection process for the activity.

The following operation returns true if given assignment is associated with activity.

Throws:
java.lang.Exception

container

WfProcess container()
                    throws java.lang.Exception
This operation returns the WfProcess that this activity is a part of.

Throws:
java.lang.Exception

result

java.util.Map result()
                     throws java.lang.Exception,
                            ResultNotAvailable
Represents the result produced by the realization of the work request represented by an activity. An implementation of the WfM Facility may or may not provide access to the result of an activity. If it does not, or if the result data are not available yet, a ResultNotAvailable exception is raised by the result access operation.

Throws:
java.lang.Exception
ResultNotAvailable

set_result

void set_result(java.util.Map result)
                throws java.lang.Exception,
                       InvalidData
The set_result operation is used to pass process data back to the workflow process. An InvalidData exception is raised when the data do not match the signature of the activity or when an invalid attempt is made to update the results of an activity; lack of access rights might be one of those reasons.

Throws:
java.lang.Exception
InvalidData

complete

void complete()
              throws java.lang.Exception,
                     CannotComplete
This operation is used by an application to signal completion of the WfActivity. It will be used together with the set_result operation to pass results of the activity back to the workflow process. A CannotComplete exception is raised when the activity cannot be completed yet.

Throws:
java.lang.Exception
CannotComplete