In reply to: Marcin Borowiec
bump, anyone got any idea on how to fix it?
Hi,
this is really an interesting behavior.
While it is possible the below case is possible , this is not possible for the current workflow instance.
- Checkout workflow instance 1 / open in edit mode
- Execute REST action from workflow 2 to delegate a task of workflow 1
- Edit and save workflow 1
- Changes and delegated task is shown after saving workflow 1
I have to admit that I didn't come up with delegating task via the API. This is a lot easier than creating a path on each step to update the tasks. At least if the original task owner should still be assigned.. If this shouldn't be the case, then there's no way around than using paths.
While this is an interesting finding it doesn't help much.
If you want to stick to the delegation option, then I see only one reliable solution. Start a "technical delegation workflow", populate and item list with all the workflow instances which should be updated:
- Instance id
- Assigned to user
- Delegate to user
Add a timer to the step in which the workflow has been saved and this will then execute the delegation with a short delay. This would allow that the button execution is finished before the delegation has been executed. Even if the delegation would fail, the users could continue to work and you could create a task/mail to look at this technical workflow.
The only other alternative would be a path. If you don't want to show it as a path but as a button. You could hide the path with a form rule and add a hyperlink action to the button with:
javascript:MoveToNextStep({PH:355})
Best regards,
Daniel