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

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.util.workflow.WcmWorkflowGenerator

public class WcmWorkflowGenerator
extends java.lang.Object

Helper class for generating workflow definitions from workflow template specifications.


Field Summary
static java.lang.String ATTACHMENT_NAME
           
static java.lang.String FIELD_VOTING
           
static java.lang.String MILESTONE
           
static java.util.Map WFT_NS
           
static java.lang.String WORKFLOW_GROUP
           
 
Constructor Summary
WcmWorkflowGenerator()
           
 
Method Summary
 java.lang.String checkinWorkflow(filenet.vw.api.VWSession vwSession, WcmWorkflowTemplate workflowTemplate, java.lang.String osName, java.lang.String reservationId, java.lang.String basePath)
          Checkin a VWWorkflowDefinition to the Content Engine.
static void createWorkflow(filenet.vw.api.VWSession vwSession, WcmWorkflowTemplate workflowTemplate)
          Create a VWWorkflowDefinition from a WcmWorkflowTemplate object.
 WcmWorkflowTemplate readWorkflow(filenet.vw.api.VWSession vwSession, java.lang.String osName, java.lang.String workflowId, java.lang.String style)
          Get the contents of the specified Workflow Definition from the Content Engine an load it into the application object structure.
 java.lang.String saveWorkflow(WcmWorkflowTemplate workflowTemplate, java.lang.String osName, java.lang.String folderId, java.lang.String basePath)
          Save a VWWorkflowDefinition to the Content Engine.
 void setAuthoringDataProvider(WcmAuthoringDataProvider dp)
          Set up the Authoring Data Provider.
 void setEProcessDataProvider(WcmEProcessDataProvider dp)
          Set up the EProcess Data Provider.
 void transferWorkflow(com.filenet.wcm.api.Session session, filenet.vw.api.VWSession vwSession, java.lang.String osName, java.lang.String id, java.lang.String vsId, WcmWorkflowTemplate workflowTemplate)
          Transfer a Workflow Defnition to the Process Engine.
 void updateWorkflow(WcmWorkflowTemplate workflowTemplate)
          Update the participants of the workflow group specified for each workflow step.
 void updateWorkflowFromXML(WcmWorkflowTemplate workflowTemplate, org.w3c.dom.Document domWorkflowTemplateXML)
          Updates the workflow template object with the information passed in the XML.
 void writeToFile(WcmWorkflowTemplate workflow, java.io.File fileWorkflow)
          Write a the workflow definition out to a temporary file on the web server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTACHMENT_NAME

public static final java.lang.String ATTACHMENT_NAME
See Also:
Constant Field Values

FIELD_VOTING

public static final java.lang.String FIELD_VOTING
See Also:
Constant Field Values

WORKFLOW_GROUP

public static final java.lang.String WORKFLOW_GROUP
See Also:
Constant Field Values

MILESTONE

public static final java.lang.String MILESTONE
See Also:
Constant Field Values

WFT_NS

public static java.util.Map WFT_NS
Constructor Detail

WcmWorkflowGenerator

public WcmWorkflowGenerator()
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

createWorkflow

public static void createWorkflow(filenet.vw.api.VWSession vwSession,
                                  WcmWorkflowTemplate workflowTemplate)
                           throws java.lang.Exception
Create a VWWorkflowDefinition from a WcmWorkflowTemplate object. The VWWorkflowDefinition will be validated and any validation errors will be thrown.

Parameters:
vwSession - VWSession object
workflowTemplate - WcmWorkflowTemplate object that specifies the user defined workflow structure.
Throws:
java.lang.Exception - upon validation errors.

saveWorkflow

public java.lang.String saveWorkflow(WcmWorkflowTemplate workflowTemplate,
                                     java.lang.String osName,
                                     java.lang.String folderId,
                                     java.lang.String basePath)
                              throws java.lang.Exception
Save a VWWorkflowDefinition to the Content Engine. Uses the Workflow Definition document class and will set the DocumentTitle property to the workflow template name. Also, uses default class security.

