How to Fetch Approval Groups from the Workflow associated to a Catalog Item ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2019 09:17 AM
Hi Community
Is there any mechanism that can pull the list of groups used in the "Approval user" and Approval group" activities of a workflow associated to a Catalog Item ?
The Script should be in a way that, When I run the Script It should display the Name of the Catalog Item, Name of the workflow and list of Approval groups used in the "Approval user" and "Approval group" activities.
I really Appreciate your help.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 11:09 PM
Hi
Yes, that is possible.
Each executed Workflow will have a record in the Workflow Context table [wf_context].
This workflow will have a reference top the "Workflow Version", that is used for this one particular instance of the executing workflow. (Because each time, you change your workflow and publish it, it will get an NEW version, the version, which was published, when the workflow fired, is referenced in the Workflow Context).
Remember, that you cannot distinguish different Workflow Versions just by the name! The all look the same, but in the background, they point to different versions.
Then, you need to filter the table [wf_activity] table by the workflow version used in the given context.
Doing so, you can find the "Approval - Group" and "Approval - User" Workflows Activities and use the script shown by me above.
I hope this answers your question.
BR
Dirk

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2019 10:48 PM
HI
Do you hava any update on your topic?
Does my answer help or solve your issue?
Just let me know and mark as correct or helpfull.
BR
Dirk