Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling an oracle procedure from ppm workflow.

SOLVED
Go to solution
Highlighted
Sevilay
Collector

Calling an oracle procedure from ppm workflow.

Hi,

i want to call a procedure from a workflow execution step.
Is it possible and if it is how ?
What is the syntax of calling procedure.
In SQL navigator syntax is simple:

Begin
procedure_name;
End;

But i don't know how to do this in ppm execution step.

Thanks in advance.
3 REPLIES
Kalin Petrov
Super Collector
Solution

Re: Calling an oracle procedure from ppm workflow.

Hi Sevilay,

You can't execute a procedure, but an oracle function. The reason for that is, that your piece of code has to return a value (numeric or text), which must match the validation that's defined behind the execution step.
Tbe syntax is:
function_name(par1,par2,...,parN)

Regards,
Kalin
Sascha Mohr
Esteemed Contributor

Re: Calling an oracle procedure from ppm workflow.

That's right, stored procedures can be used in report definitions.
In a workflow you could use the command ksc_local_exec to open a prompt, invoke sqlplus and run the stored procedure from there. Never done so myself, but should work.
Sevilay
Collector

Re: Calling an oracle procedure from ppm workflow.

Hi Kalin,

i created a function in the oracle server and gives the appropriate rights to the ppm user which is defined in the config file.

i call the function in the execution step and want to store this function's result in a token in the form.

i used the following syntax :

ksc_run_sql QUERY_STRING="begin PPMASYA_USR.deneme; end;" ENV_NAME="PPM_TEST_SERVER"
ksc_store REQ.DESCRIPTION = "[SQL_OUTPUT]","[SQL_OUTPUT]"

But the value of the REQ.DESCRIPTION is seen as "SQL_OUTPUT" in the form.
What is the problem ?
Sohuld i use different syntax?

Thanks very much.
//Add this to "OnDomLoad" event