Discussion
Pegasystems Inc.
JP
Last activity: 16 Dec 2023 11:26 EST
How to recall a submitted assignment
Hi,
Sometimes, after you submit your assignment, you may want to recall it for correction before it's approved. In this post, I will share a couple of simple approaches to build it.
- Script approach
1. Create a flow action rule and configure it in the local action of the assignment shape you want to recall from. In this example, I created a flow action named "Recall".
2. Create a section and place a button for recall. For this button on click event, add an action and configure Run Script as below.
- Function Name: script:pega.u.d.submit
- Parameters
Name: (blank)
Value: pyActivity=GoToPreviousTask&previousAssignment=true
- Ticket approach
1. Create a ticket and configure it in the assignment shape you want to recall to.
2. Create a flow action rule and configure it in the local action of the assignment shape you want to recall from.
3. Create a section and place a button for recall. For this button on click event, add an action and configure SetTicket activity and Finish Assignment as below.
- FAQ
Q: I want to configure recall function only when the previous assignment was submitted by myself. How can I accomplish this?
A: You can configure When condition in flow action. In this example, I have set WorkParty for the user who submitted the previous step and compared it with current requestor. Be noted, if you don't have permission to perform Step 2, recall local action will be also not displayed and you may have to take other approaches than local action.
Q: If I want to make this recall function available for all steps throughout the case type lifecycle, is it possible?
A: You can configure flow action for case wide actions in case type rule so user will see the menu for any steps. The very first step won't work as there is no prior step, but all other steps should work. Similarly, you can configure flow action to stage wide actions (case type rule) or flow wide actions (flow rule).
Q: Above two approaches can be used when you want to take back only one step before. If I want to take back multiple steps, is it possible?
A: For Ticket approach, you can take back to wherever you configured ticket in the same flow rule. For Script approach, run activity "GoToPreviousTask" directly and specify the TaskName parameter (*) that you want to take back to. Be noted, both Ticket approach and "GoToPreviousTask" approach work only within the same flow rule.
* For TaskName parameter, you should copy the value from pyFlowStep in the clipboard. This value is different from pxTaskLabel. If you mistakenly enter value which doesn't exist, you will be taken back to the first step rather than runtime error.
Thanks,