Workflow in Informatica: Create, Task & Manager

โšก Smart Summary

Workflow in Informatica is the container that tells the Integration Service which tasks to run, in which order, and with which connections, turning a saved mapping into work that actually executes.

  • ๐Ÿงฑ Tasks first: Build reusable command, session and email tasks in Task Developer before adding them to a workflow.
  • ๐Ÿ”Œ Connections: Relational, FTP, queue and application connections let the Integration Service reach each source and target.
  • ๐Ÿ” Session rule: One session runs exactly one mapping, and it cannot execute outside a workflow.
  • ๐Ÿ”— Links: The link task option defines execution order, either in parallel from the start task or in series.
  • โœ… Link conditions: A condition such as $task.status=SUCCEEDED makes the next task wait for the previous one to succeed.
  • ๐Ÿ“„ Parameter files: A .par file replaces hard-coded connection names, so the same workflow moves between environments unchanged.

Workflow in Informatica

Mappings describe how data changes. Workflows decide when and in what order that work runs.

What is Workflow?

A workflow is a group of instructions or commands given to the Integration Service in Informatica. The Integration Service is the entity which reads workflow information from the repository, fetches data from sources and, after performing transformations, loads it into the target.

Workflow – it defines how to run tasks such as the session task, command task, email task and so on.

To create a workflow:

  1. You first need to create tasks
  2. And then add those tasks to the workflow.

A workflow is like an empty container which has the capacity to store an object you want to execute. You add to the workflow the tasks that you want to execute. In this tutorial, we are going to do the following things in a workflow.

Overview of the workflow tasks built in this Informatica tutorial

Workflow execution can be done in two ways:

  • Sequence – tasks execute in the order in which they are defined
  • Event based – tasks get executed based on event conditions.

How to open Workflow Manager

Step 1) In the Informatica Designer, click on the Workflow Manager icon.

Workflow Manager icon on the Informatica PowerCenter Designer toolbar

Step 2) This will open a window of Workflow Manager. Then, in the Workflow Manager:

  1. We are going to connect to the repository “guru99”, so double-click on the folder to connect.
  2. Enter the user name and password, then select the “Connect” button.

Connect dialog used to log in to the guru99 repository from Workflow Manager

Step 3) In the Workflow Manager:

  1. Right-click on the folder
  2. In the pop-up menu, select the open option

Right-click menu on the repository folder showing the Open option

This will open up the workspace of Workflow Manager.

Workflow Manager workspace ready for use after the folder is opened

How to Create Connections for Workflow Manager

To execute any task in Workflow Manager, you need to create connections. By using these connections, the Integration Service connects to different objects.

For example, in your mapping, if you have a source table in an Oracle database, then you will need an Oracle connection so that the Integration Service can connect to the Oracle database to fetch the source data.

The following types of connections can be created in Workflow Manager.

  • Relational Connection
  • FTP Connection
  • Queue
  • Application

The choice of connection you create will depend on the type of source and target systems you want to connect to. More often, you would be using relational connections.

To Create a Relational Connection

Step 1) In Workflow Manager:

  1. Click on the Connections menu
  2. Select the Relational option

Connections menu in Workflow Manager with the Relational option selected

Step 2) In the pop-up window:

  1. Select Oracle in type
  2. Click on the new button

Relational Connection Browser with Oracle chosen and the New button highlighted

Step 3) In the new window of connection object definition:

  1. Enter the connection name (new name – guru99)
  2. Enter the username
  3. Enter the password
  4. Enter the connection string
  5. Leave other settings as default and select the OK button

Connection Object Definition window filled in with the guru99 connection details

Note – the connection string is the database service or TNS name the Integration Service uses to reach the database, not the connection name, which is only a label.

Step 4) You will return to the previous window. Click on the close button.

Relational Connection Browser listing the newly created guru99 connection

Now you are set with the relational connection in Workflow Manager.

Components of Workflow manager

There are three component tools of Workflow Manager that help in creating various objects in Workflow Manager. These tools are:

  • Task Developer
  • Worklet Designer
  • Workflow Designer

The three tools are shown below.

Task Developer, Worklet Designer and Workflow Designer tools in Workflow Manager

