Type of scary heading, this is power of freedom, Heading creativity is outcome of my free time. 🙂
Workflow Variable has significant value in Informatica, if used it can help to achieve difficult data loading situations. At the very beginning we will try to see those situations so it help us later to learn variable assignment method in Informatica power center workflows.
Intended audience: People probably in ETL, DW Design or architecting. We have tried to put up information in sort of meaningful way, like keeping it in real life IT scenarios. Hope it will help!!!!
How to pass variable values from one session to another?
When do you use task Status variable in a workflow?
You might want to use Task Status / PrevtaskStatus variable in link expression or decision task to validate the status of the previously executed task. This will further help you to decide the execution of next set of tasks within a Workflow.
Can a user defined workflow be used in timer task?
Yes, date type user defined workflow variable can be used in timer task.
Informatica has a bunch of pre-defined Workflow variables such as status of the task, status of the previous task, error code, errorsg, starttime, endtime (and more). Informatica Workflow developers majorly use these pre-defined variables to evaluate the status of the tasks. Informatica allow you to define your own variable set to use in a Workflow. Let’s see how to define and use variables in a Workflow.
How to define a User-defined Workflow Variable?
1. Goto Workflow Properties.
2. Goto Variables tab.
3. Click on Add New Variable.
4. Define Variable and provide a default value.
5. Click OK.
How to assign a value from one task to another task?
Imagine a requirement to process a file data. A flag is calculated in first session, and based on the flag value of first session, either session 2 or session 3 ist o be triggered. Workflow variable is carrier to pass the mapping variable values from one session to another within a Workflow.
This way you can do it –
1. Create a mapping variable and a Workflow variable.
2. Determine the value of mapping variable and assign to it in the mapping.
3. Goto the Components tab in Session properties.
4. Select appropriate variable assignment option. In this example – Postsession_success_variable_assignment.
5. Create New; Assign mapping variable to Workflow variable.
6. Now OK.
How to use Workflow variables?
Pre-defined variables can be directly used within a Workflow and they do not require an explicit definition however user defined variables are required to define when a Workflow is being created in order to use it within the Workflow.
1. In Link Expression. Consider a Workflow with bunch of sessions and Worklets and other tasks. For the sequentially connected tasks, we might want to check the status of the previous task to trigger the current task. This could be achieved by adding a condition to Link task. An example as below –
2. In Decision Task. The pre-defined variable values can also be evaluated in a Decision task by adding a pretty similar condition as in Point-1
3. In Assignment Task. You can assign a value to a user defined variable in an Assignment task.