Relationship Between Knowledge Approval Tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 10:43 AM
I am attempting to add a related list to my knowledge table form. In the lifecycle of our knowledge articles (we have some that are 7 years old), it may generate dozens of approvals based on our initial approval and renewal workflow. My idea was to add a related list which will show only approvals for active workflow contexts to filter out old, cancelled, or no longer required approval records.
This sounds easy enough, but I just can't find a unique link between my wf_context records and my sysapproval_approver records in order to create the relationship. Each tree of reference fields I go down ends up at a table that is not unique to that context. However, I do know that such a relationship exists: if you cancel an active workflow context, it WILL change all related sysapproval_approver records to "cancelled".
Thanks for your help!
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 11:00 AM
There is a hidden attribute on the sysapproval_approver called Workflow activity (wf_activity). You won't see it when using the condition builder because its active flag is false. But this field is a reference to the workflow activity (wf_activity) that generated the approval.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 11:53 AM
Hi Michael,
I noticed that wf_activity records do not link directly to wf_context, and I don't see wf_context nested somewhere below wf_activity either (not workflow_version, parent, or stage). Since the wf_activity records are not unique to a specific wf_context, and are generic to ALL approvals from that same workflow, I still cannot group sysapproval_approver records by a unique wf_context.
For example: grouping sysapproval_approvers by workflow activity shows that my "publishers" workflow activity has several hundred approvals related to it.
Again, I know that there must be a relationship somewhere, as approvals related to only a specific context are cancelled when I cancel a context.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 12:07 PM
What happens if you search for a record in wf_context table with the record sysid. If you find multiple, delete the one you want and see if approval gets cancelled?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 01:57 PM
I found one with multiple contexts and cancelled the active context. This cancelled all pending and future approvals. It would be difficult to verify if it cancels only the ones related to that context as I can't find a record with more than one active context. I tried tricking the article into opening more than one active workflow context but it is too smart for me.