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.

2 Likes

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

Abhijith,
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.

Regards,
Senthil

Do you have the latest fixes installed?

Abhijith,

If you’re updating the task with flow service please check the case (use completed with small ‘c’) of the status as it only accepts limited values. in any other case task will be completed but the progress will remain same in Process.

this might also be an issue

Hi Zainul

We tried that too but now encountering a different one.

Status of Task is completed and process is completed but the control is not going back to Process

In other words the green tick on Task is having play symbol which is started but I see task is completed

Weird but true the steps after tasks are not getting completed but the process is showing as completed in MWS

Regards
Abhijith

Create a ticket if it doesn’t make sense. You will get a faster result.

When published from Designer and i can accept and continue in MWS and the process is complete and task complete too

When published from Designer and if i accept it and complete from DSP form

Now this is solved for good. I have changed the services to call from task client by dividing accept and complete into separate DSP pages

and once they are executed the control is going back to process and it’s getting completed.

Checking how to authenticate DSP pages and not to allow users to access pages separately rather go from login pages to other pages.

1 Like

Abhijit, are you accessing task list and users work on task via IS admin UI, not MWS UI? Raising this question as you mentioned DSP.

Abhijit I have a question, is there any need to accept and then complete the task while you can directly accept the task by completing it.

for DSP page, you can use conditions as well to access multi-pages in a single page.
no need to visit separate pages

Hi Zainul

We have a functionality where the user instead of completing the task need an option to send the task back for more info
So that is the reason I had to use accept in one screen and once the accept is pressed view the task data from form and if everything is correct complete the form

Else return the form to user

Yes we are using everything via IS Admin UI for some reasons which I can’t disclose.

So no UI developer at our end so had to implement in DSP as I don’t have any exp in Angular or others.

We are almost successful with the implementation where logged in user can view the assigned task and check the data entered by user.

Checking the possibility as how to send back task in case if there is a discrepancy in data

Regards
Abhijith

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.