Stored Procedure Activity Overview

v7.x

Context

Use the Stored Procedure Activity to define an activity that executes a SQL Stored Procedure (i.e., pre-written SQL procedure) from the Sequence database. The Stored Procedure Activity can accept data from the workflow as its input parameters and use that data as part of the procedure.

Use Cases

  • Update a large amount of data at one time to remain at the database level. 
  • When multiple DBs are connected and you want the activity to be transactional.

Wizard Tips

  • Only stored procedures that were created in the Sequence database with the prefix spWFA display in the Stored Procedures List. To create stored procedures, navigate to the Programmability > Stored Procedures folder.
  • Define the parameters you want to send from the workflow to the stored procedure.
    • Define the parameters as hard-coded values.
    • Define the parameters as the result of an advanced workflow expression.
  • Make sure you send correct value types to the stored procedure.

Activity Tips

  • You can monitor the stored procedure in the Sequence debugger, where you can check if the stored procedure successfully executed, if the parameters were valid, and so on.

v8.x

Context

Use the Stored Procedure Activity to define an activity that executes a SQL Stored Procedure (i.e., pre-written SQL procedure) from the Sequence database. The Stored Procedure Activity can accept data from the workflow as its input parameters and use that data as part of the procedure.

Use Cases

  • Update a large amount of data at one time to remain at the database level. 
  • When multiple DBs are connected and you want the activity to be transactional.

Wizard Tips

  • Only stored procedures that were created in the Sequence database with the prefix spWFA display in the Stored Procedures List. To create stored procedures, navigate to the Programmability > Stored Procedures folder.
  • Define the parameters you want to send from the workflow to the stored procedure.
    • Define the parameters as hard-coded values.
    • Define the parameters as the result of an advanced workflow expression.
  • Make sure you send correct value types to the stored procedure.

Activity Tips

  • You can monitor the stored procedure in the Sequence debugger, where you can check if the stored procedure successfully executed, if the parameters were valid, and so on.
  • The Stored Procedure Activity includes the ThrowOnErrorInvoking property. If you select this property, the system throws an exception in any parameter expression fails during execution. The ThrowOnErrorInvoking property is in the Misc. section of the Properties panel.