Due to various reasons it can happen that a task on a system ends up without any user assigned to process it. This may be because roles / groups that define assignees to a task are empty or the assignees were deleted. This script provided here identifies these tasks and print them out in a JSON format.
The script 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.
Parameters
This script supports passing various parameters explained below.
...
targetSystemPort (default: 8080)
Port of the target system.
username (empty by default)
Name of the user who is authorized to perform the script's actions. In particular, this involves
the functional right MANAGE_PROCESSES.
password (empty by default)
Password of the provided user.
...
creatorId (not set by default)
Filter parameter to search for processes started by a specific user.
Prerequisites
At first, the script will check if the target system identified by parameters targetSystemIp and targetSystemPort is reachable and running. After that, it will be checked if the provided credentials username and password are valid on that system and if the user has the required privilege MANAGE_PROCESSES.
If not, the script will terminate with an appropriate error message.
Example
An example call of the script with target system localhost:8080 (set by parameter’s default values):
...
Processes are filtered for running processes (set by default) and started by a model with one of the passed IDs.
Example output
Code Block |
---|
[ { "ActivityId": "37D6BEE1BFE84ECE9E10BDA0D385AB6F", "ModelName": "EmptyRole", "ModelId": "951049FDF8E14100BE7D810A2F018177", "Link": "http://localhost/app/management/index.html#/processdetails/7C854FEAF9CA4AD89FA5653A7E5CF072", "ProcessName": "EmptyRole 218", "ProcessId": "7C854FEAF9CA4AD89FA5653A7E5CF072", "Reason": "Empty groups or roles.", "ActivityName": "actWorkItem" }, { "ActivityId": "3D4BE4E4140D4275A93789C1155C5577", "ModelName": "LoopFlow", "ModelId": "39B5B353A90141C9B4751E07344D97B8", "Link": "http://localhost/app/management/index.html#/processdetails/2CA098BD1F9E4E428F7969567D3E6758", "ProcessName": "LoopFlow 2", "ProcessId": "2CA098BD1F9E4E428F7969567D3E6758", "Reason": "Performer does not exist.", "ActivityName": "Start" } ] |
Every JSON output element contains an attribute Reason stating the reason why this task has no users as well as some more attributes.
Script version history
Script Version | Date | Compatible core-service version | Author | Description | Download | ||||
---|---|---|---|---|---|---|---|---|---|
1.2 | 28th Nov 2023 | - | A-Team |
|
| ||||
1.1 | 10th Nov 2023 | - | A-Team |
| |||||
1.0 | 24th Oct 2023 | - | A-Team | - |
...