Automate
Register Stored Procedure Events
CREATE PROCEDURE GetRecordCount @PackageName nvarchar(100), @RecordCount int Output AS Begin
….
End
After the stored procedure event runs, the @RecordCount parameter is passed to the rest of the events as parameters on the WebApp Event page where
Field is set to CommandName and Value is set to “[folder path]” #PassedRecordCount#
And
Field is set to PassedRecordCount and Value is set to @RecordCount
All event parameters are shared by an interface instance and are often used to pass data to the next event.
To register a stored procedure event in Automate:
- Select Interfaces in the Navigation pane.
-
Click Add.
-
Enter a value in the PRIORITY field.
NOTE: The PRIORITY field indicates the order in which the interface event runs.
-
Select StoredProcedure from the EVENT TYPE list box.
NOTE: The PAGE ID field is not used for StoredProcedure event types.
- Click the LOOP check box to enable it, which indicates the event is intended to be processed multiple times based on input. Refer to Set Up a Looping Process for more information.
- Enter a descriptive comment in the COMMENT field.
-
Click Save; the Vertical View displays.
NOTE: The EVENT TYPE selected on the Horizontal View determines the fields that display on the Vertical View.
-
Click the Events icon for the desired interface.
View the field description for the Interface Events page’s Vertical View
- Select a registered stored procedure event from the Stored Procedure list box.
NOTE: All stored procedures from the Data Source (as selected on the Interfaces page when the interface was created) display. If a Stored Procedure Filter is defined on the Parameters page, the list is narrowed based on the filter.
- Click Save.
- Click the Stored Procedure Parameters icon to open the Stored Procedure page.
NOTE: When adding a stored procedure as an event, the parameters in the stored procedure are automatically created for the event. Click the Stored Procedure Parameters icon to view all parameters passed to the event.