Adding New Step Types: Background Information

Defining the step Type's API Object

You begin creating a step type by defining its API object. This object contains features and scripts that are required for the operation of a workflow step type and is named StandardTasks. You can find the StandardTasks object in WFMain:WFRoot:WFObjectTypes:WFTaskTypes.

The StandardTasks object acts as a class object that you can use to create many different step types. You can also access the StandardTasks object using the Content Server API. For more information, see the Content Server API Developer's Reference.

For each step type that you create, you can modify the following features:

When adding step types, set the fType values to an integer higher than 99 and the fSubType values to an integer between 1 and 10.

For each step type that you create, you can modify the following scripts:

Defining the Workflow Designer Information

After you define the step type's API object, you must provide the Workflow Painter with the information it requires to display the step and manipulate the data provided by the creator of the workflow map. You define the Workflow Painter information using the WFTask object. You can find this object in WebWFP:WebWFPRoot.

For each step type that you create, you can modify the following features:

When adding step types, set the fType values to an integer higher than 99 and the fSubType values to an integer between 1 and 10.

For each step type that you create, you can modify the following scripts:

In addition to the features and scripts that you modify to define the Workflow Designer information for a step type, you must create the HTML file for this task's Step Definition page.

If you want to support the transport capabilities of Content Server, you must modify these additional scripts that are executed while a workflow is transported from one system to another:

To support the transport capabilities for your custom workflow packages is optional and can be achieved by implementing the already mentioned functions GetXmlMetaData(), PrepareXmlMetaData(), SetXmlMetaData() resp. the functions GetXmlMetaDataTask(), PrepareXmlMetaDataTask(), SetXmlMetaDataTask() for the package specific task data. With these implementations you ensure that the metadata is exported from the source environment while adding the workflow map to the Transport Warehouse and imported while it is deployed in the target environment. But the key feature of Content Server Transport is the ability to map external references during the transport. The most obvious external references that exist in a workflow map are the users and groups that are used for step assignment. But also folders and documents differ at least in their id from one system to another. In order to map these references during the transport you have to implement dependency, dependency finder and dependency replacer objects. You can refer to the different objects that are already implement in the workflow modules or you check out the TRANSPORT module which provides the basic transport functionality and the parent objects to orphan you objects from.

See package WEBWFP::Transport for the workflow related dependency objects. As an example to maintain a sub workflow reference of the sub-workflow step, the following three objects where introduced:

Defining the Status and Display of the Step

After you define the API object and Workflow Designer information for the step type, you must define the information that handles the step when a workflow participant is working on it and when it is displayed on the Detailed Status page in Content Server. You define this information using the WFTask object. You can find this object in WebWork:WebWorkRoot.

For each step type that you create, you can modify the following features:

When adding step types, set the fType values to an integer higher than 99 and the fSubType values to an integer between 1 and 10.

For each step type that you create, you can modify the following scripts:

Depending on the complexity of the step types that you add to Content Server, you may have to provide additional functionality. For example, if you create a step type that allows the creators of workflow maps to attach custom callback scripts to particular workflow events that are associated with that step type, you may need to define the objects responsible for handling those callback scripts in Content Server. For more information, see the WFCustomScriptPkg Object.

If you add a complex step type to the custom module that you are creating, you may need to create custom request handlers that perform the operations associated with the step type. For example, the form step type (installed with the Content Server Forms module) uses request handlers to display the data in the form, to retrieve data from the form, and to pass the data to the workflow. In this case, the request handlers set up and manipulate all of the form's data correctly.