Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
By rcordeiro
#786407
Hi all,

Because of an upgrade I need to freeze one of the processes I have designed in PM.
If I deactivate the process in Designer it will not be possible to start new ones but the ones already started but not finished are still available and it's always possible to go on with them.
I tried with process permissions but with no luck.

Any idea on how to achieve this?

Thanks
#786412
You can deactivate the process to stop new cases from being created. To stop users from opening existing cases, create a new trigger in the process with the following code:
Code: Select all
G::header("Location: casesListExtJsRedirector");
die;
Then, right click on a blank area in your process map and select "Edit Process" from the context menu. In the dialog box that opens, set the dropdown box for "Execute a trigger when a case is opened:" to the new trigger that you created.

Whenever a user tries to open a case in the process, he/she will be redirected back to the Home menu.

When you need to stop this redirection, you can either set the "Execute a trigger when a case is opened:" property back to "None" or you can add code in your trigger which checks the date:
Code: Select all
if (date('Y-m-d') <= '2016-10-25') {
   G::header("Location: casesListExtJsRedirector");
   die;
}
#786426
Hi,

That seems like a great idea but I'm using version 2.5.2 and it does not have that option.
Any idea on how to use the trigger for 2.5.2?

Thanks

Edit

I can use it on every single task and execute it at the beginning, before anything else, it works but do you have any other option because I have quite a big process and do this on all the tasks is a bit of work.
#786430
If you do this
Then, right click on a blank area in your process map and select "Edit Process" from the context menu. In the dialog box that opens, set the dropdown box for "Execute a trigger when a case is opened:" to the new trigger that you created
in start case runs this trigger and does not need you define trigger for every task

For business travelers visiting Douala, it is esse[…]

A Betking clone script mimics Betking's sports bet[…]

A stake casino clone script mirrors the renowned f[…]

A 1win clone script is a pre-built software replic[…]