Hi All,
This is regarding a problem i am facing in the workflow, i have attached the screen-shot of the workflow which i have created PFA.
In the workflow 'Email to Approver' is a process step, i have created EmailProcessStep.Java class implmenting WorkflowProcess interface to handle this step, 'Validate Content' is a participant step.
I want to know the user/group attached to 'Validate Content' participant step in EmailProcessStep class.
I tried to get it using List<WorkItem>list = item.getWorkflow().getWorkItems(), but it is returning an empty list.
Can anybody tell how to find?
Thanks in advance,
Rgards,
Pavan Bukka.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You will need to lookup the workflow history to find the previous workitem. the getWorkItems() api you are using only returns active workitems for the workflow instance.
To load history you must call the following:
worklfowSession.getHistory(item.getWorkflow())
Hope this helps,
Will
Views
Replies
Total Likes
"I want to know the user/group attached to 'Validate Content' participant step"
I am not sure that the Workflow API offers you this functionality. I am checking with Eng members.
List<WorkItem>list = item.getWorkflow().getWorkItems()
will not give your that information,
One way you can workaround it (assuming it does not have this functionality) is to create a Dynamic Participant Step.
https://helpx.adobe.com/experience-manager/using/dynamic-steps.html
This will select the user to assign the workflow item. Then have your custom step logic track who the task was assigned to. Maybe persist the information in the JCR.
When when you need that information later in the workflow - use the JCR API to read the JCR node prop that stores that information, If the workflow has multiple users, you can store in multiple nodes - have a 1-1 relationship.
Hope this helps
Views
Replies
Total Likes
Hi,
You will need to lookup the workflow history to find the previous workitem. the getWorkItems() api you are using only returns active workitems for the workflow instance.
To load history you must call the following:
worklfowSession.getHistory(item.getWorkflow())
Hope this helps,
Will
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies