com.ibm.itim.workflow.model
Class ProcessManager

java.lang.Object
  |
  +--com.ibm.itim.workflow.model.ProcessManager

public class ProcessManager
extends java.lang.Object

Class that provides the interface for creating and querying workflow processes within the workflow engine. When creating a workflow process, the type of process to create must be registered with the engine prior to the creation call.

This registration is done through the use of the enroleworkflow.properties file. This file is in standard Java properties file format <key>=<value>, where the key is the workflow process type, and the value is the XML file holding the workflow definition of this process type. As an example, the registration of the add user and provision account workflow processes are shown below:

enrole.workflow.UA=adduser.xml
enrole.workflow.AA=provision.xml

See Also:
WorkflowProcessEntity

Constructor Summary
ProcessManager()
          Default constructor.
ProcessManager(DistinguishedName tenantDN)
          Constructs within the context of the given tenant.
 
Method Summary
 WorkflowProcessEntity createProcess(ProcessParticipant requester, InitialProcessContext context)
          Creates a process that satisfies the context provided.
 WorkflowProcessEntity createProcess(ProcessParticipant requester, java.lang.String type, java.util.Date scheduledTime)
          Creates a process of the given type.
 java.util.Collection getActiveProcesses(DistinguishedName tenant)
          Returns all of the active processes in the workflow engine.
 java.util.Collection getActiveProcesses(java.lang.String definitionId)
          Returns the active processes of the given definition id in the workflow engine.
 WorkflowProcessEntity getProcess(long id)
          Returns the process with the given ID.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessManager

public ProcessManager()
Default constructor.


ProcessManager

public ProcessManager(DistinguishedName tenantDN)
Constructs within the context of the given tenant. For use with multi-tenant deployments.

Parameters:
tenantDN - DistinguishedName of the tenant providing the context.
Method Detail

createProcess

public WorkflowProcessEntity createProcess(ProcessParticipant requester,
                                           java.lang.String type,
                                           java.util.Date scheduledTime)
                                    throws WorkflowException
Creates a process of the given type. No initial context is set for the process. The context must be set through the ProcessEntity interface after creation.

Parameters:
requester - ProcessParticipant representing the requester of the process.
type - Type of the process to create. This type must be registered with the workflow engine.
scheduledTime - The scheduled starting time of the process. If null, the process will start immediately. In case this method is invoked remotely, passing this parameter as the current data/time of the client machine is not a safe technique to use, since the date/time of the client machine may not be the same as the date/time of the ITIM server machine.
Returns:
WorkflowProcessEntity representing the created process.
Throws:
WorkflowException - Thrown if unable to create the process.

createProcess

public WorkflowProcessEntity createProcess(ProcessParticipant requester,
                                           InitialProcessContext context)
                                    throws WorkflowException
Creates a process that satisfies the context provided. The context indicates the type of process to create, its scheduled date, the relevant data to use as the process context, and other configurable items on the process.

Parameters:
requester - ProcessParticipant representing the requester of the process.
context - InitialProcessContext holding the configuration parameters of the process to create.
Returns:
WorkflowProcessEntity representing the created process.
Throws:
WorkflowException - Thrown if unable to create the process.

getProcess

public WorkflowProcessEntity getProcess(long id)
                                 throws WorkflowException
Returns the process with the given ID.

Returns:
WorkflowProcessEntity representing the process with the given ID, null if none found.
Throws:
WorkflowException - Thrown if unable retrieve the process.

getActiveProcesses

public java.util.Collection getActiveProcesses(DistinguishedName tenant)
                                        throws WorkflowException
Returns all of the active processes in the workflow engine.

Parameters:
tenant - DN of the tenant
Returns:
Collection of WorkflowProcessEntities representing active processes i.e processes having state as 'R','I' or 'S'.
Throws:
WorkflowException - Thrown if unable to return the active processes.

getActiveProcesses

public java.util.Collection getActiveProcesses(java.lang.String definitionId)
                                        throws WorkflowException
Returns the active processes of the given definition id in the workflow engine.

Parameters:
definitionId - Definition id of the processes to retrieve. Definition id uniquely identifies a workflow design or definition.
It can have the following values :
  • Value of the 'erglobalid' attribute of an operation entry stored in the directory server under 'ou=operations' folder.
    For example, the definitionId value "00000000000000000009" represents the workflow design of the default person add operation entry stored under 'ou=operations,ou=itim,ou=<tenant>' with the value of it's erglobalid attribute as "00000000000000000009" in the directory server.
  • String constant in the property names with prefix 'enrole.workflow.' defined in the file <ITIM_HOME>\data\enroleworkflow.properties.
    For example, for a definitionId say "RC" the file enroleworkflow.properties will have an entry such as the following -
           enrole.workflow.RC=reconciliation.xml.
    The enroleworkflow.properties file usually contains string constants for system processes like reconciliation.
  • Value of the 'erglobalid' attribute of an entitlement workflow entry stored in the directory server under 'ou=workflow' folder.
Returns:
Collection of WorkflowProcessEntities representing active processes i.e. processes having state as 'R','I' or 'S' of the given definition id.
Throws:
WorkflowException - Thrown if unable to return the active processes.


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.