com.filenet.wcm.toolkit.server.util.workflow
Class WcmWorkflowUtil

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.base.WcmDpContainer
      extended bycom.filenet.wcm.toolkit.server.base.WcmModule
          extended bycom.filenet.wcm.toolkit.server.util.workflow.WcmWorkflowUtil
All Implemented Interfaces:
WcmModuleInterface

public class WcmWorkflowUtil
extends WcmModule

Definition class for describing a workflow utility.


Field Summary
 
Fields inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
locale, NAME_DELIMITER
 
Constructor Summary
WcmWorkflowUtil()
          Default constructor.
 
Method Summary
 boolean doLaunchWorkflow(WcmEntryTemplate entryTemplate, java.lang.String objectStoreName, java.lang.String objectLabel, java.lang.String objectId, int objectType, java.lang.String returnUrl)
          Helper method to check to see if we need to show the participant selection ui before launching the workflow specified in the entry template.
 boolean doProcessParticipants(WcmEntryTemplate entryTemplate, java.lang.String objectStoreName, java.lang.String objectLabel, java.lang.String objectId, int objectType, java.lang.String returnUrl)
          Helper method to check to see if we need to show the participant selection ui before launching the workflow specifide in the entry template.
 boolean doProcessWorkflow(WcmEntryTemplate entryTemplate, java.lang.String returnUrl, java.lang.String objectStoreName, java.lang.String objectLabel, java.lang.String objectId, int objectType)
          Helper method to check to see if the Entry Template has a workflow specified to launch.
 java.lang.String getParticipantsXML(int includeType)
          Gathers the list of available participants and returns them in xml format.
 boolean isWorkflowRunning(java.lang.String workflowNumber)
          Helper method to determine if a workflow is currently running.
 void setAuthoringDataProvider(WcmAuthoringDataProvider dp)
          Set up the Authoring Data Provider.
 void setCreateWorkflowUrl(java.lang.String url)
          Set the jsp path to the create workflow jsp file.
 void setEProcessDataProvider(WcmEProcessDataProvider dp)
          Set up the EProcess Data Provider.
 void setObjectWorkflowNumber(java.lang.String objectStoreName, java.lang.String id, int type, java.lang.String attachmentId)
          Get the WorkflowNumber from the recently launched wotkflow and set the value on the initiatind document.
 void setWorkflowPromptUrl(java.lang.String url)
          Set the jsp path to the workflow prompt jsp file.
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
addChild, addChild, addChild, cleanup, debugTrace, getClassProperty, getClassProperty, getClassPropertyKeys, getConfiguration, getController, getDataStore, getModuleProperty, getModuleProperty, getModuleProperty, getModuleProperty, getModulePropertyKeys, getName, getParent, getWindowProperty, getWindowProperty, initialize, persist, queryDataProvider, setClassProperty, setClassProperty, setController, setModuleProperty, setModuleProperty, setName, setParent, setPortletParent, setWindowProperty
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmDpContainer
addDataProvider, addDataProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.filenet.wcm.toolkit.server.base.WcmModuleInterface
addDataProvider
 

Constructor Detail

WcmWorkflowUtil

public WcmWorkflowUtil()
Default constructor.

Method Detail

setAuthoringDataProvider

public void setAuthoringDataProvider(WcmAuthoringDataProvider dp)
Set up the Authoring Data Provider. If this is not being set before calling saveWorkflow method, the method will throw.

Parameters:
dp - Authoring Data Provider

setEProcessDataProvider

public void setEProcessDataProvider(WcmEProcessDataProvider dp)
Set up the EProcess Data Provider. If this is not being set before calling updateWorkflow method, the method will throw.

Parameters:
dp - EProcess Data Provider

setWorkflowPromptUrl

public void setWorkflowPromptUrl(java.lang.String url)
Set the jsp path to the workflow prompt jsp file.

Parameters:
url - String hold path to jsp.

