Cancel a workflow by requester
This page will explain how to configure the cancellation of a workflow by the requester and how it can be used in Memority portal.
Use Case
Without any explicit configuration a requester cannot cancel its own tasks from the dashboard. However, we offer the configurator the possibility of modifying this behavior to enable this action.
This page will explain how to configure this specific case and how it can be used in Memority portal.
Configuration
Global cases
For cases where the behavior is the same for all workflow steps, or if the workflow consists of just one step, there is in the workflow configuration screen, the Allow cancellation by requester parameter that allows the configurator to authorize or not the cancellation of the workflow by the requester himself.
![Capture d'écran 2024-05-16 102153-20240516-082331.png](../../__attachments/701005928/Capture%20d'%C3%A9cran%202024-05-16%20102153-20240516-082331.png?inst-v=23d06e63-6973-4052-aaa5-c79093e792e5)
Workflow configuration screen - Cancellation by requester
Other cases
In cases where the behavior is not the same for all workflow steps (one step is cancelable and the next is not), it is possible toset the flag using the API_WORKFLOW.
<scriptTask id="initScriptTask" name="Some Script Task">
<script>
<![CDATA[
API_WORKFLOW.setCancellationByRequesterAllowed(true)
LOG.info("Can requester cancel its tasks ? " + API_WORKFLOW.isCancellationByRequesterAllowed())
return ActionOutcome.success()
]]>
</script>
</scriptTask>
If cancellation by requester is no more suitable later in the process, turn the flag off using the same setter method.
Notifications Events
The following Notifications Events are dedicated to the use case of a workflow cancellation by the requester :
Notification event type | Location | Actors | Payload contains ... |
---|---|---|---|
CITADEL_WORKFLOW__FEATURE_EXECUTION | BUM | senders
recipients
| Variables:
|
CITADEL_WORKFLOW__ROLE_ASSIGNMENT_OPERATION_EXECUTION | BUM | senders
recipients
| Variables:
|
Identity link types
Possible values for identity link types are :
assignee
candidate
Usage
Workflows can be canceled by the requester from the workflow dashboard:
Workflow Dashboard
Steps | Preview | |
---|---|---|
1 | As an identity with the right to act on objects, perfom an operation triggering a workflow, for example here as a manager we will update the end contact date of one of the people in our scope. | ![]() |
2 | Click on the Update button. | ![]() After confirmation of the operation, a second pop up is displayed : ![]() |
3 | When accessing his workflow dahboard, in the submitted by me part, the user task is displayed. And a button is available to Cancel the workflow. | ![]() |
4 | If applicable (configuration), enter a comment and Confirm the cancellation. | ![]() |
Role
In the case of workflow concerning a role assignment, it can also be cancelled by the requester directly from the beneficiary's role dashboard
Steps | Preview | |
---|---|---|
1 | As an identity with the right to act on objects, request a role for another identity (one triggering a workflow which has been configured to be cancelable by the requester). | In this example, we have a request button in the workflow dashboard to allow the request of a role : ![]() After clicking on it, we can select a role : ![]() |
2 | Once, the role request has been made, access the role dasbhoard (of the beneficiary) and click on the action button for the concerned role. | ![]() |
3 | In the pop-up, click on the Cancel Workflow button. | ![]() |
Read Next
- Actors
This page details the different types of actors that can be involved in a workflow.