Trigger Configuration for Versago Multi-Select Report Processing

Create the trigger on the table where records are saved by your Versago multi-select report.

Values in <YourValue> are specific to your installation and need to be changed accordingly. The < and > symbols are removed when the desired value is entered.

Trigger.txt
CREATE TRIGGER [dbo].[twbs_tr_<TriggerName>]
ON [dbo].[<TableName]
AFTER INSERT
AS
DECLARE @vgo_Batchid nvarchar(8), @arguments nvarchar(100)
---
SELECT @vgo_BatchID = vgo_BatchID FROM inserted
BEGIN
--
SET @Arguments = '{"vgo_BatchID":' + '"' + @vgo_BatchID + '"' + '}'
--
EXECUTE [dbo].[spCallBizweaverWS]
@wsMethod='POST'
-- add your URL.  Be sure to use http:// or https:// as appropriate.
,@wsURL='https://<YourURL>'
,@wsContent ='application/json'
-- Add your Auth Token from Bizweaver
,@wsAuthToken ='<YourBizweaverToken>'
-- Add your workflow ID from Bizweaver
,@wsTaskId = <YourWorkflowID>
,@wsStartAfter = 0
,@wsParameters = @Arguments
-- Add your port number
,@wsPort = <YourPort>
END

If your are calling Bizweaver without any parameters the @Arguments value will look like this:

SET @Arguments = '{}'

Be aware that when you call Bizweaver using this method the target table of the Versago multi-select report is locked until the workflow completes. This means that to get records for processing you will need to use the “with (NOLOCK)” modifier in any SELECT statement that reads the target table. It also means that you cannot write directly back to the target table if needed. In this case you may need to write the results from the processing to another table that can be linked to the original target table for reporting purposed.


The following video illustrates this process.

.