Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Dynamic deadline

Avatar

Former Community Member
Is it possible to have dynamic deadlines? i try to put a xpath expression in

the box, but i receive the message that wf accepts only integer.



So, there is a workaround or another way to set a dynamic deadline?



Thank,

Alessio
6 Replies

Avatar

Former Community Member
Looking for the same, I was told that Adobe is accommodating this feature in version 8.0

Wait & see.



If you have any workarounds, please let me know.

Avatar

Level 9
Hi

You can't embed an xpath expression into the box.



The only workaround I'm aware of is to use Avoka's UserPlus QPAC. It takes a somewhat different approach to reminders, escalations and deadlines - these are managed by a separate sub-process. The advantage of this is that you can do whatever you want in the sub-process - including, for example, waiting for a variable amount of time, or even checking a database or other external system in order to help make the decision about whether to deadline the task.



We have a paper written on how to achieve this if you're interested:

http://www.avoka.com/betaqpacs/An%20Advanced%20Approach%20to%20Task%20Reminders%20and%20Escalations....



Regards,

Howard

Avatar

Former Community Member
<Howard_Treisman@adobeforums.com> ha scritto nel messaggio <br />news:3bc24757.1@webcrossing.la2eafNXanI...<br />> Hi<br />> You can't embed an xpath expression into the box.<br />><br />> The only workaround I'm aware of is to use Avoka's UserPlus QPAC. It takes <br />> a somewhat different approach to reminders, escalations and deadlines - <br />> these are managed by a separate sub-process. The advantage of this is that <br />> you can do whatever you want in the sub-process - including, for example, <br />> waiting for a variable amount of time, or even checking a database or <br />> other external system in order to help make the decision about whether to <br />> deadline the task.<br />><br />> We have a paper written on how to achieve this if you're interested:<br />> <a href=http://www.avoka.com/betaqpacs/An%20Advanced%20Approach%20to%20Task%20Reminders%20and%20Escalations.pdf><br />><br />> Regards,<br />> Howard<br /><br />Hi Howard,<br />yes, I try the UserPlus QPAC, but I didn't find a usermanual in the zip <br />file, so I try it but can't obtain what I want. Now I'm going to read this <br />Paper.<br />Another question: i try also the TaskComplete QPAC...in your opinion it is <br />possible to do the same but not by "terminating" the process, but on the <br />contrary making it complete?<br /><br />Thanks,<br />Alessio

Avatar

Former Community Member
We've actually taken a different approach.. On initiation of the Workflow we fire off a split and one of the branch's is a Wait QPAC. At the end of the pre-determined Wait, it generates an email to the supervisor. Because a Wait will remain running until the timer expires we had to have a way to "terminate" the process if the Workflow was completed. We accomplished this by creating a custom QPAC that accepts action_template_id and process_instance_id as inputs and then runs a SQL Update statement on tb_action_instance and tb_process_instance updating the status of the action to '4' based upon the input parameters provided. Because this is the last step of the workflow, once it completes the workflow is marked as completed and the Wait is no longer running waiting to generate an email.



----------------

Billy Blackerby

http://tci-usa.com

Avatar

Level 9
Hi Billy



A very creative solution to the problem.



In many ways, the UserPlus QPAC takes a similar approach, except instead of a split, we use a Sub-process. This is a little more re-usable, because you can set up just one sub-process to handle all your escalations - in your approach, you need to set up a separate split for each User step. It would also be interesting to see if your approach works when the User step is NOT the last step in the process.



Note: It's not generally recommended that you poke values directly into the Workflow database tables. (Support may refuse to support you if you're doing this.) You should rather use the public Workflow APIs directly.



We don't have a QPAC that teminates an action (we do have a Process State Changer that will terminate an entire process), but we would be quite happy to write one if you want it.



Regards,

Howard

Avatar

Former Community Member
Howard,



We took your advice and re-wrote the QPAC. Now it calls the completeProcess or terminateProcess method of the ProcessManager class.



Thanks for the tip!



----------------

Billy Blackerby

http://tci-usa.com