Passing variable values between Nintex workflows

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:

<Data>

<StartDataItem1>value1</StartDataItem1>

<StartDataItem2>value2</StartDataItem2>

<StartDataItem3>value3</StartDataItem3>

</Data>

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:

<Data>

<EmpID>x067900</EmpID>

<LeaveREQ>4</LeaveREQ>

</Data>

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 🙂

11 thoughts on “Passing variable values between Nintex workflows

    1. I do not think so. Is it possible to save the multiple line content in a list and pass the Item Id of that from one workflow to another. Once the processing is done you can delete the record you created with multiple line of text. Not sure what is your requirement, just a suggestion.

      Like

      1. Here’s my scenario, I’m creating a workflow that will format an email layout of a table with data. To store the table layout, I enclose it in a single multiple line of text type variable. Just like below.
        Ex: {WorkflowVariable:DataA}…

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.