Friday, June 21, 2013

Creating a Workflow

Workflows Overview
A workflow is a set of instructions that tells the Integration Service how to run tasks such as sessions, email notifications, and shell commands. After you create tasks in the Task Developer and Workflow Designer, we connect the tasks with links to create a workflow.

In the Workflow Designer, we can specify conditional links and use workflow variables to create branches in the workflow. The Workflow Manager also provides Event-Wait and Event-Raise tasks to control the sequence of task execution in the workflow. You can also create worklets and nest them inside the workflow.

Every workflow contains a Start task, which represents the beginning of the workflow.

The following figure shows a sample workflow:


We can create workflows with branches to run tasks concurrently.

When we create a workflow, select an Integration Service to run the workflow. We can start the workflow using the Workflow Manager, Workflow Monitor, or pmcmd.

We use the Workflow Monitor to see the progress of a workflow during its run. The Workflow Monitor can also show the history of a workflow.

Use the following guidelines when you develop a workflow:
  1. Create a workflow. Create a workflow in the Workflow Designer or by using the Workflow Generation Wizard in the PowerCenter Designer.
  2. Add tasks to the workflow. We can add tasks to the workflow as you develop the workflow in the Workflow Designer.
  3. Connect tasks with links. After you add tasks to the workflow, connect them with links to specify the order of execution in the workflow.
  4. Specify conditions for each link. You can specify conditions on the links to create branches and dependencies.
  5. Validate workflow. Validate the workflow in the Workflow Designer to identify errors.
  6. Save workflow. When you save the workflow, the Workflow Manager validates the workflow and updates the repository.
  7. Run workflow. In the workflow properties, select an Integration Service to run the workflow. Run the workflow from the Workflow Manager, Workflow Monitor, or pmcmd. You can monitor the workflow in the Workflow Monitor. 
Note:
  • A workflow must contain a Start task. The Start task represents the beginning of a workflow. When you create a workflow, the Workflow Designer creates a Start task and adds it to the workflow. You cannot delete the Start task.
  • After you create a workflow, you can add tasks to the workflow. The Workflow Manager includes tasks such as the Session, Command, and Email tasks.
  • Finally, you connect workflow tasks with links to specify the order of execution in the workflow. You can add conditions to links.
Creating a Sample Workflow:
1. Open you Workflow Manager and Connect your Repository.
2. Connect and Open the folder if not already opened.
3. From Menu, Click Tools --> Workflow Designer.

or

Click on Icon Workflow Designer just above the workspace.
 
4. From Menu select 'Workflows' --> Create 
 
5. It will pop up 'create workflow' window.

General Tab: Entry the below information.
Name: wf_s_<workflowname>
Comments: description

Integration Service: <select service by clicking below highlighted icon>
 

Properties Tab:
 
Parameter Filename: specify the parameter filename with path.
Write Backward Compatible Workflow Log File: Check this if you do not want to use Log Service but instead want to write the workflow log to a file
Workflow Log File Name:  wf_s_<workflowname>.log
Workflow Log File Directory: $PMWorkflowLogDir\ (You can change it if required)
Save Workflow log by: timestamp or by number of runs (optional)
Save workflow log for these runs: Specify the number of runs of the workflow log to save. ($PMWorkflowLogCount can also be used).
Enable HA recovery: Store workflow state in the persistent storage so that workflow recovery and failover are possible beyond the current run of the workflow or the service.

Scheduler Tab: It can be Reusable/Non-Reusable. (We will find it in advance concepts).
 
Variables Tab:

You can declare the variables you want to use in workflow/worklet. A variable represents a value that can be changed during the workflow runs.
 
 
You can define 'Default Value to the workflow/worklet variable' or check 'Is NULL' to default value as 'NULL'.

Event Tab: To declare the events you want to use in workflow/worklet.
 
Click on 'OK'.

We have create workflow (But still we have to create task(s) to this workflow).

0 comments:

Post a Comment