Creating IBM Database Activities in Sequential Workflows
If you are using Windows® Workflow Foundation
(WF) to create graphical sequential workflow applications, you
can add IBM database activities to your workflows. IBM database
activities are available for any IBM data server to which you
have established a connection.
A Sequential Workflow Console Application project must be open
in the Solution Explorer.
To create an IBM database activity in a
sequential workflow:
With your sequential workflow open in the visual designer,
drag the IBMDatabase activity from the
Toolbox to the workflow design surface.
Copy and paste the connection string from your IBM data
connection to the IBM database activity.
In the Server Explorer click your data connection,
and then press F4.
In the Properties window, copy the value for the
ConnectionString property.
On the design workflow surface, click the IBM
database activity.
In the Properties window, paste the copied string in
the value cell of the ConnectionString
property.
In the CommandType property list, select
the type of command that you want to generate.
Text - to type an SQL statement that
you want to run
StoredProcedure - to select a procedure
that you want to run
TableDirect - to select a table that
you want to query
Specify information for the CommandText
property, based on the command type that you select.
Text - type the SQL statement to run.
StoredProcedure - select the procedure
to run.
If the procedure that you select has IN or INOUT parameters,
a property is added to the Properties window for each
such parameter. Specify a value for each of these
parameters.
TableDirect - select the source table to
query.
Optional: To define an event that must occur before the IBM
database activity execute command, specify the event name
in the CommandExecuting property, and then
press Enter to generate the event code.
Optional: To define an event that must occur after the IBM
database activity execute command, specify the event name
in the CommandExecuted property, and then press
Enter to generate the event code.
Define this event if you want to debug the IBM database
activity.
To see the result from the IBM database activity, press F5 to
run the workflow.
To debug the IBM database activity, set a line breakpoint in
the code of the CommandExecuted event that you
defined, and then press F5. When the debugger stops at the
breakpoint, review the dataset of the IBM database activity.