Collaboration API Documentation

com.filenet.bso.api.util
Class BsoEProcessUtil

java.lang.Object
  |
  +--com.filenet.bso.api.util.BsoEProcessUtil

public class BsoEProcessUtil
extends java.lang.Object

The BsoEProcessUtil class provides a set of static helper methods for the Process Java API.


Method Summary
static filenet.vw.api.VWStepElement createWorkflow(filenet.vw.api.VWSession vwSession, com.filenet.wcm.api.ObjectStore store, java.lang.String workflowID, boolean useLatestVersion, java.util.Map parameterMap)
          Creates a workflow, but does not launch it.
static filenet.vw.api.VWStepElement createWorkflowFromSubscription(filenet.vw.api.VWSession vwSession, com.filenet.wcm.api.WorkflowSubscription wfs, java.util.Map parameterMap)
          Creates a workflow, but does not launch it, from a WorkflowSubscription object.
static filenet.vw.api.VWStepElement doLaunchWorkflowFromSubscription(filenet.vw.api.VWSession vwSession, com.filenet.wcm.api.WorkflowSubscription wfs, BsoPropertyMap parameterMap)
          Launches a workflow from a given WorkflowSubscription object.
static filenet.vw.api.VWStepElement doLaunchWorkflowFromSubscription(filenet.vw.api.VWSession vwSession, com.filenet.wcm.api.WorkflowSubscription wfs, java.util.Map parameterMap)
          Launches a workflow from a given WorkflowSubscription object.
static void doLaunchWorkflowFromSubscription(filenet.vw.api.VWSession vwSession, com.filenet.wcm.api.WorkflowSubscriptions wfss, java.lang.String subscriptionName, BsoPropertyMap parameterMap)
          Based on subscription name, launches a workflow from a given set of WorkflowSubscription objects.
static java.util.Map getStepParameters(filenet.vw.api.VWStepElement step, int paramType, int fieldType)
          Retrieves all available workflow parameters of a given parameter type and field type from a VWStepElement object.
static BsoWorkflow getWorkflowFromClass(filenet.vw.api.VWSession vwSession, com.filenet.wcm.api.ObjectStore objStore, java.lang.String className, int[] classType, java.lang.String subscriptionName)
          Based on a given class name and type, retrieves a WorkflowSubscription object attached to the given Content Engine class and encapsulates the object in a BsoWorkflow Java object.
static com.filenet.wcm.api.WorkflowSubscriptions getWorkflowSubscriptionsFromClass(filenet.vw.api.VWSession vwSession, com.filenet.wcm.api.ObjectStore objectStore, java.lang.String className, int[] classType)
          Returns a collection of WorkflowSubscription objects that are associated with a Content Engine document class.
static void setWorkflowParameters(filenet.vw.api.VWStepElement wfStep, BsoPropertyMap parameterMap)
          Sets the parameter values for a workflow step.
static void setWorkflowParameters(filenet.vw.api.VWStepElement wfStep, java.util.Map parameterMap)
          Sets parameter values for a workflow step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doLaunchWorkflowFromSubscription

public static void doLaunchWorkflowFromSubscription(filenet.vw.api.VWSession vwSession,
                                                    com.filenet.wcm.api.WorkflowSubscriptions wfss,
                                                    java.lang.String subscriptionName,
                                                    BsoPropertyMap parameterMap)
                                             throws filenet.vw.api.VWException
Based on subscription name, launches a workflow from a given set of WorkflowSubscription objects.

If the parameterMap parameter is not null, it contains a set of name:value pairs that will be set into the workflow if and only if the key names match workflow parameters names.

If one of the entries in the parameterMap parameter has a value to be placed into a workflow parameter field where the field type is VWFieldType.FIELD_TYPE_PARTICIPANT, the value of the Map entry may either be of the class VWParticipant[] or String[]. If the value is of class String[], the String[] values are converted into VWParticipant[] values before being set into the workflow parameter field.

Parameters:
vwSession - A VWSession object representing the active VW session.

wfss - A collection of WorkflowSubscription objects.

subscriptionName - A String containing the name used to select a WorkflowSubscription object from the collection.

parameterMap - A set of parameter values to pass to the workflow.

Throws:
filenet.vw.api.VWException - Thrown if an error occurs during the workflow launch.

doLaunchWorkflowFromSubscription

