Skip to main content
Mitratech Success Center

General Information

No page summary available.

Importing and Upgrading Custom Tasks

Custom Tasks may be periodically updated. To ensure proper installation and upgrade of these custom tasks review the following procedures:

Do not delete the current Custom Tasks unless you are sure you want to delete them. Deleting custom tasks will remove all custom task event mappings to any objects in the partition.

To import custom tasks ensure that you are not inside of the Custom Tasks folder unless they are individual custom tasks.

Navigate to the root of the location of the Custom Tasks folder it should look like the following:

image

Continue to import the custom tasks by selecting Import Objects from the Create New dropdown. Once you have selected the .xml file to import click Ok. This will import and overwrite the current Custom Tasks.

image

Ensure that there are no duplicate Custom Task folders. You have successfully updated your custom tasks.

Custom Tasks in an eForm

Process Director supports the ability to package unique business logic in the Custom Task that can be mapped to eForm events (e.g. buttons). This allows custom logic to be developed once with the scripting interfaces and re-used across many eForm definitions without any additional scripting. For information on creating custom tasks for eForm see the Process Director Developer’s Guide for more information.

eForm Custom Tasks are mapped to eForm events. For example, Custom Tasks can cause the display of an eForm, or Custom Tasks can be set to respond to a change in eForm data. This will cause the Custom Task to be run in the context of the current eForm. The Custom Task can view and modify any of the current form data.

Mapping Custom Tasks to Events

A custom task must be associated (mapped) to an event. The following events are available:

EVENT

WHEN THE EVENT RUNS

Form Creation

When the form is first opened by Process Director and prepared for display.

View State Init

When the eForm's View State is initialized.

Before Conditions

Before any form conditions are resolved.

After Conditions

After all of the form's conditions are resolved.

Before Validation

Before form validation rules are run.

After Validation

After all form validation rules have been run.

eForm Completed

When the eForm is marked as complete and closes.

eForm Display

When the eForm is displayed.

Event

Any form control set as an event control is changed.

To associate a custom task with an event, click the Custom Task Event Mapping tab on the eForm's definition. From the Custom Task Event Mapping tab, click the Build button of the picker control that is located to the left of the Add Custom Task button at the top of the tab to open the Custom Tasks dialog box.

image

From the Custom Task dialog box, navigate through the treeview to fine the custom task you desire, then click on the task to select it. The dialog box will close automatically.

image

After the dialog box closes, the name of the custom task you selected will appear in the picker control. Click the Add Custom Task button to add the mapping to the form.

image

Once the mapping has been added, select the event you desire to map from the Event name Dropdown in the mapped even line.

image

The dropdown will display all of the standard form events, as well as the control names of any control you have identified as an event field. If the control event you wish to map does not appear, then you must return to the eForm Controls tab, and set that control as an event control. Once you have selected the event you wish to map, you may enter a brief description of what the custom task will do in the text box labeled "Set Form Data:". Now, click the Configure button to open the configuration dialog box for the Custom Task.

Each Custom Task has a specific dialog box, in this example we will show the configuration dialog box for the Set Form Data Custom task. Specific configuration dialog boxes will be discussed below for each of the Custom Tasks.

image

Make the appropriate configuration changes in the Custom Task's configuration dialog box, then click the OK button to close and save your configuration changes.

Finally, set any conditions that you'd like to impose on the Custom Task to control when it runs. To see how to configure a sample eForm custom task, watch this video:

Custom Tasks in a Process Timeline

A Process Timeline Custom Task can be added to a Process Timeline Definition just like a built-in activity type. The Process Timeline custom task cannot have any user participants; they run and then immediately transition to the next activity in the Process Timeline without any user intervention. They are configured similarly to standard task types and must exist in the path/route of the Process Timeline to be executed.

To use a custom task in a Process Timeline Definition, select Custom Task from the Activity Type dropdown under the Activity Tab.

image

Then click on the custom task tab. Select you Custom Task from the pick list and click the Add Custom Task button. This now acts like any other Process Timeline activity.

image

Custom Tasks in a Workflow

The Process Director engine supports Custom Tasks. This allows you to create a custom task type that will appear in the workflow task toolbar. Custom tasks allow unique business logic and processing to be packaged into a new workflow task type. This new task type is made available to the workflow builders, without requiring any additional scripting. For information on developing custom tasks for workflows see Process Director Developers Guide for more information.

Custom Tasks already exist for many common functions such as:

  • Database connectors to populate form fields from an external database;
  • Conversion of documents and eForms to PDF.
  • Connect to a Web Service

A workflow Custom Task can be added to a workflow definition just like a built-in task type. The workflow custom task cannot have any user participants; they run and then immediately transition to the next step in the workflow without any user intervention. They are configured similar to standard task types are must exist in the path/route of the workflow to be executed.

Adding the Custom Task to the Workflow

To use a custom task in a workflow definition, expand the appropriate group in the task toolbar.

image

Then click on the custom task icon and drop it on to the palette. This now acts like any other workflow step and should be added to the path/route by drawing the connectors to it.

image

Configuring a Workflow Custom Task

After a custom task is placed on the workflow palette you can configure it. Most custom tasks will require some configuration, but it is not required. To configure the custom task right click on the step and choose the Properties menu item, or double click on the icon.

image

This will display a dialog that prompts for an eForm to reference. Most custom tasks will require this configuration, indicating which eForm definition will be routed in this workflow. The dialog will display different information depending on which task is being configured. Click the “Configure” button to display additional options.

image

image

Locating where a Custom Task is installed

Workflow Custom Tasks will appear in the workflow toolbar automatically when they are installed in the Content List. The name of the folder containing the custom tasks is the same as the name of the group in the workflow.

image

To locate where a workflow Custom Task is installed in the Content List, open the workflow builder and then turn on debugging mode by right clicking anywhere in the menu bar area of the Process Director screen. A message box will appear, informing you that Debug Mode has been activated. Only users that are in the admin user group will be able to do this.

image

Next, refresh the workflow builder by clicking on the Refresh icon located in the upper right portion of the screen.

image

In debugging mode, additional information will appear for every folder and file, such us their GUID’s.

image

Custom Tasks in a Business Rule

The Process Director Business Rules engine supports Custom Tasks. This allows you to create a custom task type that will return the results of a custom task in a business rule. Custom tasks allow unique business logic and processing to be packaged into a business rule. This business rule return is made available to the business rule builders, without requiring any additional scripting. For information on developing custom tasks for business rules see Process Director Developers Guide for more information.

A business rule Custom Task can be added to a business rule definition just like other returns. A business rule can only have one business rule custom task and can return as the following: string, number, date, user, and group. They are configured similar to standard task types and must exist in the path/route of the business rule to be executed.

Adding the Custom Task to the Business Rule

To use a custom task in a business rule definition, select Custom Task from the Returns selection of the business rule. Select the Custom Task from the pick list and click the Add Custom Task button. This now acts like any other return from a business rule.

image

Configuring a Business Rule Custom Task

After a custom task is placed on the business rule return you can configure it. Most custom tasks will require some configuration. Click on the Configure button to configure the custom task. The interface displayed and the information you are prompted for will be dependent on the creator of the custom task.

  • Was this article helpful?