Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#812722
Hi Guys
I Will Make a Process Or Wait To Create (Flow) New Task to this Operators Set Wait To Continue With Set DynaForm Option Drop-down Values (ex: 6 month - 12 month and etc ,..) By Catching Event and Cron Script Or Triggers .
Plz Help Me
And excuse Me For Weak English Grammer
#812793
amosbatto wrote:Can you explain more clearly what you want?
Do you want to pause the case for a variable amount of time? Do you want to pause the variable until a record appears in a PM Table? If you want to start a new case periodically, see the start timer event. You can use an intermediate message event if waiting for a message from another process.
Hi,Thanks 4 Answer
i want to pause the case for a variable amount of time
i want pause to task for amount of time, but amount of time get as variable
this variable set in the past on dynaform by user select as dropdown(include after 6 month ,after 12 month and etc)
#812876
If you have selected the time in a dropbox, then you can use PMPauseCase() in a trigger to pause the case.

For example, if you have a dropdown associated the the variable "pauseTime" which has the following options:
Code: Select all
Value     | Label
-----------------------
          | Don't pause case
+15 days  | 15 days
+1 month  | 1 month
+6 months | 6 months
+1 year   | 1 year
Then, you can use this trigger in your process:
Code: Select all
if (isset(@@pauseTime) and !empty(@@pauseTime)) {
   $unpauseDate = date("Y-m-d", strtotime(@@pauseTime));
   PMFPauseCase(@@APPLICATION, @%INDEX, @@USER_LOGGED, $unpauseDate);
   die("This case #".@@APP_NUMBER." is paused until the date $unpauseDate.");
} 
Set this trigger to execute at some point in your process after the DynaForm containing the "pauseTime" dropdown box.
#815778
Here is a sample process:
(24.11 KiB) Downloaded 311 times

$unpauseDate = date("Y-m-d", strtotime(@@pauseTime));

These are all standard PHP functions so you can look up their meanings at www.php.net. The @@pauseTime has a value like "+1 month", so strtotime("+1 month") will create a timestamp which is one month from today, then date("Y-m-d", ) will convert that timestamp into the string "2018-09-21" and assign it to the variable $unpauseDate.
#815798
mmilad200 wrote:Sry Friends Problem For Me This Code Can Paused Case But I Will Wait Case Ex(Timer Event Wait)
My Problem this With Timer Event Can Only Wait Case 31 Day But I Will Created a task Waited 6 Month
:?: :idea:
mmilad200, I don't understand your English. Can you ask the question again?
#815804
I am Apology for this
I will use Timer Event(yellow clock icon) element in my process, but when I will enter wait value in day box, show a error with content (Error Enter 1-31days) and I can't use this method for this problem
Because I will wait the task amount equel 180days(6 month )
#815812
You can't use an intermediate timer event if you want to pause the case for more than 31 days.

The only solution is to delete the intermediate timer event, so your process changes from this:
processWithIntermediateTimerEvent.png
processWithIntermediateTimerEvent.png (4.64 KiB) Viewed 5660 times
To this:
processWithoutIntermediateTimerEvent.png
processWithoutIntermediateTimerEvent.png (2.4 KiB) Viewed 5660 times
Then, create the following trigger in your process:
Code: Select all
$unpauseDate = date("Y-m-d", strtotime("+180 days"));
PMFPauseCase(@@APPLICATION, @%INDEX, @@USER_LOGGED, $unpauseDate);
header("Location: casesListExtJsRedirector");
die();
Set this trigger to execute After Routing in "Task 3":
setTriggerAfterRouting.png
setTriggerAfterRouting.png (56.05 KiB) Viewed 5660 times
#815815
thank you for answer
But is Method has big problems
User can unpause pause task any time in inbox tab
though timer event only unpused when arrive wakeup time and
user cannot change this as any where
i used 6 timer event with properties 30 day waited but I'm worried that it will not work properly
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

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