- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 04:43 AM
Hi Everyone,
My requirement is to add another condition like 'Approved' and 'Rejected', called 'Partially-Approved' in the Approval User Activity,
so I have created the condition 'Partially-Approved' in the workflow activity
and added the same in Choices of State field on Approval(sys_approval_approver) table.
And in the condition field added : activity.result =='partially_approved'
Now, when I select approve or reject the workflow goes to the next activity but not when I select Partially Approved in the
approval table record, it gets stuck in the same activity and doesn't proceed.
I am sure I am missing something, I don't know how does the activity.result gets set to the state(like in case of approve and reject)
Can someone please help me on this.
Thanks in advance
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2018 12:04 PM
The workflow approval activity will return Approved or Rejected, regardless of the extra choice.
In your Approval - User workflow activity, you need to switch to a script to monitor results:
Then find the business rule: SNC - Run parent workflows (Approval), and duplicate it.
Change the condition to be: current.state.changesTo('partially_approved')
Test it out

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 05:19 AM
There are 2 business rules named: SNC - Run parent workflows (Approval) - with different conditions. You will need to modify the one and add your new state into the conditions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 05:59 AM
Hi Michael,
Thanks for the reply, I didn't understand how modifying the condition will help me, but I tried it anyway and added
|| current.state.changesTo('partial_approval') in the condition of the Business Rule "SNC - Run parent workflows (Approval)"
and it didn't work.
Can you please elaborate on this one, how this will work? do I have to change the script includes WorkflowApprovalUtils, Workflow etc?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 07:38 AM
The business rule should trigger the workflow to continue if the activity results matches.
Make sure the value on your new choice is lower case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 11:45 PM
I am not sure how activity results are calculated, is it simply the value of new state on approval record?
The new choice value is in lower case only and condition is added to the "SNC - Run parent workflows (Approval)" still no luck.