TheShihan
Novice

How can a Workflow Variable be set programmatically?

Jump to solution

We have Nintex and Nintex Forms (on-premise 2013) and are developing a custom solution where a user should be able to close multiple people assignment tasks at once.

 

Those tasks use Nintex Forms and store the selected user in a Workflow variable. So that the Nintex Workflow running on the item (where the task is assigned to) can continue correctly we need to somehow set a workflow variable from the outside (meaning: the user does not manually process the FlexiTask but we do this for him with our application (REACT/JavaScript logic).

 

As I figured out the Nintex Tasks are also (for example) in "Workflow Tasks" using a specific content type. For example it has a field "Decision" where the decision of the FlexiTask gets stored.

 

I was able to set a decision on the task item programmatically and the workflow saw this and continued correctly with that decision. But later in this decision tree we need to use the said workflow variable...

I saw that the variable seems to be stored on the FlexiTask item in the field "FormData" (XML object).

 

My first approach in setting the variable by updating the FormData value did fail (but maybe I made some other mistake). I was wondering if someone knows if this would be the right approach - I know it is surely a bit exotic?

 

I am unaware of any other APIs to talk with Nintex FlexiTasks or workflows directly.

0 Kudos
Reply
1 Reply
TheShihan
Novice

Re: How can a Workflow Variable be set programmatically?

Jump to solution

OK, as I haven't found a way to set a Workflow Variable from the "outside" I modified the workflow to now support the previous manual way and also a new way where we set the field value directly with our logic externally.

View solution in original post

0 Kudos
Reply