The current workflow system is mainly built on the following 2 core concepts/mechanism
- conditional state transition map, i.e state machine
- assign user by fixed role defined per transition
for simple business case, this workflow system is simple enough and very powerful. but a lot of improvements needed in order to handle real world workflow in a multi business unit(BU) and multi company context, like this below typical purchase requisition workflow:
Requester fill the basic requisition info,
on header, choose the responsible buyer
on item table, input item, description, qty, budget price, and select cost object
system create workflow action for all cost object owners derived from items.
cost object owner approves the request
system only complete the workflow action if not the last approval, on the other hand if the last approval, create workflow action for buyer to do sourcing
buyer input mandatory sourcing info such as vendor, price , tax etc
system create workflow action for finance manager if amount <= 5000, otherwise create workflow action for purchase manager.
finance manager approve,
if amount <=5000, request is approved/released
other further approval steps such as by purchase manager, operation manager and CFO needed if amount >5000.
To handle the above business case, at least the following improvements to the current workflow system needed
- support dynamic assign users based on selected user or role from the business document other than assign users by fixed role in workflow definition
- support multi user approval in parallel, e.g multi cost object owners who are linked to different items
- support delegate workflow for users on leave or on business trip
- support forward workflow to other colleague in case the requester selected wrong buyer, or the system assigned workflow handler decided to forward it to other person
- support adding additional checker( ad hoc pre-checker) to double check, then return back to the approver
- support dynamic field status per workflow state: mandatory, read only, hidden per workflow state, e.g make it mandatory to maintain sourcing info such vendor , price, tax for buyer.
- support multi workflow per doctype and common workflow cross multi doctypes, for example 2 separate workflows, 1 for simple service PR(purchase Requisition) and the other for assets PR, if only one workflow, it will make it too difficult to maintain. this feature need to also support workflow revision, in other word, instead of updating existing workflow, create new workflow (new revision) to be used by new documents, on-going old documents still follow the rules defined in the already assigned old workflow.
- Allow add comment for each workflow action, make comment as mandatory when Reject, also pass comment to workflow action
- Send email notification to document owner when workflow reached the final state/finished.
Compared to independent professional workflow platforms, ERPNext is more powerful on handling complicated form layout design and business logic via custom script and back-end ORM, if the above features added, ERPNext can be a good alternative workflow system?
any comments and further improvement ideas? any other business workflow business cases?