This is an old revision of the document!
The following actions should only be performed by persons familiar with SQL Server Management Studio and understand how to manipulate objects in a database.
Execute the SQL statements that follow against the Master database. These steps, until the “Configure Target Database” section, MUST be performed on the server where SQL Server is located.
sp_configure 'show advanced options', 1 GO RECONFIGURE GO sp_configure 'clr enabled', 1 GO RECONFIGURE GO
-- Create asymmetric key CREATE ASYMMETRIC KEY [bwws] AUTHORIZATION [dbo] FROM EXECUTABLE FILE = 'C:\Program Files\Bizweaver\BWPortal\BWSQLSP\SQLWSCall.dll' -- Create login CREATE LOGIN TWBS FROM ASYMMETRIC KEY [bwws] -- Modify login GRANT UNSAFE ASSEMBLY TO TWBS
The remaining steps, which create & update various SQL Stored Procedures, can be done from any instance of SQL Server Management Studio that has access to the target (SAP) database.
This procedure handles the web service call to Bizweaver. It is used for both POST and GET transactions.
CREATE PROCEDURE [dbo].[spCallBizweaverWS] @wsMethod NVARCHAR (MAX), @wsUrl NVARCHAR (MAX), @wsPort NVARCHAR (MAX), @wsContent NVARCHAR (MAX), @wsAuthToken NVARCHAR (MAX), @wsTaskId INT, @wsStartAfter INT, @wsParameters NVARCHAR (MAX) AS EXTERNAL NAME [SQLWSCall].[StoredProcedures].[spCallBizweaverWS]
A sample of the code used in SAP Business One to call a Bizweaver workflow is found here.
A sample of the trigger code used in a VersagoData table is found here.
Create a 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.
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='' ,@wsParameters= @Arguments -- Add your port number ,@wsPort='<YourPort>' END
The following video illustrates this process.
.
Contact Third Wave support for assistance with this configuration