There may be a requirement to pass certain workflow variables between workflows when you split a larger process into small workflows.
To do this the target workflow can be configured with start data variables. These start data variables can then automatically be populated when the workflow is started through the nintex web service.
Create a new workflow as normal and select Workflow Settings then variables and then create a new variable.
In this example 2 workflow variables were created as start data.
EmpID – Single line of text
LeaveREQ – Number
To test starting a workflow with these variables automatically set when the workflow starts using web service method. In this example the StartWorkflowOnListItem method will be used.
The first step is to use a build dynamic string action to create the association Data XML that will be required.
The format for the association data parameter is as follows:
Based on the workflow we are attempting to start there are 2 start data items EmpID and LeaveREQ.
The association data will be as follows:
This will set the variable EmpID to x067900 and LeaveREQ to 4.
The best method to use when creating a start data variable is to build the value first using a build dynamic string action
To use this start data within a call web service action the configuration is as follows
Please ensure Encode inserted tokens is selected.
That’s it you are done. Happy Nintexing 🙂