public static filenet.vw.api.VWStepElement doLaunchWorkflowFromSubscription(filenet.vw.api.VWSession vwSession,
                                                                            com.filenet.wcm.api.WorkflowSubscription wfs,
                                                                            BsoPropertyMap parameterMap)
                                                                     throws filenet.vw.api.VWException
Launches a workflow from a given WorkflowSubscription object.

If the parameterMap parameter is not null, it contains a set of name:value pairs that will be set into the workflow if and only if the key names match workflow parameters names.

If one of the entries in the parameterMap parameter has a value to be placed into a workflow parameter field where the field type is VWFieldType.FIELD_TYPE_PARTICIPANT, the value of the Map entry may either be of the class VWParticipant[] or String[]. If the value is of class String[], the String[] values are converted into VWParticipant[] values before being set into the workflow parameter field.

Parameters:
vwSession - A VWSession object representing the active VW session.

wfs - A WorkflowSubscription object.

parameterMap - A set of parameter values to pass to the workflow.

Returns:
A VWStepElement object, representing the launch step of the workflow.

Throws:
filenet.vw.api.VWException - Thrown if the create or launch fails.

doLaunchWorkflowFromSubscription

public static filenet.vw.api.VWStepElement doLaunchWorkflowFromSubscription(filenet.vw.api.VWSession vwSession,
                                                                            com.filenet.wcm.api.WorkflowSubscription wfs,
                                                                            java.util.Map parameterMap)
                                                                     throws filenet.vw.api.VWException
Launches a workflow from a given WorkflowSubscription object.

If the parameterMap parameter is not null, it contains a set of name:value pairs that will be set into the workflow if and only if the key names match workflow parameters names.

If one of the entries in the parameterMap parameter has a value to be placed into a workflow parameter field where the field type is VWFieldType.FIELD_TYPE_PARTICIPANT, the value of the Map entry may either be of the class VWParticipant[] or String[]. If the value is of class String[], the String[] values are converted into VWParticipant[] values before being set into the workflow parameter field.

Parameters:
vwSession - A VWSession object representing the active VW session.

wfs - A WorkflowSubscription object.

parameterMap - A set of parameter values to pass to the workflow.

Returns:
A VWStepElement object, representing the launch step of the workflow.

Throws:
filenet.vw.api.VWException - Thrown if the create of launch fails.

createWorkflowFromSubscription

public static filenet.vw.api.VWStepElement createWorkflowFromSubscription(filenet.vw.api.VWSession vwSession,
                                                                          com.filenet.wcm.api.WorkflowSubscription wfs,
                                                                          java.util.Map parameterMap)
                                                                   throws filenet.vw.api.VWException
Creates a workflow, but does not launch it, from a WorkflowSubscription object. To launch the workflow, call the doDispatch() method of the returned VWStepElement object.

If the parameterMap parameter is not null, it contains a set of name:value pairs that will be set into the workflow if and only if the key names match workflow parameters names.

If one of the entries in the parameterMap parameter has a value to be placed into a workflow parameter field where the field type is VWFieldType.FIELD_TYPE_PARTICIPANT, the value of the Map entry may either be of the class VWParticipant[] or String[]. If the value is of class String[], the String[] values are converted into VWParticipant[] values before being set into the workflow parameter field.

Parameters:
vwSession - A VWSession object representing the active VW session.

wfs - A WorkflowSubscription object.

parameterMap - A set of parameter values to pass to the workflow.

Returns:
A VWStepElement object, representing the launch step.

Throws:
filenet.vw.api.VWException - Thrown if the create operation fails.

createWorkflow

public static filenet.vw.api.VWStepElement createWorkflow(filenet.vw.api.VWSession vwSession,
                                                          com.filenet.wcm.api.ObjectStore store,
                                                          java.lang.String workflowID,
                                                          boolean useLatestVersion,
                                                          java.util.Map parameterMap)
                                                   throws filenet.vw.api.VWException
Creates a workflow, but does not launch it. The workflow created is retrieved via the ObjectStore and WorkFlow Definition ID. If the parameter useLatestVersion is true, the method retrieves not the specific Workflow Definition Content Engine object identified by the ID, but the current version of the Workflow Definition. To launch the workflow, call the doDispatch() method of the returned VWStepElement object.

If the parameterMap parameter is not null, it contains a set of name:value pairs that will be set into the workflow if and only if the key names match workflow parameters names.

