Wiki

Scale Your Enterprise

User Tools

Site Tools

mbstring extension must be loaded in order to run mPDF

bw:call_bizweaver_web_service_from_sql_server

This is an old revision of the document!


Initial Configuration

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

  • Download DLL executable from https://portal.twbs.com to the SQL Server server. The DLL executable is also automatically placed in C:\Program Files\Bizweaver\BWPortal by the Bizweaver installation.

Initialization

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

  • The 'Executable file“ path in the following SQL statement must reflect the actual location of the SQLWSCall.dll file on your system.
-- 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

  • Expand the database information for the target (SAP or vgoCommon for Payments) database.
  • Expand the Programmability section.
  • Right-click on Assemblies; select New Assembly.
  • Browse in the “Path to Assembly” field to find the SQLWSCall.dll file referenced in the “Initialization” section above, and select it.
  • Change the Permission Set (just above the assembly path field) to Unrestricted from the drop-down list.
  • Click [OK] to add the assembly.

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.

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

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

bw/call_bizweaver_web_service_from_sql_server.1576254831.txt.gz · Last modified: 2019/12/13 11:33 by runger