com.ibm.itim.apps.workflow
Class WorkflowProcessMO

java.lang.Object
  |
  +--com.ibm.itim.apps.workflow.WorkflowExecutionMO
        |
        +--com.ibm.itim.apps.workflow.WorkflowProcessMO

public class WorkflowProcessMO
extends WorkflowExecutionMO

Class that provides management capabilities for a workflow process.


Constructor Summary
WorkflowProcessMO(PlatformContext platform, javax.security.auth.Subject subject, long id)
          Constructs the the managed object with a platform context and a subject.
 
Method Summary
 void abort()
          Aborts the process.
 void auditEvent(EventAudit event)
          Places the given event in the audit trail (history) of the execution object.
 void execute(WorkflowSearchResultsMO results, java.util.Locale locale)
          Executes the search using the configured parameters.
 java.util.Collection getActivities()
          Returns the activities that are part of this process.
 WorkflowActivityMO getActivity(java.lang.String designId)
          Returns the activity of the process with the given ID.
 WorkflowActivityMO getActivity(java.lang.String designId, int index)
          Returns the activity of the process with the given ID and given index of the iteration of the loop the activity is involved in.
 java.util.Collection getChildren()
          Returns the child processes of this process (if any).
 WorkflowProcess getData()
          Returns the value object holding details about this process.
 java.util.List getHistory()
          Returns the history, or the audit trail for this process.
 WorkflowProcessMO getParent()
          Returns the parent process of this process (if any).
 
Methods inherited from class com.ibm.itim.apps.workflow.WorkflowExecutionMO
getID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowProcessMO

public WorkflowProcessMO(PlatformContext platform,
                         javax.security.auth.Subject subject,
                         long id)
Constructs the the managed object with a platform context and a subject.
Parameters:
platform - PlatformContext holding platform connection information.
subject - Subject representing the authenticated caller.
id - long representing the id of the process.
Method Detail

abort

public void abort()
           throws java.rmi.RemoteException,
                  ApplicationException
Aborts the process.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if an error was encountered trying to abort the process.

getActivities

public java.util.Collection getActivities()
                                   throws java.rmi.RemoteException,
                                          ApplicationException
Returns the activities that are part of this process.
Returns:
Collection of WorkflowActivityMOs.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to retrieve the process's activities.

execute

public void execute(WorkflowSearchResultsMO results,
                    java.util.Locale locale)
             throws java.rmi.RemoteException,
                    ApplicationException
Executes the search using the configured parameters. Note, not all objects that meet the search parameters will be accessible by the client. Those objects will not placed in the result set and no AuthorizationException will be thrown.
Parameters:
results - WorkflowSearchResultsMO to hold the results of the search. Note, if the WorkflowSearchResultsMO object was constructed using a different user context, that context will be changed to match the context of this object.
locale - User's locale to be sorted with.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to execute the search. This is most likely caused by an invalid parameter in the request.

getHistory

public java.util.List getHistory()
                          throws java.rmi.RemoteException,
                                 ApplicationException
Returns the history, or the audit trail for this process. The history is made up of a sequential list of audit records (EventAudit objects).
Overrides:
getHistory in class WorkflowExecutionMO
Returns:
List of EventAudit objects that represent the object's history.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if an error was encountered trying to retrieve the history.

auditEvent

public void auditEvent(EventAudit event)
                throws java.rmi.RemoteException,
                       ApplicationException
Places the given event in the audit trail (history) of the execution object.
Overrides:
auditEvent in class WorkflowExecutionMO
Parameters:
event - EventAudit representing the audited event.
Throws:
WorkflowException - Thrown if an error was encountered trying to audit the event.

getActivity

public WorkflowActivityMO getActivity(java.lang.String designId)
                               throws java.rmi.RemoteException,
                                      ApplicationException
Returns the activity of the process with the given ID. If the activity is involved in a loop, the first iteration will be returned.
Parameters:
id - String ID of the activity to retrieve as defined at design time.
Returns:
WorkflowActivityMO with the matching ID.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to retrieve the activity because of an invalid id.

getActivity

public WorkflowActivityMO getActivity(java.lang.String designId,
                                      int index)
                               throws java.rmi.RemoteException,
                                      ApplicationException
Returns the activity of the process with the given ID and given index of the iteration of the loop the activity is involved in.
Parameters:
id - String ID of the activity to retrieve as defined at design time.
index - Index of the loop iteration.
Returns:
WorkflowActivityMO with the matching ID and loop index.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to retrieve the activity because of an invalid id or loop index.

getParent

public WorkflowProcessMO getParent()
                            throws java.rmi.RemoteException,
                                   ApplicationException
Returns the parent process of this process (if any).
Returns:
WorkflowProcessMO of the parent process, null if none found.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to retrieve the process's parent process.

getChildren

public java.util.Collection getChildren()
                                 throws java.rmi.RemoteException,
                                        ApplicationException
Returns the child processes of this process (if any).
Returns:
Collection of WorkflowProcessMOs representing children (subflows) of the process.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to retrieve the process's child processes.

getData

public WorkflowProcess getData()
                        throws java.rmi.RemoteException,
                               ApplicationException
Returns the value object holding details about this process.
Returns:
WorkflowProcess value object.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to retrieve the process's value object.