...
Code Block | ||
---|---|---|
| ||
[ { "ActivityId": "37D6BEE1BFE84ECE9E10BDA0D385AB6F7C5C8AA9A6A24F71B4F17F9C3E2350EE", "ModelName": "EmptyRoleComplexFlow", "ModelId": "951049FDF8E14100BE7D810A2F018177A7DDB1648BEF4D2B8545BB173DBC2DB1", "Link": "http://localhost/app/management/index.html#/processdetails/7C854FEAF9CA4AD89FA5653A7E5CF07243F7FC4D83054CBAA4553804D9EBCEAA", "ProcessName": "EmptyRoleComplexFlow 21815", "ProcessId": "7C854FEAF9CA4AD89FA5653A7E5CF07243F7FC4D83054CBAA4553804D9EBCEAA", "Reason": "EmptyNo existing groupscandidates or roleseditor.", "ActivityName": "actWorkItemverification" }, { "ActivityId": "3D4BE4E4140D4275A93789C1155C55776BEDE7FD2CE64C92A47B607B4B5F1577", "ModelName": "LoopFlowComplexFlow", "ModelId": "39B5B353A90141C9B4751E07344D97B8A7DDB1648BEF4D2B8545BB173DBC2DB1", "Link": "http://localhost/app/management/index.html#/processdetails/2CA098BD1F9E4E428F7969567D3E67585D18FD2C779C4524826681411AD4B8EA", "ProcessName": "LoopFlowComplexFlow 216", "ProcessId": "2CA098BD1F9E4E428F7969567D3E67585D18FD2C779C4524826681411AD4B8EA", "Reason": "PerformerNo doesperformers not existconfigured.", "ActivityName": "Startverification" } ] |
Every JSON output element contains an attribute Reason stating the reason why this task has no users as well as some more attributes.
...
By using a pipeline, you can search for tasks without any users and reassign them in one single command. The tasks found by the first script will be directly passed to the second script.
Example output
Code Block | ||
---|---|---|
| ||
2 task(s) found to reassign.
Loop through all tasks and reassign them based on value of property: 'ModelName':
If value equals 'ComplexFlow' assign to performer with id '42636D649F14415A895752454B8E480B'
Otherwise, assign to performer with id '1EF9EB6E7F2F41D69D5408609CFF5FFD'.
If task has no property with this name, it will be skipped.
----------
1/2: Task with activity id '7C5C8AA9A6A24F71B4F17F9C3E2350EE'
-> SUCCESS: Performer with id '42636D649F14415A895752454B8E480B' added to list of included performers.
----------
2/2: Task with activity id '6BEDE7FD2CE64C92A47B607B4B5F1577'
-> SUCCESS: Performer with id '42636D649F14415A895752454B8E480B' added to list of included performers.
----------
2 task(s) reassigned. |
Script 2 version history
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 | - |
|
...