Developer Workflow Guide > Workflows > Workflow Examples
  

Workflow Examples

The following examples show how you might want to develop workflows.

Example: Running Commands Before and After Running a Mapping

You can develop a workflow that runs commands to perform steps before and after a mapping runs. For example, you might configure a Command task before a Mapping task to drop indexes on the mapping target before the mapping runs. You might configure a Command task after the Mapping task to recreate the indexes when the mapping completes.
The following figure shows a workflow that runs a command, runs a mapping, runs another command, and sends an email notifying users of the status of the workflow:
The workflow contains a Start event, a Command task, a Mapping task, a second Command task, a Notification task, and an End event.
Parameter files provide you with the flexibility to change the parameter values each time you run a workflow. You can use the following parameters in this workflow:
Define the values of the parameters in a parameter file. Specify the parameter file when you run the workflow. You can run the workflow with different parameter files to run different commands, to connect the mapping to a different source or target, or to send an email to different users.

Example: Creating Multiple Sequence Flows

You can develop a workflow that splits a sequence flow into multiple sequence flows and that uses conditions to determine the path that the workflow data follows. Use gateways to create the sequence flows. For example, you might develop a workflow that follows one sequence flow if a mapping runs successfully and follows another sequence flow if the mapping fails.
The following image shows a workflow that uses an Exclusive gateway to create the sequence flows:
The workflow includes a Mapping task that connects to an Exclusive gateway. The gateway splits the workflow into two sequence flows. Each sequence flow connects to a series of tasks. Another gateway merges the final sequence flow in each series into a single sequence flow that connects to the next object in the workflow.
The workflow includes the following components: