Un foro de discusión para nuestra comunidad de hispano hablante
By Willyammarcanth
#794787
Hola,
Tengo una dificultad con el ProcessMaker.
Necesito que una tarea avance a la siguiente etapa cuando alcanza un timeout o en X tiempo, como si fuera un escalonamiento.
He realizado algunas investigaciones pero no he encontrado nada que se ayude en este punto.
¿Alguien tiene alguna idea?
Attachments
Escalonamento.JPG
Escalonamento.JPG (19.38 KiB) Viewed 2958 times
User avatar
By amosbatto
#794866
Creo que quieres un proceso así:
SkipTaskProcess.png
SkipTaskProcess.png (23.19 KiB) Viewed 2940 times
El trigger en el script task será:
Code: Select all
//Set to ID of the task that will be skipped if not completed in a fixed time period: 
$taskId = '27701455159a0a94c12c901018986498'; 

//Set to the number of minutes/hours/days/weeks to complete task. 
//See: http://php.net/manual/en/function.strtotime.php
$taskDuration = '+36 hours'; 

@=skipTask = false; //variable checked by exclusive gateway to loop back or skip task
$caseId = @@APPLICATION;
$sql    = "SELECT * FROM APP_DELEGATION WHERE APP_UID='$caseId' AND TAS_UID='$taskId'";
$result = executeQuery($sql);

if (!is_array($result) or count($result) == 0) {
	throw new Exception("Unable to find record for Task 2 with query:\n$sql");
}

$finishTime = strtotime($taskDuration, strtotime($result[1]['DEL_DELEGATE_DATE']));

//if time for task has been exceded then route on the task
if (strtotime('now') >= $finishTime) {
	@=skipTask = true;
	$g = new G();
	$g->sessionVarSave();
	@@routing = PMFDerivateCase($caseId, $result[1]['DEL_INDEX'], true, $result[1]['USR_UID']); 
	$g->sessionVarRestore();
}
Las condiciones en el exclusive gateway son:
RoutingRulesToSkipTask.png
RoutingRulesToSkipTask.png (19.69 KiB) Viewed 2940 times
El intermediate timer event debe ser configurado para ejecutar periodicamente:
IntermediateTimerEventProperties.png
IntermediateTimerEventProperties.png (13.74 KiB) Viewed 2940 times
También, tienes que configurar tu servidor para ejecutar periodicamente el archivo timereventcron.php. Ver: http://wiki.processmaker.com/3.2/Executing_cron.php

Adjunto el proceso que puedes estudiar:
(70.67 KiB) Downloaded 279 times
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[…]