Task Developer – Task Developer is a tool with the help of which you can create reusable objects. Reusable objects in Workflow Manager are objects which can be reused in multiple workflows. For example, if you have created a command task in Task Developer, then you can reuse this task in any number of workflows.

Worklet Designer – Worklet Designer creates worklets, which are groups of tasks that behave like a small workflow and can be inserted into other workflows.

The role of Workflow Designer is to execute the tasks that are added to it. You can add any number of tasks to a workflow.

You can create three types of reusable tasks in Task Developer.

  • Command task
  • Session task
  • Email task

Command task – a command task is used to execute different Windows or UNIX commands during the execution of the workflow. You can create a command task to execute various command-based tasks. With the help of this task you can execute commands to create files and folders, to delete files and folders, to FTP files and so on.

Session task – a session task in Informatica is required to run a mapping.

  • Without a session task, you cannot execute or run a mapping
  • A session task can execute only a single mapping, so there is a one-to-one relationship between a mapping and a session
  • A session task is an object with the help of which Informatica gets to know how, where and at what time to execute a mapping
  • Sessions cannot be executed independently; a session must be added to a workflow
  • In the session object, cache properties and advanced performance optimization settings can be configured

Email task – with the help of an email task you can send email to defined recipients when the Integration Service runs a workflow. For example, if you want to monitor how long a session takes to complete, you can configure the session to send an email containing the details of session start and end time. Or, if you want the Integration Service to notify you when a workflow completes or fails, you can configure the email task for the same.

Workflow Designer adds further non-reusable tasks that control how a workflow behaves at run time.

Task What it does
Session Runs one mapping with real source and target connections.
Command Runs shell or DOS commands, for example to copy, archive or delete files.
Email Sends a notification when a session or workflow completes or fails.
Decision Evaluates a condition and sets a value that later links can test.
Timer Waits for a set period or an absolute time before the next task starts.
Control Stops, aborts or fails the workflow depending on the option chosen.
Assignment Assigns a value to a user-defined workflow variable.
Worklet Groups a set of tasks so the group can be reused inside other workflows.

How to create command task

Step 1) To create a command task we are going to use Task Developer. In Workflow Manager, open Task Developer by clicking on the “Task Developer” tab from the menu.

Task Developer tab selected from the Workflow Manager menu

Step 2) Once Task Developer is opened up, follow these steps:

  1. Select the Tasks menu
  2. Select the Create option

Tasks menu open in Task Developer with the Create option

Step 3) In the create task window:

  1. Select command as the type of task to create
  2. Enter the task name
  3. Select the create button

Create Task window with Command chosen as the task type

This will create the command task. Now you have to configure the task to add a command to it, which we will see in the next step.

New command task icon placed in the Task Developer workspace

Step 4) To configure the task, double-click on the command task icon and it will open an “edit task window”. On the new edit task window:

  1. Select the Commands menu
  2. Click on the add new command icon
  3. Enter the command name
  4. Click on the command icon to add command text

This will open a command editor box.

Edit Tasks window on the Commands tab with a new command row added

Step 5) In the command editor box, enter the command “mkdir C:\guru99” (this is the Windows command to create a folder named “guru99”) and select OK.

Command editor box containing the mkdir C:\guru99 command

After this step you will return to the edit tasks window and you will be able to see the command you added in the command text box.

Step 6) Click OK on the edit task window.

Edit Tasks window showing the saved command before it is closed

The command task will be created in Task Developer under the “guru99” repository.

Command task cmd_create_folder listed under the guru99 repository

Note – use the Ctrl+S shortcut to save the changes to the repository.

Saving the new command task to the repository with the keyboard shortcut

How to create workflow to execute command task

To execute a command task you have to switch to Workflow Designer. Workflow Designer builds the parent or container object in which you can add multiple tasks; when the workflow is executed, all the added tasks will execute. To create a workflow, follow these steps.

Step 1) Open Workflow Designer by clicking on the Workflow Designer menu.

Workflow Designer tool selected in Workflow Manager

Step 2) In Workflow Designer:

  1. Select the Workflows menu
  2. Select the create option

Workflows menu with the Create option in Workflow Designer

