Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By stevensi1018
#814078
Hi, I've been implementing a cancellation function in an external application that can cancel a processmaker case with REST API. It works really well for most cases but I'm wondering why it doesn't set the APP_STATUS to 'CANCELLED' when there are multiple tasks in a process. For example, one of our case has 3 opened tasks, I used the API call to cancel it, one of the task disappeared but the APP_STATUS is still = 'TO_DO'.

Any way to fix that ? Even if I call the function again, it doesn't work, the 2 tasks still remain open

Also, the cancel case function doesn't seem to work for paused case. Any way to make it work instead of unpausing case with REST API then call cancel function with REST API ?

Thanks
User avatar
By amosbatto
#814085
The problem with canceling a case when there are multiple parallel tasks in the case is a long-standing bug, that is also a problem with PMFCancelCase(). If I have time tomorrow, I will look at the source code to see if I figure out a workaround in Cases::cancelCase() which is defined in workflow/engine/classes.cases.php.

As for the problem canceling cases which are paused, you have already found the solution of unpausing the case and then canceling it.

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]