If one of the entries in the parameterMap parameter has a value to be placed into a workflow parameter field where the field type is VWFieldType.FIELD_TYPE_PARTICIPANT, the value of the Map entry may either be of the class VWParticipant[] or String[]. If the value is of class String[], the String[] values are converted into VWParticipant[] values before being set into the workflow parameter field.

Parameters:
vwSession - A VWSession object representing the active VW session.

store - An ObjectStore object.

workflowID - A GUID to a WorkflowDefinition object.

useLatestVersion - A boolean which determines which version of the WorkflowDefinition object is useed.

parameterMap - A set of parameter values to pass to the workflow.

Returns:
A VWStepElement object, representing the launch step.

Throws:
filenet.vw.api.VWException - Thrown if the create operation fails.

getWorkflowFromClass

public static BsoWorkflow getWorkflowFromClass(filenet.vw.api.VWSession vwSession,
                                               com.filenet.wcm.api.ObjectStore objStore,
                                               java.lang.String className,
                                               int[] classType,
                                               java.lang.String subscriptionName)
Based on a given class name and type, retrieves a WorkflowSubscription object attached to the given Content Engine class and encapsulates the object in a BsoWorkflow Java object.

Parameters:
vwSession - A VWSession object representing the active VW session.

objStore - An ObjectStore object that represents the Content Engine object store from which to retrieve the workflow.

className - The name of a document class or folder class from which to retrieve the workflow subscription.

classType - An int array of Content Java API class types, such as document or folder.

subscriptionName - The name of Workflow Subscription.

Returns:
A BsoWorkflow object that represents a workflow subscription attached to a Content Engine class.

getWorkflowSubscriptionsFromClass

public static com.filenet.wcm.api.WorkflowSubscriptions getWorkflowSubscriptionsFromClass(filenet.vw.api.VWSession vwSession,
                                                                                          com.filenet.wcm.api.ObjectStore objectStore,
                                                                                          java.lang.String className,
                                                                                          int[] classType)
Returns a collection of WorkflowSubscription objects that are associated with a Content Engine document class.

Parameters:
vwSession - A VWSession object representing the active VW session.

objectStore - The Content Engine ObjectStore object.

documentClass - The Content Engine document class name, which is the source of the WorkflowSubscription objects.

Returns:
A collection of WorkflowSubscription objects that are attached to the document class.

setWorkflowParameters

public static void setWorkflowParameters(filenet.vw.api.VWStepElement wfStep,
                                         BsoPropertyMap parameterMap)
                                  throws filenet.vw.api.VWException
Sets the parameter values for a workflow step.

If one of the entries in the parameterMap parameter has a value to be placed into a workflow parameter field where the field type is VWFieldType.FIELD_TYPE_PARTICIPANT, the value of the Map entry may either be of the class VWParticipant[] or String[]. If the value is of class String[], the String[] values are converted into VWParticipant[] values before being set into the workflow parameter field.

Parameters:
wfStep - A VWStepElement object. Cannot be null.

parameterMap - A set of parameter name:value pairs.

Throws:
filenet.vw.api.VWException - Thrown if an error occurs during the workflow launch.

setWorkflowParameters

public static void setWorkflowParameters(filenet.vw.api.VWStepElement wfStep,
                                         java.util.Map parameterMap)
                                  throws filenet.vw.api.VWException
Sets parameter values for a workflow step.

Parameters:
wfStep - A VWStepElement object.

parameterMap - A set of parameter name:value pairs.

Throws:
filenet.vw.api.VWException - Thrown if an error occurs during the workflow launch.

getStepParameters

public static java.util.Map getStepParameters(filenet.vw.api.VWStepElement step,
                                              int paramType,
                                              int fieldType)
                                       throws filenet.vw.api.VWException
Retrieves all available workflow parameters of a given parameter type and field type from a VWStepElement object.

Parameters:
step - The VWStepElement from which to retrieve parameters.

paramType - The type of parameter to return: VWFieldType.ALL_FIELD_TYPES, VWFieldType.FIELD_TYPE_*, etc.

fieldType - The type of field to return: VWStepElement.FIELD_SYSTEM_DEFINED, VWStepElement.FIELD_USER_DEFINED, VWStepElement.FIELD_USER_AND_SYSTEM_DEFINED.

Returns:
A Java Map object containing the workflow parameter field names and their associated values.

Throws:
filenet.vw.api.VWException - Thrown if an error occurs during parameter retrieval.

Collaboration API Documentation

Copyright © 2002 - 2004 FileNet Corporation. All rights reserved.