Calling Stored Procedure From Flow To Write Data
  • Updated on 17 Apr 2015
  • 2 minutes to read
  • Print
  • Dark

Calling Stored Procedure From Flow To Write Data

  • Print
  • Dark

This tutorial demonstrates how to add Stored Procedures while integrating with Database in Decisions . Next, we will call Stored Procedure from the Flow to write data to the Database we integrated with.

Note: go through the following document to avoid SQL Server Database Permissions errors:
For our example we have a simple Database with a Stored Procedure that inserts a new row into the Database .

To integrate with this Database in Decisions Portal we navigate to the System > Integrations > Databases and click Integrate With Database button on the Folder Actions Panel . In the resulting pop-up window we input connection details and click Next .

Then, we select desirable table and click Next ...
addDb.png{height ="312" width="812"}
We can skip next Add Views window by clicking Next .
skipView.png{height ="311" width="815"}
In the Procedures window we select our Stored Procedure and click Save .
addStoredProc.png{height ="293" width="795"}

Our database integration is added to the Decisions .

Next, we navigate to the Designer Folder and click Create Flow button from Folder Actions Panel.

In the resulting window we provide our Flow with the Name and click Create to proceed to the Flow Designer.

In the Flow Designer we can locate a step that was generated for execution of the Stored Procedure under Integrations > My Integrations > Database > [Name] (Database) category. We add Exec dbo.InsertSampleDatabaseCurtis step to our Flow .

For the simplicity of this example we just connect both outcomes from Exec dbo.InsertSampleDatabaseCurtis step to the End step in our Flow . Next, we select Exec dbo.InsertSampleDatabaseCurtis step on the workspace and Step Information Layer pops-up. In this layer we can configure data that we would like to write to the database.

In this Example we simply use Constant data that will be inserted into the database.

Next, we close Step Information Layer and click Debug Flow link from the top panel in the Flow Designer to test our Flow .
Note that in Decisions version 3.5 and above, you'll need to click Test Flow to access this function.


Debugger indicates that our Flow was executed successfully with no errors.

If we check our Database we can confirm that our new row was added from the Flow .

Was this article helpful?