How to redirect workflow,

0
Hello Mendix Team Currently im using Mendix.Worklfow, My Flow like image below   task Approval already receive by Approval1 with Role Approval1   I try to assign Apporval1 to another user (ex: Approval1_Changer)with assumption current approval on leave the Task can view by Approval1_changer but can't approve   how to handle it? and did you have best practice?   thanks
asked
4 answers
0

Hi Fedrick,

what is the error you are getting on approving by new approver

 

answered
0

The error is, when I want to add a user to the approve1 role, he cannot approve the given task.

 

or is there a more practical way?

 

thanks

answered
0

A task can only be completed by the user who is set as assigned user. For a single user task there can be multiple targeted users, but only 1 assigned user. In case another user needs to complete the task, then you first need to "unassign" the task by removing the assigned user association and then assign it to another user by creating the assigned association. In the Workflow Commons module there are various examples (e.g. buttons with microflows) that might be usefull to understand how this works.

answered
0

Hi Fedrick,

 

In the User Task --> you set the target user to Approval1 so the task assigned to the that user. 

You can use oncreated event in that user task to call microflow. In that flow you can check Approval1 is leave or not based on the condition. If the Approval1 is on leave.  use change usertask object --map the 

System.WorkflowUserTask_TargetUsers to Aproval1_changer and 

System.WorkflowUserTask_Assignees to Aproval1_changer.

 

Thanks,

Arun

answered