Hi all,
Within a certain workflow we are looking for a way to fulfill escalation at certain fixed due dates. Suppose every Monday at 16:00 a certain task should be due. This is related to the process of the customer where there are some deadlines defined in the process where workflow is also used. This is currently not possible as you can only specify hours or days in addition to the start time of submitting the workflow.
The date/time due is also depending on the contents of the document. Take for example a timesheet. If the timesheet is submitted with a period in future (worker writes future absence hours) also the due date is probably a week later than the first coming Monday. If a timesheet is submitted too late (e.g. after 16:00 at Monday for the past week, the due date needs to be the current date/time)
As mentioned this is not possible by default. Has anyone had this similar requirement or has a solution (direction) available? Possibly we need to create a customization so only an answer you can customize it is not the answer I'm looking for. I wonder if anyone can share his experience or also support me in just telling that you have the same requirement.
*This post is locked for comments
Hi Andre.
You can checkout the post over here: www.exploreax.com/.../creating-a-custom-workflow-due-date-provider
Please let me know if you see errors or have suggestions on how to improve it.
Hi Sohaib, Jonathan,
Thanks for your answers. Both suggestions were on my list. Creating the table with setup and a batch is a solution which for sure will work, but not the preferred one.
So we were about looking into the details of the due date providers. I think the directions from Jonathan are very helpful. Tomorrow we are going to have some detailed look into these classes and will try to find out if we can achieve the requirement.
An extensive blog is still welcome :)
Although I haven't done it myself, you can use the "WorkflowWorkCalendarDueDateProvider" as an example. Basically in the resolve methods you can get the original record out of the "WorkflowContext" object and resolve it to a fixed date in anyway you choose.
Basic steps
1. Create class extending WorkflowDueDateProvider
2. Create getCalendarTokens method and return a key value for each resolution type you would like. Probably only 1. e.g. Monday 16:00
3. Create resolve and resolveNonUser methods that retrieve the original document via _context.parmTableId() and _context.parmRecId() and returns a date of your choosing.
I hope this helps a bit. I'd be happy to create a more extensive blog post or something if needed.
Hi Andre.
Have you looked at creating a custom DueDateProvider in workflow?
Have to thought to do it as following:
I tried to play with available days to have e.g. only the Monday as working day. This is also not giving the correct results.
In the Time limit settings of the workflow you can specify a Duration. If possible we would like to add an option here. Does anyone know if this part is customizable? In the meantime we will investigate further.
Another option could be creating additional tasks which loops through the pending workflows and set the due date/time afterwards.
If anyone like to respond on this thread, you are welcome to share your thoughts.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,782 Super User 2024 Season 2
Martin Dráb 229,067 Most Valuable Professional
nmaenpaa 101,150