Tasks and Task Developer in Informatica PowerCenter Workflow Manager
The Informatica PowerCenter Workflow Manager contains many types of tasks to help you build workflows and worklets. You can create reusable tasks in the Task Developer. Or, create and add tasks in the Workflow or Worklet Designer as you develop the workflow. In this article lets see very commonly used Tasks for Workflow or Worklet development.
Background
Lets Consider the scenarion.
People, who are authorized to receive the session status, get an email, once the session has completed. The email gives details of number of rows loaded, rejected, time taken to complete, etc. The workflow should also cleanup the reject files created during a Workflow run.
Solution
- Create an Email task and place it in a Workflow
- A Command Task can be configured to specify shell or DOS commands, to delete reject files, copy a file, or archive target files.
- Use the Command Task to delete reject files.
I. Create an Email Task
- Create an Email Task in the Task Developer.
- Enter the name for the Email Task as On_Success_Mail.
- Double-click on the email task. Click on the General tab, enter the description for the task as shown below.
- Select the Properties tab and enter the Email User Name and Email Subject details.
- Create one more Email task, give the name as On_Failure_Mail and set its properties.
II. Configure the Workflow
- Switch to the Workflow Designer and drag the wf_OrderListing_x Workflow created in Prior Article.
- Double-click on the Session Task s_OrderList_x.
- Click on the Components tab.
- Click On Success E-Mail option; from the drop down list select Reusable.
- Click on the icon shown highlighted in the figure below.
- Enter the email text. Here you can select any post-session built-in Email variables, useful for including important session information.
- The reusable Email task for On Failure E-Mail. Enter the details required.
- Click OK.
Note: The concerned people will receive an email regarding the status of the Workflow, subject to mail server configuration.
III. Switch to Task Developer
- Create a Command task or click on the icon on the Tasks toolbar.
- Edit the Task.
- In the Commands tab, click on the icon. Enter a name for the command as DeleteFiles, click on to enter the instructions in the command.
- Enter the command as shown below.
Note: The command can be any valid UNIX command or shell script for UNIX servers, or, any valid DOS or batch file for Windows servers.
IV. Configure the Workflow
- Open the Workflow wf_OrderListing_x create in Prior Article.
- Link the session task s_OrderList_x to Command_Delete_x.
- Run the Workflow.
- Verify the results.
Note: The commands specified in the Command Task are executed on the Informatica Server. To verify the execution of the commands given in the Command Task you need to have privileges to login to the Informatica Server and view the BadFiles directory that has all the reject files.
Hope you enjoyed this tutorial, Please let us know if you have any difficulties in trying out these exercise.