CoreBOSBB

Full Version: Delayed execution of workflow task isn't working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I setup a workflow task and told it to execute 1 day after the 'date modified' of the source record. The task is a custom task that sends an e-mail. The problem is, the e-mail is sent immediately after the condition of the workflow is met. So the delayed execution isn't working.
can you upload some screenshots of the configuration?
Attached. It's set to inactive right now since the e-mails being sent are incorrect when they're sent right away.
I just did a test and it seems to be working correctly.

I added an email task to potentials, set the offset to one day, the queue in the database has:

do_after = 1620228150 = Wednesday, May 5, 2021 3:22:30 PM

today is Tuesday, May the 4th (be with you :-) )

I edited the workflow and set the offset to 2 and ended up with

do_after = 1620314787 = Thursday, May 6, 2021 3:26:27 PM

The code here: https://github.com/tsolucio/corebos/blob/master/modules/com_vtiger_workflow/VTTaskQueue.inc#L48

seems to say that it will not execute those tasks until that do_after time has passed
In my installation, that doesn't happen. The task never reaches the 'com_vtiger_workflowtask_queue' table, just gets immediately executed. This is all stock stuff, just the task is a custom one. When I add a 'stock' e-mail task, it does get placed in the 'com_vtiger_workflowtask_queue' table.

One thing I would also like on a side-note, is more flexibility in the delay. So would like to be able to set it to hours or minutes, for instance.
if the task is a custom task, it won't be delayed

Only email tasks (and some other marginal ones) are delayed. I have a project to change all of that but very slow progress as it is a big step: redesign the whole queue system

That request is on our to-do list (almost assigned it to someone this week, or I did, don't remember...)
Ah, then I propose in the meantime we place a bit of text next to the queue option to explain that. Let's get the listview stuff done first, we're working on too many things at the same time I feel. We have a lot of good ideas but what we need most is something that provides a good user experience if you ask me. And may the 4th be with you too!