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

All Superinterfaces:
BaseBusinessObject, java.io.Serializable

public interface WfProcessMgr
extends BaseBusinessObject

OMG definition: A WfProcessMgr represents a template for a specific workflow process; it is used to create instances of a workflow process. Logically it is the factory and locator for WfProcess instances. It provides access to the meta information about the context a process requires and the result a process produces. A process manager is identified by its name which is unique within a given business domain. It could located, for example, via name using the OMG Naming Service, via name and other attributes (e.g., category) via the OMG Trader Service, or other infrastructure mechanisms.

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
 java.lang.String category()
          The category of a process manager is used for classification of process types.
 java.util.Map context_signature()
          Meta information that defines how to set the context of an instance of this interface is returned by this operation.
 WfProcess create_process(WfRequester requester)
          This operation is used to create instances of a process model and link its requester.
 java.lang.String description()
          Returns description of the process manager.
 WfProcessIterator get_iterator_process()
          Zero or more WfProcesses are associated with the WfProcessMgr that was used to create them.
 WfProcess[] get_sequence_process(int max_number)
          Zero or more WfProcesses are associated with the WfProcessMgr that was used to create them.
 int how_many_process()
          Zero or more WfProcesses are associated with the WfProcessMgr that was used to create them.
 boolean is_member_of_process(WfProcess member)
          Zero or more WfProcesses are associated with the WfProcessMgr that was used to create them.
 java.lang.String name()
          Returns the name of the process manager.
 process_mgr_stateType process_mgr_state()
          A WfProcessMgr can be enabled or disabled.
 java.util.Map result_signature()
          Meta information that defines how to return the result of an instance of this interface is returned by this operation.
 void set_process_mgr_state(process_mgr_stateType new_state)
          A WfProcessMgr can be enabled or disabled.
 java.lang.String version()
          The version attribute of a process manager is used to distinguish between different versions of a process model.
 

Method Detail

how_many_process

public int how_many_process()
                     throws java.lang.Exception
Zero or more WfProcesses are associated with the WfProcessMgr that was used to create them. The association is established when a WfProcess is created.

The following operation provide the information about the number of WfProcess items associated with a WfProcessMgr.

Throws:
java.lang.Exception

get_iterator_process

public WfProcessIterator get_iterator_process()
                                       throws java.lang.Exception
Zero or more WfProcesses are associated with the WfProcessMgr that was used to create them. The association is established when a WfProcess is created.

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

Throws:
java.lang.Exception

get_sequence_process

public WfProcess[] get_sequence_process(int max_number)
                                 throws java.lang.Exception
Zero or more WfProcesses are associated with the WfProcessMgr that was used to create them. The association is established when a WfProcess is created.

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

Throws:
java.lang.Exception

is_member_of_process

public boolean is_member_of_process(WfProcess member)
                             throws java.lang.Exception
Zero or more WfProcesses are associated with the WfProcessMgr that was used to create them. The association is established when a WfProcess is created.

The following operation returns true if given process is associated with WfProcessMgr.

Throws:
java.lang.Exception

process_mgr_state

public process_mgr_stateType process_mgr_state()
                                        throws java.lang.Exception
A WfProcessMgr can be enabled or disabled. This method returns its current state.

Throws:
java.lang.Exception

set_process_mgr_state

public void set_process_mgr_state(process_mgr_stateType new_state)
                           throws java.lang.Exception,
                                  TransitionNotAllowed
A WfProcessMgr can be enabled or disabled. This method sets its state.

Throws:
java.lang.Exception
TransitionNotAllowed

name

public java.lang.String name()
                      throws java.lang.Exception
Returns the name of the process manager. The name uniquely identifies the process manager in a business domain. It is set when the process manager is initialized and cannot be modified.

Throws:
java.lang.Exception

description

public java.lang.String description()
                             throws java.lang.Exception
Returns description of the process manager. It is set when the process manager is initialized and cannot be modified.

Throws:
java.lang.Exception

category

public java.lang.String category()
                          throws java.lang.Exception
The category of a process manager is used for classification of process types. It is set when the process manager is initialized and cannot be modified.

Throws:
java.lang.Exception

version

public java.lang.String version()
                         throws java.lang.Exception
The version attribute of a process manager is used to distinguish between different versions of a process model. Note that this is a means to distinguish between different process managers that have the same name; it is left to the implementation to define the format of the version attribute. It is set when the process manager is initialized and cannot be modified.

Throws:
java.lang.Exception

context_signature

public java.util.Map context_signature()
                                throws java.lang.Exception
Meta information that defines how to set the context of an instance of this interface is returned by this operation.

The Map entry identifies the name and the data type (represented by its string name) of the data item. Map contains an entry for each data item in the set of context.

Throws:
java.lang.Exception

result_signature

public java.util.Map result_signature()
                               throws java.lang.Exception
Meta information that defines how to return the result of an instance of this interface is returned by this operation.

The Map entry identifies the name and the data type (represented by its string name) of the data item. Map contains an entry for each data item in the set of result data for the WfProcess.

Throws:
java.lang.Exception

create_process

public WfProcess create_process(WfRequester requester)
                         throws java.lang.Exception,
                                NotEnabled,
                                InvalidRequester,
                                RequesterRequired
This operation is used to create instances of a process model and link its requester. When the process is created it enters state not_running.not_started.

It is up to the implementation of the WfM Facility to decide which WfRequester objects to accept or not. When a WfRequester is rejected, the invoking application might decide not to register a WfRequester with the WfProcess.

Parameters:
requester - a WfRequester
Returns:
a WfProcess
Throws:
java.lang.Exception
NotEnabled - raised when the process manager is disabled.
InvalidRequester - raised when a WfRequester is being identified that cannot be a 'parent' of instances of the process model.
RequesterRequired - raised when the process definition requires a WfRequester and an invalid WfRequester is supplied in the parameter.