Adding New Workflow Types: Background Information
You begin creating a new workflow type by orphaning the
WFCustomScriptPkg object, to act as a
superclass object in your custom module's OSpace. You can find the
WFCustomScriptPkg object in
WFMain:WFRoot.
Because the WFCustomScriptPkg
object is a superclass object that can be used for many different workflow
customizations, you create a child of the
WFCustomScriptPkg
object and use it to create each new workflow type.
For each workflow type that you create, you can modify
the following scripts:
- GetWFTypeName() retrieves the name of the custom
workflow type defined by the integer values of the
wfType and wfSubType
variables. If the values of the wfType
and wfSubType variables correspond
to the values of the wfType and
wfSubType variables in the
GetWFTypes() script, the corresponding
workflow name is assigned to the workflow type and a variable
named handled is set to
TRUE. If the values of
the wfType and
wfSubType variables do not
correspond to the values of the wfType
and wfSubType variables in the
GetWFTypes() script, a name is not
assigned to the workflow type and the handled variable is set
to FALSE.
- GetWFTypes() defines the type, subtype, and
name of the custom workflow types that you create. This script
returns a list of Assocs. Each Assoc contains an integer that
specifies the type (wfType), an
integer that specifies the subtype (wfSubType),
and a string that specifies the name of the workflow type.
- StartWF() defines the changes that you
want to make to a particular workflow's map definition. This
script runs each time a workflow is initiated in Content Server. It
does not apply to Sub-workflows.
- ModifyOptions() returns options that can
be defined for specific workflow packages. The script runs each time you start to modify a
workflow during execution or when you save your modifications. This allows you to configure
different package behaviors during workflow modification depending on the workflow type.
After you orphan the WFCustomScriptPkg
object and modify the GetWFTypeName(),
GetWFTypes(), and
StartWF() scripts, the Workflow Type list is
exposed in the Content Server interface. This list is displayed
on a workflow map's
General Properties page and contains the names of the different types of
workflows that you have created. The Workflow Type
list lets the creators of workflow maps choose which type of workflow
they want to create (that is, which custom operations they want to
apply to their workflow map definition just before their workflow is initiated).