setCreateWorkflowUrl

public void setCreateWorkflowUrl(java.lang.String url)
Set the jsp path to the create workflow jsp file.

Parameters:
url - String hold path to jsp.

setObjectWorkflowNumber

public void setObjectWorkflowNumber(java.lang.String objectStoreName,
                                    java.lang.String id,
                                    int type,
                                    java.lang.String attachmentId)
                             throws java.lang.Exception
Get the WorkflowNumber from the recently launched wotkflow and set the value on the initiatind document.

Parameters:
objectStoreName - String Object Store name
id - String object Id of the initiating document.
type - int Workplace object type
attachmentId - String holding attachmentId
Throws:
java.lang.Exception - upon validation errors.

isWorkflowRunning

public boolean isWorkflowRunning(java.lang.String workflowNumber)
                          throws java.lang.Exception
Helper method to determine if a workflow is currently running.

Parameters:
workflowNumber - String holding the workflow number to query for.
Returns:
boolean flag true if workflow is currently running, false otherwise
Throws:
java.lang.Exception - upon validation errors.

doProcessWorkflow

public boolean doProcessWorkflow(WcmEntryTemplate entryTemplate,
                                 java.lang.String returnUrl,
                                 java.lang.String objectStoreName,
                                 java.lang.String objectLabel,
                                 java.lang.String objectId,
                                 int objectType)
                          throws java.lang.Exception
Helper method to check to see if the Entry Template has a workflow specified to launch.

Parameters:
entryTemplate - The Entry Template.
returnUrl - String hold url to return to after finished processing
objectStoreName - The name of the object store
objectLabel - The object label
objectId - The object id
objectType - The object type
Returns:
boolean flag true if page redirect happens with in method, false otherwise
Throws:
java.lang.Exception - upon validation errors.

doProcessParticipants

public boolean doProcessParticipants(WcmEntryTemplate entryTemplate,
                                     java.lang.String objectStoreName,
                                     java.lang.String objectLabel,
                                     java.lang.String objectId,
                                     int objectType,
                                     java.lang.String returnUrl)
                              throws java.lang.Exception
Helper method to check to see if we need to show the participant selection ui before launching the workflow specifide in the entry template.

Parameters:
entryTemplate - The Entry Template.
objectStoreName - String holding objectstore name of item just added
objectLabel - String holding object name of item just added
objectId - String holding object id of item just added
objectType - int holding object type of item just added
returnUrl - String hold url to return to after finished processing
Returns:
boolean flag true if page redirect happens with in method, false otherwise
Throws:
java.lang.Exception - upon validation errors.

doLaunchWorkflow

public boolean doLaunchWorkflow(WcmEntryTemplate entryTemplate,
                                java.lang.String objectStoreName,
                                java.lang.String objectLabel,
                                java.lang.String objectId,
                                int objectType,
                                java.lang.String returnUrl)
                         throws java.lang.Exception
Helper method to check to see if we need to show the participant selection ui before launching the workflow specified in the entry template. If the Workflow is selected from the "Custom" options, check to see if we need to show the Launch processors sp[ecified in the Workflow.

Parameters:
entryTemplate - The Entry Template.
objectStoreName - String holding objectstore name of item just added
objectLabel - String holding object name of item just added
objectId - String holding object id of item just added
objectType - int holding object type of item just added
returnUrl - String hold url to return to after finished processing
Returns:
boolean flag true if page redirect happens with in method, false otherwise
Throws:
java.lang.Exception - upon validation errors.

getParticipantsXML

public java.lang.String getParticipantsXML(int includeType)
                                    throws java.lang.Exception
Gathers the list of available participants and returns them in xml format.

Parameters:
includeType - int to indicate what type of items to return in the list 0 - users 1 - groups 2 - users and groups
Returns:
String hold xml content fo participants list.
Throws:
java.lang.Exception - upon validation errors.


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.