Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

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.
#814417
I have a BPMS case that is still in paused but has the COMPLETED status in APPLICATION. I also can't unpause it since the case is completed so I don't have the 'Actions' Menu in Advanced Search.

I guess it's a bug ? What happened is I had 2 parallel tasks. One was a script event due to execute in 5-10 minutes and the other was a task assigned to someone. The person who had the task completed it before the other paralell task was executed so the case was paused. 2-3 minutes after it was paused, the parallel task executed the script task and went to the end point for this branch.
#814420
Was the case paused because it is waiting for an intermediate timer event? or because the case was paused by a user?

If the case was paused by an intermediate timer event, have you tried manually executing the timereventcron.php script? Do you see any error message?

If the case was paused by a user, then you can try this:

Create a new process that will execute the following trigger:
Code: Select all
$caseId = 'XXXXXXXXXXXXXXXXXXXX';
$delIndex = X;
$userId = 'XXXXXXXXXXXXXXXXXXXXX';
$oCase = new Cases();
$oCase->unpauseCase($caseId, $delIndex, $userId); 
Find the record of the paused case in the database with this query:
SELECT * FROM APP_DELAY WHERE APP_TYPE='PAUSE';

In your trigger, set the value of $caseId to the APP_UID, $delIndex to the value of APP_DEL_INDEX and $userId to the value of APP_DELEGATION_USER.

Note: if you don't know the APP_UID of the case, then look it up in the APPLICATION table by searching for the APP_NUMBER (which is the case number).
#814434
amosbatto wrote:Was the case paused because it is waiting for an intermediate timer event? or because the case was paused by a user?

If the case was paused by an intermediate timer event, have you tried manually executing the timereventcron.php script? Do you see any error message?

If the case was paused by a user, then you can try this:

Create a new process that will execute the following trigger:
Code: Select all
$caseId = 'XXXXXXXXXXXXXXXXXXXX';
$delIndex = X;
$userId = 'XXXXXXXXXXXXXXXXXXXXX';
$oCase = new Cases();
$oCase->unpauseCase($caseId, $delIndex, $userId);
Find the record of the paused case in the database with this query:
SELECT * FROM APP_DELAY WHERE APP_TYPE='PAUSE';

In your trigger, set the value of $caseId to the APP_UID, $delIndex to the value of APP_DEL_INDEX and $userId to the value of APP_DELEGATION_USER.

Note: if you don't know the APP_UID of the case, then look it up in the APPLICATION table by searching for the APP_NUMBER (which is the case number).
It was paused by a user. I don't really want to unpause the case. I just want the case to have a 'TO_DO' status and not a 'COMPLETED' status. This trigger is great to unpause a case but it implies that I manually look through the 200 paused cases to see which ones needs to be fixed which is not really what I want since i would need to do that everyday.
#814435
File a bug report about it and provide a sample process for the dev team to test it. Also post a link to your bug report.
Currency Format in Textbox

I have it working but I noticed that it does not a[…]

I am having an issue with summing the values in a […]

Cancel Cases

Hello, I´m not sure if this would help with […]

Hello, The similar topic has been discussed here:[…]