Step 3) In the create workflow window:

  1. Enter the workflow name
  2. Select the OK button (leave other options as default)

Create Workflow window with the workflow name wkf_run_command entered

This will create the workflow.

Naming convention – workflow names are prefixed with ‘wkf_’. If you have a session named ‘s_m_employee_detail’, then the workflow for the same can be named ‘wkf_s_m_employee_detail’.

Empty wkf_run_command workflow with only the start task in the workspace

When you create a workflow, it does not consist of any tasks. So, to execute any task in a workflow you have to add the task to it.

Step 4) To add the command task that we created in Task Developer to Workflow Designer:

  1. In the navigator tree, expand the Tasks folder
  2. Drag and drop the command task into Workflow Designer

Command task dragged from the navigator tree onto the workflow workspace

Step 5) Select the “link task” option from the toolbox in the top menu. The link task option links various tasks in a workflow to the start task, so that the order of execution of tasks can be defined.

Link Task icon in the Workflow Designer toolbox

Step 6) Once you select the link task icon, it will allow you to drag the link between the start task and the command task. Now select the start task and drag a link to the command task.

Link drawn from the start task to the command task in the workflow

Now you are ready with the workflow having a command task to be executed.

How to execute workflow

Step 1) To execute the workflow:

  1. Select the Workflows option from the menu
  2. Select the start workflow option

Workflows menu with the Start Workflow option selected

This will open the Workflow Monitor window and execute the workflow.

Workflow Monitor reporting the run of the wkf_run_command workflow

Once the workflow is executed, it will execute the command task to create a folder (the guru99 folder) in the defined directory.

guru99 folder created on the C drive by the command task

Session Task

A session task in Informatica is required to run a mapping. The rules listed earlier apply to every session you create: one session runs exactly one mapping, the session cannot run on its own, and it carries the connection, cache and performance settings the Integration Service uses at run time.

How to create a session task

In this exercise you will create a session task for the mapping “m_emp_emp_target” which you created in the previous article.

Step 1) Open Workflow Manager and open Task Developer.

Task Developer opened in Workflow Manager for the session exercise

Step 2) Now that Task Developer is open, in Workflow Manager go to the main menu:

  1. Click on the Tasks menu
  2. Select the create option

Tasks menu used to create a new session task in Task Developer

This will open a new window, “Create Task”.

Step 3) In the create task window:

  1. Select session as the type of task.
  2. Enter the name of the task.
  3. Click the create button

Create Task window with Session chosen and the session name entered

Step 4) A window for selecting the mapping will appear. Select the mapping which you want to associate with this session; for this example select the “m_emp_emp_target” mapping and click the OK button.

Mapping selection window with m_emp_emp_target highlighted

Step 5) After that, click on the “Done” button.

Done button used to close the Create Task window

The session object will appear in Task Developer.

Session object s_m_emp_emp_target shown in the Task Developer workspace

Step 6) In this step you will create a workflow for the session task. Click on the Workflow Designer icon.

Workflow Designer icon used to switch from Task Developer

Step 7) In the Workflow Designer tool:

  1. Click on the Workflows menu
  2. Select the create option

Workflows menu with the Create option selected for the session workflow

Step 8) In the create workflow window:

  1. Enter the workflow name
  2. Select OK (leave the other properties as default; there is no need to change any properties)

Create Workflow window used for the session workflow

In Workflow Manager a start task will appear; it is the starting point for execution of the workflow.

Start task shown as the entry point of the new session workflow

Step 9) In Workflow Manager:

  1. Expand the Sessions folder under the navigation tree.
  2. Drag and drop the session you created into the Workflow Manager workspace.

Session dragged from the Sessions folder into the workflow workspace

Step 10) Click on the link task option in the toolbox.

Link Task option selected in the Workflow Designer toolbox

Step 11) Link the start task and the session task using the link.

Link connecting the start task to the session task

Step 12) Double-click on the session object in Workflow Manager. It will open a task window where you can modify the task properties.

Step 13) In the edit task window:

  1. Select the Mapping tab
  2. Select the connection property
  3. Assign the connection to source and target – the connection which we created in the earlier steps.
  4. Select the OK button

