BPM Process is always in started state even if the tasks are already completed

We have a requirement to call BPM task and as per that we are calling the task engine APIs to update the tasks and they are working fine.

But the process state is always in start sate instead of complete.

pub.prt.admin:changeProcessStatus is the service we used to change the status but it is not changing.

For accepting and updating task we used below and they worked fine

wm.task.wmtaskaccept:_post - to accept the task

wm.task.taskclient:updateTask - to update the task

Any thoughts on this. We are using 10.15 with the latest fixes.

Its been so long since I did BPM development so I might be wrong. But looks like you are not ending task1, you need to connect that to either an error(don’t remember error part clearly) or end event to terminate a process like you did on validOrder. As it is now, it will only terminate valid orders.

1 Like

We tried that too. But the thing is if we go to MWS and accept and complete the task it works as expected even if the task is not ended.

But while calling it via flow services it is not getting completed at all

It’s good that you are able to see it working from one place ie., MWS. You can nail out the reason.

When you perform the operation on UI, there are set of task API executed behind that makes process to complete. What task API’s are triggered while acting on it can be found out by enabling ‘task audit’ by logging into MWS using sysadmin. Once done, perform the operation from MWS by accepting and completing the task. In task audit view as well as in the full.log file, you can find out all the task API’s that got executed for updating the task that made process instance complete. Compare this task API calls with the logic that you performed in IS/PE flow service and see what’s missing.

Personally, I like Task Engine very much. It has got amazing capabilities, but sensitive. It becomes even more interesting when there are concurrent execution of tasks in a clustered environment (task engine cluster), race conditions, locking/unlocking during task updates and several other optimizations needed to achieve quality of service. :slight_smile:

Try it and let us know.


Do you have the latest fixes installed?