problem to set the estimated task time duration in event dynamically by using date fields (processmaker 2.5)

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

Moderator: amosbatto

ajaipandian
Posts: 7
Joined: Thu Mar 09, 2017 2:23 am
Country: India

problem to set the estimated task time duration in event dynamically by using date fields (processmaker 2.5)

Unread postby ajaipandian » Thu Mar 09, 2017 2:37 am

Is there possible to set the estimated task time duration in (events->Intermediate message->edit event) dynamically by using date fields? in processmaker 2.5
Here I attached where to set the timings by using date field variable @@due date.
Attachments
event message setting.docx
(112.33 KiB) Downloaded 29 times

amosbatto
Posts: 5247
Joined: Mon Jun 22, 2009 10:28 am
Country: Bolivia
Location: La Paz

Re: problem to set the estimated task time duration in event dynamically by using date fields (processmaker 2.5)

Unread postby amosbatto » Thu Mar 09, 2017 7:15 pm

It is not possible in the definition of the event, but you can create a trigger in the task which uses executeQuery() to look up all the pending events and checks to see whether they should have a custom time setting. If so, use an UPDATE statement with executeQuery() to changes the estimate task duration in the database. I don't have version 2.5 installed, so I can't remember the exact table name and field name but if you look in the database with phpmyadmin you can find the table where events are stored for each case and change the time. The problem is that you can only change the time after the event has started, which means that you have to create an external script which periodically calls the executeTrigger() web service to execute your trigger. Set your external script to automatically execute as a cron job in Linux or a Scheduled Task in Windows.
Amos B. Batto ♦ ProcessMaker Technical Documentation Writer & Forum Manager ♦ Cofounder of ILLA-A

ajaipandian
Posts: 7
Joined: Thu Mar 09, 2017 2:23 am
Country: India

Re: problem to set the estimated task time duration in event dynamically by using date fields (processmaker 2.5)

Unread postby ajaipandian » Fri Mar 10, 2017 1:06 am

Thank you very much ,it's a right one to go.


Return to “Developing processes & programming”

Who is online

Users browsing this forum: No registered users and 1 guest