Table of Contents

SQL Configuration to Call a Bizweaver Workflow

The following actions should only be performed by persons familiar with SQL Server Management Studio and understand how to manipulate objects in a database.

To Begin

The Bizweaver Web Service needs to be installed either from a Versago or Bizweaver installation to have the below file path available. If “Skip this Step” is selected during installation, the applications will need to be reinstalled to access the path.

Master Configuration

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.

Enable Configuration Changes

sp_configure 'show advanced options', 1 
GO  
RECONFIGURE 
GO  
sp_configure 'clr enabled', 1
GO  
RECONFIGURE 
GO

Create an Asymmetric Key and SQL login

-- 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

Target Database Configuration

Add the DLL to the Target Database

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 database.

Create a custom stored procedure in the target 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]

Configuration for SAP Business One

The processing of records added or updated in the SAP application can be initiated using a SQL stored procedure.

A sample of the code used in SAP Business One to call a Bizweaver workflow is found here.

Configuration for Automatic Versago Multi-Select Report Processing

The processing of records selected in a Versago multi-select report can be initiated using a SQL database trigger.

A sample of the trigger code used to automatically initiate processing is found here.

Configuration for Versago Payments Processing

Contact Third Wave support for assistance with this configuration