Page 1 of 1

How to re-open completed case in Process Maker

Posted: Fri Jun 17, 2016 3:36 am
by MitraDeepak
Hello Friends,

I want little bit help from you.

How can I re-open the completed case in Process Maker

if anyone knows, Kindly let me know...

Regards
MitraDeepak

Re: How to re-open completed case in Process Maker

Posted: Fri Jun 17, 2016 4:03 pm
by amosbatto
If you are using the community edition, you can use this code:
Code: Select all
if (isset(@@caseToReopen) and !empty(@@caseToReopen)) {
	$caseId = @@caseToReopen;
	//get last delegation index:
	$query= "select * from APP_CACHE_VIEW where APP_UID='$caseId' order by DEL_INDEX desc";
	$aCases = executeQuery($query);
    if (!is_array($aCases) or count($aCases) == 0) 
		die("Error: Unable to find case with ID '$caseId'");
	
	$index = $aCases[1]['DEL_INDEX'];
	$c = new Cases();
	$result = $c->ReactivateCurrentDelegation($caseId, $index);

	$query = "update APPLICATION set APP_STATUS='TO_DO' where APP_UID='$caseId'";
	executeQuery($query);

	$query = "update APP_CACHE_VIEW set APP_STATUS='TO_DO' where APP_UID='$caseId' and DEL_INDEX=$index";
	$aCases = executeQuery($query);
}

Re: How to re-open completed case in Process Maker

Posted: Sat Jun 18, 2016 12:09 am
by MitraDeepak
Thanks amosbatto,

I will try it with trigger, let you know.


Regards,
MitraDeepak

Re: How to re-open completed case in Process Maker

Posted: Mon Jun 20, 2016 4:37 pm
by amosbatto
Oops, I see that I had an error in my code, which I fixed in the previous post.
It should be count($aCases) == 0 instead of count($aCases) = 0

Re: How to re-open completed case in Process Maker

Posted: Fri Dec 14, 2018 5:15 am
by bgone1969
Hi Amosbatto,

Where should place this trigger?

Thanks & Best regards.

Re: How to re-open completed case in Process Maker

Posted: Fri Dec 14, 2018 10:29 pm
by amosbatto
bgone1969 wrote:Hi Amosbatto,

Where should place this trigger?

Thanks & Best regards.
I have created a process that you can use to execute this trigger:
(25.21 KiB) Downloaded 854 times
You need to enter the case number of the case to reopen.

In your workflow/engine/config/execute-query-blacklist.ini file, change from:
queries="INSERT|UPDATE|REPLACE|DELETE"
To:
queries = "INSERT|REPLACE|DELETE"

Re: How to re-open completed case in Process Maker

Posted: Tue Nov 16, 2021 12:14 pm
by tomonthelam
We are running version 2.0.39. Will this work with our version? The file will not import into the designer.

Re: How to re-open completed case in Process Maker

Posted: Tue Mar 21, 2023 3:19 am
by thomas32
MitraDeepak wrote: Fri Jun 17, 2016 3:36 am Hello Friends,

I want little bit help from you.

How can I re-open the completed case in Process Maker

if anyone knows, Kindly let me know...

Regards
MitraDeepak
To reopen a completed case in ProcessMaker, you can follow the below steps:

Log in to your ProcessMaker account and navigate to the home page.

From the home page, select the "Cases" tab, and then click on the "Completed Cases" option.

Locate the completed case that you want to reopen and click on it to open the case view.

In the case view, click on the "Reopen Case" button, which is located in the top right-hand corner of the page.

A popup window will appear, prompting you to enter a reason for reopening the case. Provide a brief explanation of why you want to reopen the case, and then click on the "Confirm" button.

The case will now be reopened, and you can resume working on it from where it left off. You may need to update any tasks or forms that were previously completed, depending on the reason for reopening the case.