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

Provides management capabilities for the workflow process such as retrieving process details, retrieving parent container process, retrieving activities associated with this process, aborting process, retrieving children processes.


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 pending 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.
 void findAllFailedActivities(WorkflowSearchResultsMO results, java.util.Locale locale, java.lang.String sortBy, int sortOrder)
          Executes the search for failed subprocesses and activities 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 design id.
 WorkflowActivityMO getActivity(java.lang.String designId, int index)
          Returns the activity of the process with the given design 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 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) otherwise null will be returned if this is the root process or none found.
 
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 pending process. The status of this completed process will be set to failed.

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 WorkflowActivityMO.
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 provides accessor methods to retrieve results (Collection of Activity) of the search.
locale - User's locale to sort with. null value defaults to Locale.US
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.

findAllFailedActivities

public void findAllFailedActivities(WorkflowSearchResultsMO results,
                                    java.util.Locale locale,
                                    java.lang.String sortBy,
                                    int sortOrder)
                             throws java.rmi.RemoteException,
                                    ApplicationException
Executes the search for failed subprocesses and activities 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 provides accessor methods to retrieve results (Collection of RecordDetail) of the search.
locale - User's locale to sort with. null value defaults to Locale.US
sortBy - The column to be sorted
sortOrder - int representing the sorting order.0 is for ascending order, and 1 for descending order.
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).

Specified by:
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.

Specified by:
auditEvent in class WorkflowExecutionMO
Parameters:
event - EventAudit representing the audited event.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - 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 design id. If the activity is involved in a loop, the first iteration will be returned.

Parameters:
designId - Design id of the activity to retrieve as defined at design time.
Returns:
WorkflowActivityMO with the matching design 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 design id and given index of the iteration of the loop the activity is involved in.

Parameters:
designId - Design id of the activity to retrieve as defined at design time.
index - Index of the loop iteration.
Returns:
WorkflowActivityMO with the matching design 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) otherwise null will be returned if this is the root process or none found.

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 WorkflowProcessMO 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 details about this process.

Returns:
WorkflowProcess details.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to retrieve the process details.


IBM Tivoli Identity Manager 4.6
© Copyright International Business Machines Corporation 2005. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.