You can assign a value to a user-defined workflow variable with the Assignment task. To use an Assignment task in the workflow, first create and add the Assignment task to the workflow. 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. You must create a variable before you can assign values to it. You cannot assign values to predefined workflow variables.
To create an Assignment task:
In the Workflow Designer, click Tasks > Create.
Select Assignment Task for the task type.
Enter a name for the Assignment task. Click Create. Then click Done.
The Workflow Designer creates and adds the Assignment task to the workflow.
Double-click the Assignment task to open the Edit Task dialog box.
On the Expressions tab, click Add to add an assignment.
Click the Open button in the User Defined Variables field.
Select the variable for which you want to assign a value. Click OK.
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.
Enter the value or expression you want to assign.
For example, if you want to assign the value 500 to the user-defined variable $$custno1, enter the number 500 in the Expression Editor.
Click Validate.
Validate the expression before you close the Expression Editor.
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.