Note: To create Workflow variable, edit workflow à go to Variables tab then added port you required. To store any values in buffer select ‘Persistent’
Then configure the Assignment task to assign values or expressions to user-defined variables. After you assign a value to a variable using the Assignment task, the Integration Service uses the assigned value for the variable during the remainder of the workflow.
We must create a variable before you can assign values to it. We cannot assign values to predefined workflow variables.
To create an Assignment task:
1. In the Workflow Designer (Open already created workflow).
2. On menu click Tasks > Create
3. Select Assignment Task for the task type.
Enter a name for the Assignment task <Assign_Test>.
Click Create. Then click Done.
Now, create a link between tasks Start and s_m_emp_file by using link task. (1st click on Start then drag it to Assign_Test).
The Workflow Designer creates and adds the Assignment task to the workflow.
4. Double-click the Assignment task to open the Edit Task dialog box.5. On the Expressions tab, click Add to add an assignment.
6. Click the Open button in the User Defined Variables field.
7. Select the variable for which you want to assign a value. Click OK.
8. Click the Edit button in the Expression field to open the Expression Editor.
The Expression Editor shows predefined workflow variables, user-defined workflow variables, variable functions, and boolean and arithmetic operators.
For example, if you want to assign the previous session WorkflowRunId, WorkflowName, SessionName, MappingName details to the user-defined variable $$WORKFLOWRUNID, $$WORKFLOWNAME, $$SESSIONNAME, $$MAPPINGNAME and run the next session after 3 runs of my first session in the Expression Editor.
10. Click Validate.
Validate the expression before you close the Expression Editor.
11. Repeat steps 6 to 8 to add more variable assignments.
Use the up and down arrows in the Expressions tab to change the order of the variable assignments.
12. Click OK.
Second Output File:
Note: I want to capture the session s_m_emp_file related details to in to flatfile by using workflow variable i am storing those details from the session s_m_emp_file and using assignment task I am passing those details to second session s_m_aduit_mapping.