This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bw2:bizweaver_trigger [2023/04/11 11:30] mfoster [Creating Your First Trigger] |
bw2:bizweaver_trigger [2024/09/09 13:27] (current) dlee [Executing Workflows from SQL Using Direct Connection (Trigger)] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======Executing Workflows | + | ======Called |
| Bizweaver provides a method to trigger a workflow from a Post Execute SQL stored procedure (for example SAP SBO_SP_PostTransactionNotice) in an SAP database (SQL or Hana). From the SAP stored proc, trigger instructions are inserted into a Bizweaver staging table and then immediately into a queue via a ' | Bizweaver provides a method to trigger a workflow from a Post Execute SQL stored procedure (for example SAP SBO_SP_PostTransactionNotice) in an SAP database (SQL or Hana). From the SAP stored proc, trigger instructions are inserted into a Bizweaver staging table and then immediately into a queue via a ' | ||
| Line 21: | Line 21: | ||
| {{: | {{: | ||
| + | {{ : | ||
| === What's going on behind the scenes when a trigger is created? === | === What's going on behind the scenes when a trigger is created? === | ||
| When the five required fields plus optional parameters are entered and the workflow is saved, Bizweaver: | When the five required fields plus optional parameters are entered and the workflow is saved, Bizweaver: | ||
| - | - Creates a staging table in the SAP database (connection | + | - Creates a staging table in the SAP database (connection |
| - Automatically inserts the SQL code that initiates the trigger into the SAP stored procedure. | - Automatically inserts the SQL code that initiates the trigger into the SAP stored procedure. | ||
| <WRAP center round info 80%> | <WRAP center round info 80%> | ||
| - | This code is surrounded by comments and is easy to identify by the trigger ID. It should not be tampered with. When the SAP stored procedure is called (ex. SAP SBO_SP_PostTransactionNotice), | + | The code inserted into the SAP stored procedure |
| <WRAP center round important 80%>Do not tamper with the SQL code Bizweaver inserts into the SAP post-execute stored procs</ | <WRAP center round important 80%>Do not tamper with the SQL code Bizweaver inserts into the SAP post-execute stored procs</ | ||
| Line 42: | Line 43: | ||
| * Clears trigger records (for both enabled and disabled triggers) from the staging table after enabled triggers are successfully copied to the request queue | * Clears trigger records (for both enabled and disabled triggers) from the staging table after enabled triggers are successfully copied to the request queue | ||
| * Checks the status of the workflow the queued trigger is targeting | * Checks the status of the workflow the queued trigger is targeting | ||
| - | * Triggers the workflow if it is available (not running) | + | * Triggers the workflow if it is available (not running), fetching parameters values for SAP using the SAP document table name and DocEntry value |
| * Goes to the next trigger request in the queue | * Goes to the next trigger request in the queue | ||