oracle11gworkflowrelational-databaseworkflow-foundation-4workflow-rehosting

How to invoke a stored procedure from DbUpdate Activity from the Workflow Designer


I open my rehosted workflow Designer, then I open my workflow which includes a DpUpdate Activity (for information on DbUpdate Activity you can use the following link )

(http://msdn.microsoft.com/en-us/library/ee622977.aspx). In the strSQL argument of the DbUpdate Activity I know how to put insert, update etc.. commands. However, I don't know how to invoke a stored procedure.

when I type

execute USER_NAM.Stored_ProcedureName (param1, param2) Workflow e146c071-c363-4728-a565-36175394bedc Terminated. Exception: System.Data.OracleClient.OracleException ORA-06550: line 1, column 16: PLS-00103: Encountered the symbol "EXECUTE" when expecting one of the following:

:= . ( @ % ; immediate ORA-06550: line 1, column 65: PLS-00103: Encountered the symbol "END" when expecting one of the following: .. .. ..

Do you have any suggestions on how to invoke a stored procedure from within DbUpdate Activity? Thanks


Solution

  • I found my own answer. In DbUpdate activity's list of argument there is a CommandType. As long as you set the CommandType to StoredProcedure (available from the drop down menu), then you simply have to populate the other listed argument(Sql) to the following:

    USER_NAM.Stored_ProcedureName (param1, param2)

    No need to use "execute" in the Sql string.