Workflow - Wait (schedule) Action for scheduled workflow activities
Description
Environment
None
Attachments
8
- 30 Aug 2014, 03:14 AM
- 09 Aug 2014, 07:00 PM
- 18 Jul 2014, 08:42 PM
- 18 Jul 2014, 07:15 PM
- 18 Jul 2014, 07:15 PM
- 18 Jul 2014, 07:15 PM
- 18 Jul 2014, 06:42 PM
- 18 Jul 2014, 06:39 PM
blocks
redhuan d. oon
Activity
Norbert Bede December 22, 2021 at 10:46 AM
Norbert Bede
December 22, 2021 at 10:46 AM
Hi, this was quite a complex issue, can’t answer now, we need open this. if you have more generic solution then ok. sooner then January we can’t take a look.
Carlos Ruiz December 22, 2021 at 10:36 AM
Carlos Ruiz
December 22, 2021 at 10:36 AM
What is instead of a column, we add here the ability to work with @SQL?
So, can be anything, a column in the table, a column in another table, a complex calculation done in pl/pgsql, etc.
Norbert Bede June 16, 2020 at 1:38 PM
Norbert Bede
June 16, 2020 at 1:38 PM
we are migrating to 8.1 so code will be available soon.
Norbert Bede May 4, 2020 at 5:14 AM
Norbert Bede
May 4, 2020 at 5:14 AM
hi @Markus Bozem Works in our local 3.1. - based on these patches - probably need review against 7.x and create PR.
Markus Bozem May 3, 2020 at 1:59 PM
Markus Bozem
May 3, 2020 at 1:59 PM
hi, i would like to use this feature. Is there still a show stopper`?
problem statement: in actual version it is not possible to schedule a workflow activity to run on a specific date. this solution proposal describe how to improve to fulfill this requirement
related community thread:
https://groups.google.com/forum/#!searchin/idempiere/workflow/idempiere/SlwG5WQA6Lw/eDNuX3HLYqMJ
this solution extend node action with a new option “Wait (Schedule)”, which similar to Wait (sleep) can suspend the workflow (by new scheduled status) - but generated activity field - [EndWaitTime] is set value based on Workflow Table.SelectedDateField e.g. table is c_order has field custom ExpiryDate field.(remark: Out of box - Wait Sleep is simple solution able to suspend workflow activity based on specified minute)
Setup
User creates a Node in existing workflow (e.g. order Document Process) choose Action=Wait (Schedule), cause AD_Column_ID appear - where userset fieldname from drop down listing workflow table table fields. (list validation for date fields)
Running Workflow
Workflow starts when user processing documents and convert nodes to activities - in our custom node - workflow set AD_WF_Activity.EndWaitTime (we get exact schedule - each workflow should have other EndWaitTime (wait sleep cant achieve that - always calculates same time range in minutes per workflow activity)
How should Works - Activity Processor
standard workflow processor processing a waiting activities - means processing the above scheduled activity (where enwaittime being valid).
ideas what change (require review from developer)
1. extend “WAIT (Schedule)” for AD_WF_Node.Action (Z=wait (sleep) new one can be e.g X= WAIT(SCHEDULE)
2.change process which generates wf activities - we need to fill EndWaitTime - from table.AD_Column_ID
3.extend WF_INstance (AD_WF_Activity.wfstate) state list by “SH” value - Scheduled (“scheduled activity”)
4.change workflow processor - improvement required - for handle new “Scheduled” status handling
5.change workflow processor - extend it by new Expire Date status handling (expiry date fire activity status change)
6.Terminate Activity - TerminateWaitTime field implementation (this should care about rollback (and new transition should starts another node)