Hello ,
I have a sequential workflow
1. Process Step (Custom Process step)
2. Participant Step (Custom participant step returning group name)
3.Process step(Approval step)
I have made use of workflowData.getMetaDataMap().get("groupPath") and workflowData.getMetaDataMap().put("groupPath","test");
Please let me know.
Solved! Go to Solution.
Hi Nicole,
I am not exactly sure what you're trying to do - are you saying that in Step2 you use a Dynamic Participant step to assign to a group of users, and on Step3 you would like to know which user from that group completed the workitem?
If that is the case, you can dig into the workflow history to determine which user completed the previous workitem. Something like:
List<HistoryItem> historyItems = workflowSession.getHistory(workItem.getWorkflow()); String userWhoCompletedLastStep = historyItems.get(historyItems.size() -1).getUserId();
Hopefully this helps - let us know!
Will
Hi Nicole,
I am not exactly sure what you're trying to do - are you saying that in Step2 you use a Dynamic Participant step to assign to a group of users, and on Step3 you would like to know which user from that group completed the workitem?
If that is the case, you can dig into the workflow history to determine which user completed the previous workitem. Something like:
List<HistoryItem> historyItems = workflowSession.getHistory(workItem.getWorkflow()); String userWhoCompletedLastStep = historyItems.get(historyItems.size() -1).getUserId();
Hopefully this helps - let us know!
Will
Anyone?
Views
Replies
Total Likes
Will McGauley wrote...
Hi Nicole,
I am not exactly sure what you're trying to do - are you saying that in Step2 you use a Dynamic Participant step to assign to a group of users, and on Step3 you would like to know which user from that group completed the workitem?
If that is the case, you can dig into the workflow history to determine which user completed the previous workitem. Something like:
- List<HistoryItem> historyItems = workflowSession.getHistory(workItem.getWorkflow());
- String userWhoCompletedLastStep = historyItems.get(historyItems.size() -1).getUserId();
Hopefully this helps - let us know!
Will
Thank you Will, that helped a lot.:)
I asked Eng to take a look at this.
Views
Replies
Total Likes
Hey Will,
I am trying to access the metadata property/ node in the workflow process step, which is after the custom participant step.
I have added the following lines which works fine if it was series of process steps, but now that i pass data from participant step I see it not possible to extract.
workflowData.getMetaDataMap().get(langCode) - in process step that follows the participant step -Returns null in workflow
I also see that when i run the code with workflowData.getMetaDataMap().put("test",test) at participant step it doesn't get stored ,
Please let me know.
Views
Replies
Total Likes
One thing that I'd like to point out is that there are two different workflowData objects in play all the time:
1) workItem.getWorkflowData() returns metadata for just the workitem
2) workItem.getWorkflow().getWorkflowData() returns metadata for the entire workflow
From your code snippets I cannot tell which WorkflowData you are referring to, perhaps this was part of the problem?
Will
Views
Replies
Total Likes
Figured it out. Thanks :), extracted using the node.getProperty, wondered if there was a simple way to do it, using API's
Thank you scott, really appreciate the help.
Regards,
Nicole
I am glad that you got that solved.
Views
Replies
Total Likes
Views
Likes
Replies