There a Better Way to Handle Dynamic Workflow User Task Completion?

0
We are trying to implement workflows in our application using Mendix 11.6.4 without Workflow Commons.Our current design includes the following custom entities:WorkflowRequest: an intermediate entity associated with both System.Workflow and the target business entityUserTaskTimeline: an entity that stores snapshot-like information for all workflow user tasks at the time of application submissionUserTaskDetail: an entity associated with UserTaskTimeline, created for each approverThe issue we are facing is related to the approval logic.We want to retrieve the target System.WorkflowUserTask entity dynamically and complete it with a result such as Approve or Reject. However, in microflows, the only available option seems to be the CompleteWorkflowUserTask activity.The problem is that this activity appears to be static. For example, if there are five different User Tasks in the workflow, we would need to place five separate CompleteWorkflowUserTask activities in the microflow. This becomes difficult to maintain and does not scale well.Is there any recommended approach or best practice to handle workflow user task completion in a more generic or dynamic way?
asked
1 answers
0

A potential option for this would be to create a Java action that uses the Java API to complete a given user task with a given outcome. For this you can use the UserTask.complete() method, as it accepts the outcome as a string.


For us to learn, can I ask why you do not (want to) use Workflow Commons?


Hope this helps!

answered