Create a user-designed workflow template
User-designed workflow templates must be created to be used in mediation contracts.
The best way to understand how to design a workflow template for a mediation contract is to look at a specific business case.
Goal: copy files between virtual paths in Data Mover.
Trigger: New File. The workflow template is triggered when a new file enters a virtual path in the VFS.
Service task: Republish File. When triggered, the workflow template copies the file in another virtual path.
Follow these steps to design the workflow template:
Go to Design → Workflows and click the New button.
In the New template window:
Assign a Name and enter a Description to the workflow template you are creating, e.g., Republish.
Select the Trigger that will start your workflow template: i.e., new file.
Select the Status of your workflow template:
Ready: the workflow is ready and can be associated with a mediation contract.
In Progress: the workflow is still a draft. It is saved as template but cannot be associated with any mediation contract.
Click the CREATE button and the Workflow Template page will appear.
In the Shape repository list on the left, select the Republish service task. You can either scroll the list or filter the service tasks entering a portion of the name in the field with the lens.
Drag the service task from the Shape Repository and drop it on the white dashboard.
To connect 2 service tasks, select the starting service task. Multiple icons will appear around it.
Select the 2 arrows
appearing at the bottom-right corner.
Drag the mouse towards the target service task. The icons will change to a no-access sign and an arrow as you move.

Once you reach the target task, the no-access sign will turn into a check mark. Release the mouse to connect the tasks with a black arrow.

From the Shape repository, select the End event service task and place it to the right of the Republish File service task. Connect them using the arrow.

Click the Republish File service task and go to the More panel to enter the macros in the variables that must be filled in:
Destination (Virtual Path): path where the files will be republished.
Fileset ID (Long): id of the file that triggers the workflow and that will be republished.
Click the whiteboard. In the BPNM-Diagram panel on the right, open the Flow Template panel and click the pencil icon. Go to Status and enable the toggle to change the status from "In progress" to "Ready to use". Click the Update button to confirm.
Save clicking the
Save icon on the toolbar.
Once you have saved your workflow, go back to the Results section by clicking on the breadcrumbs or the Back button of your browser. Be careful! Unsaved progress will be lost if not previously saved.
Your workflow template is listed in the Results section and is ready to be used in a mediation contract.
Go to Design → Contracts and select New to create a mediation contract with the New file trigger. The new Republish workflow template will appear in the Workflows list.

When dragging a service task, the fields in the More panel (bottom right) must be filled out. This panel appears when the service task is selected. These fields can be mandatory or optional and are documented on the following pages. The More section always includes the Throw exception property. If this property is checked and an error happens in the service task, it will stop the entire workflow.
Clicking outside the service task (in the white space), the data/fields for the entire workflow template will be shown in a panel on the right.
Last updated