Due to various reasons it can happen that a task on a system ends up without any user available to process it. This may happen because roles users / groups or roles that define assignees to a task are empty (no performers are configured) or the assignees were deleted and no longer exist. The first script provided here identifies these tasks and prints them out in a JSON format or saves them in a JSON file. With the second script it is possible to reassign these tasks based on some rulescriterias. They You can be downloaded from the bottom of download them from this page.
The scripts uses REST calls to communicate with the target system. If the target system returns an error status code, the error details will be printed on the command line.
...
This script identifies tasks without any users and print prints them out in JSON.
Parameters
...
Code Block | ||
---|---|---|
| ||
[ { "ActivityId": "7C5C8AA9A6A24F71B4F17F9C3E2350EE", "ModelName": "ComplexFlow", "ModelId": "A7DDB1648BEF4D2B8545BB173DBC2DB1", "Link": "http://localhost/app/management/index.html#/processdetails/43F7FC4D83054CBAA4553804D9EBCEAA", "ProcessName": "ComplexFlow 15", "ProcessId": "43F7FC4D83054CBAA4553804D9EBCEAA", "Reason": "No existing performers.", "ActivityName": "verification" }, { "ActivityId": "6BEDE7FD2CE64C92A47B607B4B5F1577", "ModelName": "ComplexFlow", "ModelId": "A7DDB1648BEF4D2B8545BB173DBC2DB1", "Link": "http://localhost/app/management/index.html#/processdetails/5D18FD2C779C4524826681411AD4B8EA", "ProcessName": "ComplexFlow 16", "ProcessId": "5D18FD2C779C4524826681411AD4B8EA", "Reason": "No configured performers configured.", "ActivityName": "verification" } ] |
Every JSON output element contains an attribute Reason stating the reason why this task has no performers as well as some more attributes. Currently, these These are the possible reasons:
No configured performers configured: There are no performers configured for this task because the list of configured performers is empty.
No existing performers: There are pe rformers configured for this tasks but none of them exist on the system.
No resolved performers (only for core-service version 10.0 or higher): The task has included and excluded performers configured, but the list of resolved users is empty. This may happen because the task has the exact same list of included and excluded performers configured.
...
This function loops through all tasks and reassigns a task to a user with the given ID if the property has the expected value. If not, this the task will be skipped and not reassigned.
...
This function loops through all tasks and reassigns a task to a user with the given ID if the condition applies. If not, this the task will be skipped and not reassigned.
...
If the task has no variable with the given name, it will be skipped.
You can find some examples on how to call these functions in the script.
Example
This script needs a list of tasks that should be reassigned. You can provide this list either ...
...
Script Version | Date | Author | Supported core-service version | Description | Download | ||||
---|---|---|---|---|---|---|---|---|---|
2.0 | 15th Mar 2024 | A-Team | 10.0 or higher |
|
| ||||
1.0 | 24th Oct 2023 | A-Team | up to 9.x | - |
|
...
Please note that these scripts are not part of the product and are not officially supported.
...