Workflow is handled automatically at the data base level by the use of a data base trigger.
The trigger is attached to the specific tables where workflow is enabled. The process flow is as follows:
- When a record is updated/deleted/inserted in a table that has workflow, there is a trigger that fires.
- This trigger (P2K_xxx_BIUD) sets up internal variables for access by any Work Flows and then calls the P2K_PMWRKFLW package for that specific table
- At this point, each table potentially takes a different course of action, but in general would do the following:
- Set up variables for User Calcs
- Set up internal structures for User Calcs
- Call the RUN_WF_CALC subprogram
- *Loads user calcs for that product
- Executes the defined user calcs