Reusing an approval activity in a workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2018 06:15 AM
Hi Everyone,
I'm trying to create a dynamic approval workflow that will be used as a subflow in catalog item workflows. I'm trying to add conditions that would route the workflow back to an Approval - User activity if a second round of approvals is needed for the item. The issue i'm experiencing is that when the workflow routes back to the approval activity to send out the second round of approvals needed it erases the approvals for the item from the previous rounds. Only the current round of approvals exist on the item. I've tried having the approval activity in a separate subflow that is called by this workflow, but get the same behavior.
Looking into it a bit it seems like the OOB workflow 'Item Designer - Approvals' does this very same thing, but it doesn't erase the previous approval records when executing future approval rounds - which is what i'm trying to achieve, but can't seem to figure out why this one behaves differently than what i'm creating.
Has anyone worked around this issue or have any idea on how i can reuse the approval activity without it removing the previous approvals?
Thanks,
David Bernard

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2018 06:29 AM
I ran in to this years ago, but things may have changed since 2011. 🙂 The way I dealt it back then was to log the approval/rejecting in to the parent record's activity history (as comments/work notes) so there was a history of what was approved/rejected later.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2018 01:12 PM
Thanks for the reply Chuck. I had thought of that, but would like to keep the approval records intact for auditing. It's weird that, that OOB workflow behaves the way i want mine to, and i can't seem to determine any reason for the difference in behavior.
Thanks again,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2018 05:56 AM
Hi Chuck I worked this out. If you call ths OOB function before rerunning the approval activity:
sc_ic_Factory.wrap(current,gs,workflow)._disassociateExistingApprovalsFromWorklow();
It will remove the wf_activity reference on the previous approvals so that the next time the approval activity runs it doesn't delete the previous approvals that went out.
Thanks,
David Bernard