Edit Tasks Mapping tab with the guru99 connection assigned to source and target

Now your configuration of the workflow is complete, and you can execute the workflow.

Completed session workflow ready to be started

How to add multiple tasks to a start task

The start task is the starting point for the execution of a workflow. There are two ways of linking multiple tasks to a start task.

  1. Parallel
  2. Serial

In parallel linking, the tasks are linked directly to the start task and all tasks start executing in parallel at the same time.

How to add tasks in parallel

Step 1) In Workflow Manager, open the workflow “wkf_run_command”.

wkf_run_command workflow reopened in Workflow Designer

Step 2) In the workflow, add the session task “s_m_emp_emp_target” by selecting the session and then dragging and dropping it.

Session task added next to the command task in the same workflow

Step 3) Select the link task option from the toolbox.

Link Task icon chosen from the toolbox for parallel linking

Step 4) Link the session task to the start task by clicking on the start task, holding the click and connecting to the session task.

Link being drawn from the start task to the session task

After linking the session task, the workflow will look like this.

Command task and session task both linked in parallel to the start task

Step 5) Start the workflow and monitor it in Workflow Monitor.

Workflows menu used to start the parallel workflow

Workflow Monitor then reports both tasks for the same run.

Workflow Monitor row showing the parallel run of both tasks

How to add tasks in serial mode

But before we add tasks in serial mode, we have to delete the link that we added to demonstrate parallel execution of tasks. For that:

Step 1) Open the workflow “wkf_run_command”.

  1. Select the link to the session task.
  2. Select the edit option in the menu
  3. Select the delete option

Edit menu with the Delete option applied to the selected link

Step 2) A confirmation dialogue box will appear in a window; select the yes option.

Confirmation dialog asking whether to delete the selected link

The link between the start task and the session task will be removed.

Workflow after the start-to-session link has been removed

Step 3) Now again go to the top menu and select the link task option from the toolbox.

Link Task icon selected again for serial linking

Step 4) Link the session task to the command task.

Link drawn from the command task to the session task

After linking, the workflow will look like this.

Serial workflow with the command task feeding the session task

Step 5) To make the visual appearance of the workflow clearer:

  1. Right-click on the workspace of the workflow
  2. Select the arrange menu
  3. Select the Horizontal option

Right-click Arrange menu with the Horizontal layout option

The tasks are then laid out from left to right.

Serial workflow arranged horizontally in the workspace

If you start the workflow, the command task will execute first and, after its execution, the session task will start.

Workflow Variable

Workflow variables allow different tasks in a workflow to exchange information with each other, and also allow tasks to access certain properties of other tasks in a workflow. For example, to get the current date you can use the built-in variable “sysdate”.

The most common scenario is when you have multiple tasks in a workflow and in one task you access the variable of another task. For example, if you have two tasks in a workflow and the requirement is to execute the second task only when the first task has executed successfully, you can implement such a scenario using a predefined variable in the workflow.

Implementing the scenario

We had a workflow “wkf_run_command” with tasks added in serial mode. Now we will add a condition to the link between the session task and the command task, so that only after the success of the command task will the session task be executed.

Step 1) Open the workflow “wkf_run_command”.

Serial wkf_run_command workflow opened to add a link condition

Step 2) Double-click on the link between the session and command task.

Link between the command task and the session task selected for editing

An Expression window will appear.

Expression Editor opened for the workflow link condition

Step 3) Double-click the status variable under the “cmd_create_folder” menu. A variable “$cmd_create_folder.status” will appear in the editor window on the right side.

status variable of cmd_create_folder inserted into the expression editor

Step 4) Now we will set the variable “$cmd_create_folder.status” condition to the succeeded status, which means that only when the previous task has executed and the execution was successful will the next session task run.

  1. Change the variable to the value “$cmd_create_folder.status=SUCCEEDED”.
  2. Click the OK button

Link condition set to $cmd_create_folder.status=SUCCEEDED

The workflow will look like this.

Workflow showing the conditional link between the command and session tasks

When you execute this workflow, the command task executes first, and only when it succeeds will the session task be executed.

Workflow Parameter

