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

PL/SQL How to use?

Highlighted
Semenov Alexand
Esteemed Contributor

PL/SQL How to use?

Somebody has experience of a writing PL/SQL functions? I need to start some times function in a cycle, for example, "for". I write the following in WF Step Source
--------------
BEGIN
FOR i IN 1..5 LOOP
function1(x,x,x,x);
END LOOP;
END;
/
---------------
Click "Virify" and PPM gives out a Oracle error. Whats wrong?
6 REPLIES
Darshan Bavisi
Occasional Visitor

Re: PL/SQL How to use?

Hi Semenov,

There would be many database experts in this forum, but I would also recommend visit/ask any PL/SQL related issues at the link below. That may be the best place for pl/sql issues,

http://forums.oracle.com/forums/forum.jspa?forumID=75
Semenov Alexand
Esteemed Contributor

Re: PL/SQL How to use?

thanks
Semenov Alexand
Esteemed Contributor

Re: PL/SQL How to use?

Thanks
Semenov Alexand
Esteemed Contributor

Re: PL/SQL How to use?

:-)
Torsten Neumann
Super Collector

Re: PL/SQL How to use?

Hi Alexander,

I know this thread is already closed, but I wanted to give you one hint anyway.

If you use a workflow step source of type "PL/SQL Function", then you can call a PL/SQL function from that step. The function needs to return a string (or in Oracle terms a VARCHAR2) which contains the code value of the validation behind the step. In a basic execution step you would have to write a function that returns SUCCESS or FAILURE.

Example
=======

Run the following to create a simple test function:

CREATE OR REPLACE FUNCTION alex_test(p_param NUMBER) returns VARCHAR2 as
begin
if (p_param = 0) then
return 'SUCCESS';
else
return 'FAILURE';
end if;
end alex_test;

In the workflow step source, put the following code:

alex_test(p_param => 0)

Please let me know if you have further questions.
Kintana strikes back... ;-)
Semenov Alexand
Esteemed Contributor

Re: PL/SQL How to use?

Thanks, I shall try
//Add this to "OnDomLoad" event