During run time, the Call Procedure activity
runs a stored procedure in a database. The stored procedure must be
written and installed in the database before you can complete the
configuration of the Call Procedure activity
in Studio.
Note: Function name overloading for stored procedures
in the Informix® database
is not supported. Stored procedures cannot have the same name in Informix even if their signatures
are unique.
The steps for adding and configuring a
Call
Procedure activity to an orchestration are described in
the following procedures:
Add a Call Procedure activity
to the orchestration
- Create or
open an orchestration. A graphical representation of the orchestration
opens.
- Select the Activities tab and expand the Database folder.
- Drag the Call Procedure activity onto the
orchestration.
- Select the Call Procedure activity.
Create, select, or edit
a database endpoint
- Click Pick Endpoint task from the Checklist and
choose from one of the following actions:
- Select an existing endpoint:
- Select Browse. The Project Explorer opens.
- Select an existing endpoint and click OK.
Skip to the Configure a Call Procedure activity activity
procedure.
- Select an existing endpoint and edit the endpoint:
- Select Browse. The Project Explorer opens.
- Select an existing endpoint and click OK.
- Click Edit. The Edit Endpoint pane
shows.
- Create a new endpoint:
- Select New. The Create Endpoint pane
opens.
- Create
or edit a database endpoint
Map the output of the activity
- Select the Map Outputs task in the Checklist.
The output parameters for the activity are displayed under the results element
in the From Activity pane. The output parameters
displayed in the From Activity pane correspond
to the OUT, RETURN, and INOUT parameters you selected in the Stored
Procedure task.
If the Batch Multiple Rows
Per Message check box is selected in the Delivery
Rules, the multiple occurrences icon displays next to
the result element.
A repeating node called
resultSet displays
in the
From Activity pane of the
Call
Procedure activity even if the stored procedure has no
return parameters. During run time, if the stored procedure started
from the activity returns a result set, this result set is returned
from the activity in the
resultSet node. For
example, if the stored procedure starts a select statement, the result
set from the select statement is returned in the
resultSet node.
Use the
CopyOf function in
the map to copy the contents of the result node (including the child
node called resultSet) to a variable.
Attention: In
order for the
CopyOf function to correctly
copy the values of the source nodes to the destination nodes, the
XML Schema of the destination variable must match the XML Schema of
the source node. For more information, see
CopyOf function.
- Map the required output parameters to variables. See Creating a map for general instructions on
mapping. You are not required to map output parameters for
this activity.