Workflow parameters are those values which remain constant throughout the run. Once their value is assigned it remains the same. Parameters can be used in workflow properties and their values can be defined in parameter files. For example, instead of using a hard-coded connection value you can use a parameter or variable in the connection name, and the value can be defined in the parameter file.

Parameter files are the files in which we define the values of mapping and workflow variables or parameters. These files have the extension “.par”. As a general standard, a parameter file is created for a workflow.

Advantages of a parameter file

  • Helps in migration of code from one environment to another
  • Allows easy debugging and testing
  • Values can be modified with ease without a change in code

Structure of parameter file

The structure of a parameter file is a section heading followed by one name=value pair per line:

[folder_name.WF:Workflow_name]
$Parameter_name=Parameter_value

Folder_name is the name of the repository folder, and workflow name is the name of the workflow for which you are creating the parameter file.

Note – the Integration Service treats everything before the first equals sign as the parameter name and everything after it as the value, so avoid spaces around it.

We will be creating a parameter file for the database connection “guru99” which we assigned in our earlier sessions for sources and targets.

How to create parameter file

Step 1) Create a new empty file (a Notepad file).

New empty Notepad file created for the parameter file

Step 2) In the file, enter the text as shown in the figure.

Parameter file contents with the workflow section and the $DBConnection_SRC entry

Step 3) Save the file under a folder guru99 at the location “C:\guru99” as “wkf_run_command.par”.

Save As dialog storing wkf_run_command.par in the C:\guru99 folder

In the file we have created a parameter “$DBConnection_SRC”; we will assign the same to a connection in our workflow.

Step 4) Open the workflow “wkf_run_command”.

  1. Select the Workflows menu
  2. Select the edit option

Workflows menu with the Edit option selected for the workflow properties

Step 5) This will open up the edit workflow window. In this window:

  1. Go to the Properties tab menu
  2. Enter the parameter file name as “c:\guru99\wkf_run_command.par”
  3. Select the OK button

Edit Workflow Properties tab holding the full parameter file path

Now we are done with defining the parameter file content and pointing it to a workflow.

The next step is to use the parameter in the session.

Step 6) In the workflow, double-click on the session “s_m_emp_emp_target”, then:

  1. Select the Mappings tab menu
  2. Select the connection property in the left panel
  3. Click on the target connection, which is hard-coded now as “guru99”

Session Mappings tab showing the hard-coded guru99 target connection

Step 7) A connection browser window will appear. In that window:

  1. Select the option to use a connection variable
  2. Enter the connection variable name as “$DBConnection_SRC”
  3. Select the OK button

Connection Browser set to use the connection variable $DBConnection_SRC

Step 8) In the edit task window the connection variable will appear for the target. Select the OK button in the edit task window.

Edit Tasks window with the connection variable assigned to the target

Now we are done with creating a parameter for a connection and assigning its value in the parameter file.

When we execute the workflow, the workflow picks up the parameter file, looks for the value of its parameters and variables in the parameter file, and takes those values.

FAQs

A worklet is a reusable group of tasks that behaves like a small workflow. Use one when the same sequence of tasks, such as a load followed by a notification, repeats across several workflows.

Attach a scheduler to the workflow in its Edit Workflow properties, or trigger it externally with the pmcmd command line utility from an enterprise scheduler such as Control-M or cron.

Stop lets the Integration Service finish reading and writing the current data before ending. Abort ends the run after a timeout of sixty seconds and kills the processing threads.

A task status can also be FAILED, ABORTED, STOPPED, DISABLED, NOTSTARTED or RUNNING. Link conditions can combine these with workflow variables and operators to control which branch continues.

Yes. A single file can hold multiple sections, each headed by its own folder and workflow name, so one file can supply values to many workflows, worklets and sessions.

The most common causes are a missing mail server configuration on the Integration Service node, an unset or misspelled recipient address, and the task never being linked into the workflow.

Informatica CLAIRE recommends run schedules, predicts failures from historical run metadata and flags anomalous load volumes. Comparable machine learning features in other schedulers detect drifting run times before a job breaches its window.

Copilot drafts the pmcmd and pmrep scripts that start, stop and deploy workflows, and generates parameter files for each environment. Always review generated commands before running them against a production repository.

Summarize this post with: