Workflow Trigger Reference for SAP Business One Hana (Service Layer) Connector

Workflow Triggers initiate workflows and are used to define the data supplied to a workflow. Supported trigger Data Types for this connector are outlined below.

SAP Business One Hana (Service Layer) Connector provides several workflow triggers, as well as a generic trigger which may be used to more generally access Service Layer REST API routes.

Basic details are shown in the table below.

Trigger Source Description Version
B1Query DEPRECATED. Execute a B1 query for the provided Query Category name and Query name. Generates one or more messages from the query results. Use B1Query v2 for the latest config options. 1.0+
Get a B1 Object Generic Workflow Trigger that allows Service Layer routes to be used to get messages from any B1 Object. Use OData filters to refine trigger data. 1.0+
Get Bulk Data Populate local data files using the specified Service Layer route for B1 object data. Use OData filters to refine trigger data. 1.15+
Get Bulk Data from a Query Populate bulk data files using the specified query. These files may be handled using bulk data processing actions. 1.23+
Get Enqueued Workflow Messages v2 Fetch unprocessed B1Object, UDO and UDT records from B1, as supplied by the SALTBOX_MESSAGES UDT. Use OData filters to refine trigger data. 1.0+
Get Results from a B1 Query v2 Execute a B1 query for the provided Query Category name and Query name. Generates one or more messages from the query results. 1.0+
Get SQL Query Results (version 10 only) Execute and get all results from the specified SQL query. Parameters may be supplied, if required by the query. Query results may be split into multiple messages using Message Format Settings. 1.24+
Get Transaction Records for Enqueued Workflow Messages Retrieve a list of transactions performed in SAP Business One, including data. Data is supplied by the SALTBOX_MESSAGES UDT. 1.7+
Service Layer Workflow Trigger DEPRECATED. Generic Workflow Trigger that allows Service Layer routes to be used to trigger workflow messages. 1.0+
WorkflowMessage DEPRECATED. Fetch unprocessed Saltbox messages from B1. 1.0+

Trigger Sources

B1Query

Trigger Source Description Version
B1Query DEPRECATED. Execute a B1 query for the provided Query Category name and Query name. Generates one or more messages from the query results. Use B1Query v2 for the latest config options. 1.0+

Get a B1 Object

Trigger Source Description Version
Get a B1 Object Generic Workflow Trigger that allows Service Layer routes to be used to get messages from any B1 Object. Use OData filters to refine trigger data. 1.0+

Get Bulk Data

Trigger Source Description Version
Get Bulk Data Populate local data files using the specified Service Layer route for B1 object data. Use OData filters to refine trigger data. 1.15+

Note that version 1.16 patched an issue when fetching empty bulk data. If using version 1.15, the trigger will fail with the error: Converted raw message is not valid XML. To resolve this error, upgrade the SAP Business One Hana (Service Layer) connector to version 1.16 or higher.

If encountering this error on another workflow trigger or connector, this may have a different cause. Refer to Trigger error: Converted raw message is not valid XML for troubleshooting details.

Get Bulk Data from a Query

Trigger Source Description Version
Get Bulk Data from a Query Populate bulk data files using the specified query. These files may be handled using bulk data processing actions. 1.23+

Get Enqueued Workflow Messages v2

Trigger Source Description Version
Get Enqueued Workflow Messages v2 Fetch unprocessed B1Object, UDO and UDT records from B1, as supplied by the SALTBOX_MESSAGES UDT. Use OData filters to refine trigger data. 1.0+

Get Results from a B1 Query v2

Trigger Source Description Version
Get Results from a B1 Query v2 Execute a B1 query for the provided Query Category name and Query name. Generates one or more messages from the query results. 1.0+

Get SQL Query Results (version 10 only)

Trigger Source Description Version
Get SQL Query Results (version 10 only) Execute and get all results from the specified SQL query. Parameters may be supplied, if required by the query. Query results may be split into multiple messages using Message Format Settings. 1.24+

Get Transaction Records for Enqueued Workflow Messages

Trigger Source Description Version
Get Transaction Records for Enqueued Workflow Messages Retrieve a list of transactions performed in SAP Business One, including data. Data is supplied by the SALTBOX_MESSAGES UDT. 1.7+

This workflow trigger supports object hydration within a workflow instead of within the trigger itself. Use this trigger in combination with the following action to prevent long-running triggers from timing out silently in combination with the trigger Get Transaction Records for Enqueued Workflow Messages (also called Get Transaction Records in earlier versions).

This two-step process allows the trigger to provide a very small data set to each workflow execution, and allows this action to hydrate (populate) data into the “Current Message”.

For instructions on how to convert an older workflow using triggers “WorkflowMessage” or “Get Enqueued Workflow Messages v2”, see Release Notes for version 1.21.0

Fetch object data: Setup Example

To set up a workflow using this action, proceed as follows. The advantage of using this two-step approach is that retry logic and troubleshooting tools can be used natively within Saltbox.

  • In the manage workflows page create a new workflow.

  • Edit the workflow. Configure workflow settings as desired.

  • In the workflow trigger page:

    • Configure the trigger using the SAP Business One Hana (Service Layer) Connector using the source Get Transaction Records for Enqueued Workflow Messages.

    • Configure Source settings as required to fetch the desired data. For example, select Orders to fetch order data, or BusinessPartners to fetch Business Partner data.

    • Modify the schedule if desired (for example, set it to “Manual” mode to only run it manually).

    • Save changes.

  • In the workflow designer page:

    • Add the action Fetch object data for a triggered transaction record.

      On workflow execution, when this action is successful, it will overwrite the “Current Message” with hydrated object data, allowing subsequent actions to use “Current Message” to inspect/use that object’s data.

      When this action is unsuccessful, “Current Message” remains unchanged, with simple trigger data instead of fully hydrated object data. This allows retry logic and troubleshooting tools to access the message.

    • Edit the action. Update the “Config” to use the same one as the trigger.

    • Save changes.

    • Configure other workflow details using “Current Message” when object data is needed.

  • At this point the workflow can be run and verified.

Service Layer Workflow Trigger

Trigger Source Description Version
Service Layer Workflow Trigger DEPRECATED. Generic Workflow Trigger that allows Service Layer routes to be used to trigger workflow messages. 1.0+

WorkflowMessage

Trigger Source Description Version
WorkflowMessage DEPRECATED. Fetch unprocessed Saltbox messages from B1. 1.0+