Function in a Process Flow

Hi all,
I have a function which returns a value either 1 or 0. I want to get the output of the function and check if the function returns 1 then the process flow should be successful else it should error out.
I have created a simple process flow, which has start, function, success and error. From the function to success transtion i have given an complex condition where value =1 and the other transtion should be kept empty. But it didnt work.
Any ideas how exactly we can use a function in a process flow.
Thanks in advance

There is another way of achiving it....
Go to process flow -> Configure and click on the function operator.
Under Execution Settings, select the option Use Return as Status
This setting governs the behavior for activities that return NUMBER in their output. These activities include the FTP, User Defined, and Transform activities. When you select Use Return as Status, the Process Flow Editor assigns the outgoing transition conditions based on the following numerical return values for the activity:
1 = Success Transition
2 = Warning Transition
3 = Error Transition
You might have your function return 1 for success and 3 for error and the transition would take them as status code.
Thanks,
Suchit

Similar Messages

  • Function to call Process-flows/mapping from SQL

    Hi All,
    Can any one of you send me the function to call process-flows/mappings (eg: I have 10 mapping/Process-flows). It is an urgent requirement pending in my final testing.
    Plz help me in this regard.
    Regards

    Hi
    All information that you need, you can find in $ORACLE_HOME/owb/rtp/sql/. BAsically all executions in owb is called through wb_rt_api_exec package.
    for example:
    declare
         variable exec_return_code number;
         procesflow varchar2(255);
    plsqlname varchar2(255);
    begin
    -- Initialize Return Code
    exec_return_code := owbrt_sys.wb_rt_api_exec.RESULT_FAILURE;
    -- Run Task
    procesflow:='WF_X1';
    plsqlname:='MP_X1'
    exec_return_code := owbrt_sys.wb_rt_api_exec.run_task('OWF_LCTN','PROCESS',procesflow, ' ' );
    if exec_return_code = 1 then
    exec_return_code := owbrt_sys.wb_rt_api_exec.run_task('STAGE_LCTN','PLSQL',plsqlname, ' ' );
    end if;
    end;
    Regards

  • Using a function within a process flow...

    Hi,
    I'm trying to figure out a way of using a function (or something else) to return a status before attempting to run a mapping. I'd like to have a table with all my mappings, start date, end date, status, etc.
    1. SELECT status FROM table, if the mapping has already been executed do nothing, else execute the mapping, etc.
    Is there a way to accomplish that in OWB flow ?
    Thank you.
    Gaétan

    Hi,
    We had a similiar set up in my previous role where we have a Process flow for each mapping. Under that processflow, before attempting to run the mapping we called function to check whether that particular mapping has been run successfully for that date. The function would take "PF Name" as an input and returns the status as 1 (return success - the mapping was not run, so has to be run today)
    2 (return warning - the mapping is already run no need to run this time)
    3 ( any fatal errors).
    The function code is as below - _______________________________________________________
    CREATE OR REPLACE FUNCTION "PUB_CHECK_RUN_STATUS"("IN_ETL_PROCESS_FLOW_NAME" IN VARCHAR2) RETURN NUMBER IS
    --initialize variables here
    lv_Current_Load_Id NUMBER;
    lv_Last_Load_Id NUMBER;
    BEGIN
         <<Check_PF_Status>>                    -- This block is Standard for all Loads Jobs
         BEGIN
              SELECT LOAD_ID
              INTO lv_Current_Load_Id
              FROM LOAD_ADMIN.LATEST_LOAD;
              SELECT LAST_COMPLETE_LOAD_ID
              INTO lv_Last_Load_Id
              FROM LOAD_ADMIN.ETL_PROCESS_FLOW
              WHERE ETL_PROCESS_FLOW_NAME = in_ETL_Process_Flow_Name;
              IF Lv_Last_Load_Id = lv_Current_Load_Id
              THEN
                   -- This Process Flow has already been completed during this Load, so do not re-run
                   RETURN 2;          -- Returns a Warning Status
              ELSE
                   -- This Process Flow has not completed during this load, so need to run this now
                   RETURN 1;          -- Returns a Success Status
              END IF;
         END Check_PF_Status;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN 3;     -- Returns an Error Status
    RETURN NULL;
    END;
    In the above code
    LATEST_LOAD is a view which always returns one row with current load information (like load _id, start time etc)
    ETL_PROCESS_FLOW is a table containing one row for each process flow with information like (execution status, load_id when it was execute )
    You can modify to suit your requirements.
    HTH,
    Mahesh

  • BPC 7.5 NW Business Process Flow reopen function

    Hi,
    i have e question concerning the reopen function whithin business process flows.
    I set up a business process flow with several steps and use the match step region function. The users are able to go through the bpf steps just for one plant and they don't have to wait for the users of other plants. In most steps we implement a reopen function for the case that users want do add or correct something. I expect,  when I reopen one previous step, this step just reopen for one plant, but the reopen function opens the previous step for all plants.
    Are there any posibilities to use this reopen function just for one plant and not for all? Is  this perhaps a customizing issue?
    Thanks in advance
    Christian

    Hello Christian,
    This guide may help you on finding a way to perform that:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00971e51-27eb-2c10-479d-d1a0fa8f2cc0?quicklink=index&overridelayout=true
    Best regards,
    Vin

  • Process Flows Transforms

    Hi,
    I'm trying to include a PL/SQL function into a process flow from the public transformations. Whenever I validate the process flow it reports the error "VLD-10019 ... Function needs a valid deployment location". But I can't find anywhere to define the location of the public transformations, anyone know what I'm missing ?
    Cheers
    Pavel

    Hi Pavel,
    Did you take a look at the configuration for the process? Right click on the process and open configuration. In there you will see your activities.
    Go to the activity node and open this, then you will see a setting called "deployed location". Set that to the location your transformation is located in. Typically this is your target location.
    Hope this helps,
    Jean-Pierre

  • Process flow email task

    Hi all,
    I have a scenario like i am running one process flow which is having 3 maps. I needs to send out email for the below condition.
    1.If there is no record in the source.
    2. If there is no record in the target.
    I want to implement these scenario in the process flow and not in the map level.
    Could you please help in this scenario..
    Thanks in advance,
    Ashis

    Hi,
    I have the same scenario. I have written a function, it returns a boolean value 0 or 1.
    For the transition operator i took a complex consition, but it is not working.
    My function looks like this
    CREATE OR REPLACE FUNCTION err_message(result OUT number)
    RETURN NUMBER IS
    L_MESSAGE VARCHAR2(200);
    BEGIN
    L_MESSAGE := 0;
    SELECT distinct(run_error_message) into L_MESSAGE
    FROM owbrep.rab_rt_exec_act_run_errors
    WHERE ERROR_TIME = trunc(sysdate)
    IF L_MESSAGE ='ORA-12541: TNS:no listener'
    THEN
    RETURN (1);
    ELSE
    RETURN (0);
    END IF;
    END;
    function in the process flow always returns 0 even the condition is satisfied.
    any suggessions.
    Thanks in advance.

  • ORA-12154: TNS:could not ... for imported pl-sql function in Process Flow

    Hi
    I included in a process flow a PL-SQL function as user defined transformation.
    This PL-SQL function resides in my source database, from where I imported it in OWB.
    When I am trying the run the Process Flow (from control center manager) I get the following message upon executing that function.
    ORA-12154: TNS:could not resolve the connect identifier specified
    When I don't include that function my process flow works. Mappings in my process flow read from the same source database as where the function is.
    So I don't think it is caused by a problem with tnsnames.ora..
    Thanks in advance for anybodies help.
    Hans

    Hi Oleg,
    Thanks for your reply. Indeed I didn't create a runtime repository.
    However don't like to do that to for the source DB.
    I wonder if I can get around that by executing a SQLplus script instead.
    I tried this but my script does never complete when it is started from the process flow. If I run it in SQLplus it runs fine and completes instantly.
    My script does:
    update 1 column in one record of a table.
    commit;
    exit;
    What do you think?
    Thanks,
    Hans

  • Can I change a process flow at run time??

    Hello everybody,
    I work in Oracle BPMS 11.1.1.5. I need to change a process flow at run time due to changes in the business logic, I mean add, delete and modify tasks, navigation flow, etc. I know business rules can be modified using Oracle BPM Composer, but I couldn't find the way to modify the process flow. I have seen other BPMS, like BizAgi, for ex. that can do that. Do Oracle BPMS have that functionality? Please I need it a lot!!!!
    Regards and thanks in advance,
    isabelbernely

    Hi
    As JonPetter mentioned, you can get this and preferably get only from Support. I hope you have some license if you going to prod with this. Use that and if possible talk to your sales guy and create a support account. Then request the feature pack. The thing is, if we put it in some public shared location, it is the violation of using the oracle product. Unless someone takes risks they may upload but still its not advisable.
    Sorry
    Ravi Jegga

  • OWB11gR2: Mapping execution in a process flow not visible in OWB Browser

    When a mapping is executed inside a process flow, execution details are not visible in OWB Repository Browser (Control Center reports) - rows processed, errors etc. Mapping row is missing in a log, like it never happened (but it did).
    This auditing information is very important for monitoring reasons (to our customers also) and I just don't get it how this functionality is lost with this version. Another serious bug?

    Hi David,
    I was rather tired and frustrated last evening, so today I noticed some things I didn't yesterday. Your reply gave me a new motivation.
    The conclusion is - a mapping execution in a process flow is logged, but the way activities are displayed in OWB Browser are now different than in previous versions. If I click on 'Execution Job Report' on a process flow, I see all the activities listed except mappings (transformations, assign, file exists, subprocess etc.). If I want to see mapping execution row, I must click on a plus (expand) sign.
    This kind of behavior will make processes with a complex hierarchy (usually we have more than 5 levels of subprocesses) rather vast to monitor. In 10gR2, a drilling down was accomplished by opening a new browser tab (Execution Job Report link) for each subprocess/mapping activity. Now it shall remain on one huge screen (list) that keeps expanding.
    But, if that is the new feature, we shall live with that. If our customers won't like it, they will have to get used to it.
    Thank you for your reply!

  • How to get the package name of a procedure used in a process flow activity

    Hi all. I'm on OWB 11.2.0.2.0.
    When I used a packaged procedure or function in a mapping operator, I can find out the package.program_unit name by getting the operator's FUNCTION_NAME property. For example,
    OMBRETRIEVE MAPPING '$mapName' OPERATOR '$operName' GET PROPERTIES (FUNCTION_NAME)
    But when the same is used in a process flow activity, I can't find a property name that will give me the same information. I can get the BOUND_NAME, it does not tell me the package name. It must be stored in the activity properties because when you pull up the Synchronize dialog for the activity, it knows the package name.
    Is there a way to get this via an OMBRETRIEVE?
    Thanks.

    ANA, this is exactly what I needed. Thank you so much. I saw REFs also in the OMBRETRIEVE MAPPING/OPERATOR syntax, but went cross-eyed trying to figure out if I could use the same there. The closest I found was GET BOUND_OBJECT.
    Thanks again!

  • OWB-OWF - Process Flow Deployment - Database Link

    Hello there,
    This post is basically related to my problem with Process Flow deployment.
    Could someone please shed some light on the following:
    When we create a Process Flow, during this process OWF creates a Database Link. For some reason, this link is not functional unless I remove the part after "." in that defines the "HOST" in the DB Link definition. How do I know it is not functional - I know because following query does not work:
    select * from [email protected]@WB_LK_WF_PKG
    Here is the link definition:
    ORIGINAL:
    create database link OWB92TRG.US.ORACLE.COM@WB_LK_WF_PKG
    connect to RR
    identified by "<pwd>"
    using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=CENTENNI-2077E4.CENTENNIALCOLLEGE.CA)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=OWB92TRG)))'
    MODIFIED (it works - above query runs OK):
    create database link OWB92TRG.US.ORACLE.COM@WB_LK_WF_PKG
    connect to RR
    identified by "<pwd>"
    using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=CENTENNI-2077E4)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=OWB92TRG)))'
    My second question is "using what userid/pwd should this link should have been created? Should it use "Runtime Repository Owner" or "OWB Repository Owner" or "Runtime Access User" or "OWF_MGR"?
    No matter what userid I use, it works when I run the query but I always get following error when I try to deploy the "Process Flows" in OWB:
    RPE-02085: Failed to test wb_rti_workflow_util.initialize through deployed Workflow Database Link OWB92TRG.US.ORACLE.COM@WB_LK_WF_PKG2. Please check that "EXECUTE ANY PROCEDURE" privilege is set and that the OWB Runtime is available.
    - ORA-04052: error occurred when looking up remote object [email protected]@WB_LK_WF_PKG2
    ORA-12545: Connect failed because target host or object does not exist
    I have already granted the "EXECUTE ANY PROCEDURE" to OWF_MGR. I am not sure, though, what is meant by the "and that the OWB Runtime is available" part of the error message above.
    I have also tried to fix this by running the "catrpc.sql" script but it did not help either.
    I am stuck on this step for past few days. I would highly appreciate help in fixing this problem. Here is the configuration I am using:
    o Source database : Oracle 9i (9.2) on my local PC
    o Target database : Oracle 9i (9.2) on my local PC
    o OWB 9i
    o OWF 2.6.2
    o OWB and OWF repositories are on the TARGET database
    I am able to successfully deploy and run my MAPPINGs.
    TIA,
    Amer

    Hello Oracle support,
    Should I open a TAR to get this problem resolved?
    Regards,
    Amer

  • Process Flow fails to import

    Hi,
    I am trying to import a process flow from one design repository to another and am failing misrably! I have saved an mdl export of the process flow from the repository where it was created and am simply importing the same mdl into the new rep. I do not get any errors during the import however do get a number of warnings like the one below:
    Warning at line 23: MDL1312: Referenced logical location with name <LOC_X> and UOID <109A0BEE09814D6DE04400306EF40E82> not found for PROCESSMODULE <WAREHOUSE_x>. Logical location not set for this module.
    The result of the import is that the process flow is not imported at all.
    what does it mean by Logical Location?
    Any help on this would be most appreciated.
    Thanks
    Mitesh

    Perfect..thats what I was missing. This has soved my original issue but I'm hitting a new one...in my project export there is an invalid process flow (a process flow is making a call to a function that returns a incorrect datatype) and this is causing my import to error. My question now is; is it possible to import an invalid process flow?
    thanks for your help on this.

  • Process Flow hangs

    I'm executing a process flow with several activities.
    After each activity I check for status and error out if the activity fails. If the activity succeeds I go on to the next activity.
    When I execute a map within the process flow, the process flow executes successfully only if the map is the last activity. The map functions to output data to a file.
    The Process Flow hangs if after the execution of the map
    a stored procedure is called. The stored procedure dynamically creates a DBLINK and updates a table.
    When I cancel the execution of the process flow I see the map has successfully outputted all
    records. But why hasn't it gotten to the stored procedure.
    Each activity on its own works fine but in combination with each other they hang the process flow.

    Mahesh,
    I am assuming that RAB stands for Runtime Audit Browser.
    The Runtime Audit Browser tells me how many records were
    rejected but not which ones and why.
    The debugger does not give adequate information in fact it does not issue a "break" where it should.
    Are there any tools OWB provides for "catching", or
    auditting data that cannot for whatever reason be extracted to a file.
    I see that they have a mechanism for capturing problems with data coming from a file into a table. I don't see
    where there is an explanation of error handling going from a table into a file.
    Thanks!
    Marion

  • Reg: Process Flow of DMS

    Hi Experts
    This is kumar.I'm new to DMS.
    pl explain the process flow of DMS.
    I have created document- cv01n, document structure.
    My queries are;
    1. How to attach the document- relevant status
    2.Where i can see the attched documents(object links),like i can see the attched document in Material Master(Additional Data- Document Tab)
    i require your guidance in where i can see the documents in BOM,Equipment BOM,Functional Location,WBS BOM and other objects.
    3.When i attached the documents the lock (unlocked)- how to lock and its significance.
    4.How i can store the information i.e document
    5. what is CAx applications
    pl explain the above points
    Thanks & Regards
    kumar

    Hi Pavan,
    As per my understanding giving answer for your questions.
    1. Don't Understand.
    2. In BOM you can link/View documents in three place.1) Head material Details 2) Item Material Details & 3) Component level.
        In WBS element in PS - Structure you can view document.
    3.  Don't Understand.
    4.  Don't Understand.
    5.  CA - Cross Application.
    DMS is Cross application component.
    please see the SAP - DMS help.
    [http://help.sap.com/erp2005_ehp_02/helpdata/en/c1/1c31a243c711d1893e0000e8323c4f/frameset.htm].
    Regards,
    Sunny

  • Owb process flow error handling

    Hi,
    I am using OWB 10gR2.
    I have 2 process flows that each call a series of mappings. Then I have one "master" process flow that calls the two aforementioned proecess flows. When a mapping errors, I want my whole master process flow to abort. I put error handling in, but it doesn't seem to work. For example, if I get an error in the first process flow, I get my email notification that something is wrong. The process ends. However, the master process flow continues to go. I want it to stop. It continues to go because there wasn't an error in the first process flow. The error was handled, and the process flow ended successfully. Does anyone have any tips or tricks on how to handle this type of situation? I'm not doing anything revolutionary. I'm just new to these process flows.
    Thanks,
    Tim

    hmm ok this sounds a bit weird to me.
    I've created similar processflows with customers and never had similar problems like you describe.
    Just to verify your design, here is how I would solve your master1 processflow.
    _______________________END_WARNING
    w w
    start----PF1----------s---------------PF2------s---- END_SUCCESS
    e e
    \___________________\____END_WARNING
    where the conditions for the transitions is indicated with w for warning, s for success and e for error.
    Some poorly made ascii art there but hopefully you get the idea...:p
    This also sounds like what you've done already and with extra email functionality.
    Are you sure that pf2 starts after pf1? Or can it actually run in parallel with pf1 but just finishes after pf1 so it seems like it its done afterwards? The reason I ask is that I experienced that in one of my processflows with around 30+ mappings, one of the mappings that was supposed to be executed almost at the end, executed before everything else and messed everything up. It was quite the annoying little bug and took a long time for me to discover. If you have noticed on the transitions, there is a little number next to the line on the canvas, indicating in which order the operators are to be executed. In my case, two transitions had the same number and that caused one of the mappings to just start as soon as the processflow was told to start. If this is the case there is a way to set these, but I don't remember right now. Delete and recreate the transitions also do the trick I think.
    Hope you figure it out!
    Ragnar
    edit: seems like my ascii art got a bit messed up... :(
    Message was edited by:
    rhaug

Maybe you are looking for