I have a workflow where I added a Get Tasks action on a parallel path with Assign Task action. The Get Task action stores the results in an Object data type. I can access Object.Tasks, but I cannot figure out how to get individual properties of each task. If I use Get Item from Collection action, that stores the results in a Text type, so then I cannot get to individual properties.
I need to know how to access the ID, Name etc properties of each task.
Solved! Go to Solution.
you need to do a loop for each after the get tasks.
I have a workflow which does staff surveys. I have another WF which cancels the active tasks after a period of time.
Note that the get tasks action only seems to find the tasks from the last five days unless you add in an earlier date for the query.
Once you are inside the loop for each action you can see the individual task properties.
eg from this log action.
I am new to this forum, so I am still not able to navigate comfortably here. Thank you very much for your quick reply. I was amazed how quickly you sent me a solution that I was struggling with for a couple of days already. First I only saw an email with the partial text of your reply and I jumped to try it, but still was struggling until I returned to the forum and saw your screenshot. I greatly appreciate the amount of detail you put in.
Regarding your note about the date range, I also noticed that if I use current date as a Start Date, the response object will return empty. I had to set the Start date to one day prior current date in order to see the latest Assign Tasks. Do you have a suggestion about how to properly set the date range to get the latest Task?
Thanks Art (@artmov ),
just happened to build a similar WF only a few weeks ago so was easy to grab the details.
Regarding the date range, if you are doing the get tasks in parallel you might be able to leave the date fields in the get tasks action blank.
Otherwise you could try putting the workflow content initiation time
what is your actual requirement with the parallel action and the get tasks?
(or the overall workflow concept / requirement?)
Just wondering if it's a bit more complicated than it needs to be.
Are you using 'branch by stage'?
(or state machine in the old language)
On the assumption that you are not here are my notes on this concept:
I think you can avoid the get tasks by using a branch by stage logic.
Based on the outcome of the task you can use the change stage action to move non-sequentially through the workflow.
You can add a 3rd outcome to the div manager task for corrections and send the workflow back to the section manager to do it again. (would probably add in an email before the change stage on the corrections outcome to let the section mgr know what they have to do)
Check out the help file for the action
Also in the learn.nintex.com (Nintex University) check out the course 'Automating Complex Processes - Nintex Workflow Cloud'. It has some training exercises on branch by stage.
Check out the youtube video too.