Parameters:
workflowTemplate - WcmWorkflowTemplate object that specifies the user defined workflow structure.
osName - String Object Store name
folderId - String Folder Id of the folder to file the object under.
basePath - String Path to the application directory.
Returns:
String Id of the newly added workflow definition.
Throws:
java.lang.Exception - upon validation errors.

checkinWorkflow

public java.lang.String checkinWorkflow(filenet.vw.api.VWSession vwSession,
                                        WcmWorkflowTemplate workflowTemplate,
                                        java.lang.String osName,
                                        java.lang.String reservationId,
                                        java.lang.String basePath)
                                 throws java.lang.Exception
Checkin a VWWorkflowDefinition to the Content Engine. Uses the Workflow Definition document class and will set the DocumentTitle property to the workflow template name. Also, uses default class security.

Parameters:
vwSession - VWSession object
workflowTemplate - WcmWorkflowTemplate object that specifies the user defined workflow structure.
osName - String Object Store name
reservationId - String Reservation object Id of the checked out workflow definition.
basePath - String Path to the application directory.
Returns:
String Id of the newly checked in workflow definition.
Throws:
java.lang.Exception - upon validation errors.

updateWorkflow

public void updateWorkflow(WcmWorkflowTemplate workflowTemplate)
                    throws java.lang.Exception
Update the participants of the workflow group specified for each workflow step.

Parameters:
workflowTemplate - WcmWorkflowTemplate object that specifies the user defined workflow structure.
Throws:
java.lang.Exception - upon validation errors.

writeToFile

public void writeToFile(WcmWorkflowTemplate workflow,
                        java.io.File fileWorkflow)
                 throws java.lang.Exception
Write a the workflow definition out to a temporary file on the web server. Uses a temporary file name with the pepe file extension.

Parameters:
workflow - WcmWorkflowTemplate object that specifies the user defined workflow structure.
fileWorkflow - File to hold the workflow definition pep file.
Throws:
java.lang.Exception - upon errors.

transferWorkflow

public void transferWorkflow(com.filenet.wcm.api.Session session,
                             filenet.vw.api.VWSession vwSession,
                             java.lang.String osName,
                             java.lang.String id,
                             java.lang.String vsId,
                             WcmWorkflowTemplate workflowTemplate)
                      throws java.lang.Exception
Transfer a Workflow Defnition to the Process Engine.

Parameters:
session - Session object for Content Engine
vwSession - VWSession object for Process Engine
osName - String Object Store name
id - String Folder Id of the folder to file the object under.
vsId - String Folder Id of the folder to file the object under.
workflowTemplate - WcmWorkflowTemplate object that specifies the user defined workflow structure.
Throws:
java.lang.Exception - upon validation errors.

readWorkflow

public WcmWorkflowTemplate readWorkflow(filenet.vw.api.VWSession vwSession,
                                        java.lang.String osName,
                                        java.lang.String workflowId,
                                        java.lang.String style)
                                 throws java.lang.Exception
Get the contents of the specified Workflow Definition from the Content Engine an load it into the application object structure.

Parameters:
vwSession - VWSession object. Can be se t to null, If null the list of step processors will not be loaded.
osName - String Object Store name
workflowId - String Workflow Definition id
style - String the workflow definition style (approval, sequencial, designer)
Returns:
WcmWorkflowTemplate object that specifies the user defined workflow structure..
Throws:
java.lang.Exception - upon validation errors.

updateWorkflowFromXML

public void updateWorkflowFromXML(WcmWorkflowTemplate workflowTemplate,
                                  org.w3c.dom.Document domWorkflowTemplateXML)
                           throws java.lang.Exception
Updates the workflow template object with the information passed in the XML.

Parameters:
workflowTemplate - WcmWorkflowTemplate object.
domWorkflowTemplateXML - Document holding update information.
Throws:
java.lang.Exception - upon validation errors.


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