Wiki

Scale Your Enterprise

User Tools

Site Tools

mbstring extension must be loaded in order to run mPDF

bw:call_bizweaver_from_sql

This is an old revision of the document!


Calling Bizweaver from SAP Business One

Some special program code, provided by Third Wave Business Systems, is required for this functionality to work. Configuration of the special code is described here. This is a technical process and should not be attempted by anyone not familiar with T-SQL stored procedures. Contact TWBS support if you need assistance.

The call to the Bizweaver web service is initiated from the standard SAP Business One Stored Procedure SBO_SP_PostTransactionNotice. The following SQL statements illustrate what needs to be added to the procedure.

  • The statements can be added by using copy/paste from here.
  • You can enter this same SQL code set for as many objects as you need to monitor.
  • You can also test what type of transaction has been posted (Add, Update, etc.).

The Bizweaver call can be made using either POST or GET. POST is preferred as it provides authentication that is not provided using GET.

Procedure Variables

/* Static variables for Bizweaver web service call - Start */
DECLARE
@Arguments nvarchar(100)
/* Static variables for Bizweaver web service call - End */
  • This variable only needs to be defined once within the SBO_SP_PostTransactionNotice procedure.
  • @object_type is a standard variable defined by SAP.
    • It represents the type of transaction being processed.
    • The 'X' in the examples is replaced with the appropriate ID number.
    • It is always enclosed in single quotes.
  • YourTargetVariable is the variable name expected in the Bizweaver workflow.
  • @list_of_cols_val_tab_del is a standard variable defined by SAP.
    • It generally represents the primary key of the transaction being processed.
  • YourURL is the URL that points to your Bizweaver installation.
    • Use HTTP: or HTTPS: as appropriate for your installation.
  • @wsTaskId is the ID number of the Bizweaver workflow being called.
  • @wsPort is the port number used for your Bizweaver web service.
    • 443 is the standard for HTTPS installations.
    • 80, 8080, 8081, 8090 are examples of ports typically used in HTTP installation.

Calling Bizweaver Using POST

IF @object_type = 'X'
BEGIN
SET @Arguments = '{"YourTargetVariable":' + '"' + @list_of_cols_val_tab_del + '"' + '}'
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='xyxyxyxyxyxyxyxyx'
 
-- Add your workflow ID from Bizweaver
 
,@wsTaskId='999'
  ,@wsStartAfter=''
 
,@wsParameters= @Arguments
 
-- Add your port number
  ,@wsPort='443'
END

Calling Bizweaver Using GET

--
-- Code to call workflow
--
IF @object_type = 'X'
BEGIN
SET @Arguments = '{YourTargetVariable:''' + @list_of_cols_val_tab_del + '''}'
--
EXECUTE [dbo].[spCallBizweaverWS]
@wsMethod='GET'
 
-- add your URL.  Be sure to use http or https as appropriate.
 
,@wsURL='https://YourURL'
 
,@wsContent='application/json'
 
,@wsAuthToken=''
 
-- Add your workflow ID from Bizweaver
 
,@wsTaskId='999'
 
,@wsStartAfter=''
 
,@wsParameters= @Arguments
 
-- Add your port number
 
,@wsPort='443'
END
bw/call_bizweaver_from_sql.1571327951.txt.gz · Last modified: 2019/10/17 11:59 by runger