Function called several times

Hello

In my custom workflow, when the user approves a notification, it goes to the next function in the workflow. I used the command insert in this function to insert data into a custom table. I see that the data is inserted 2 times with different values.
I was wondering how the insert statement is called 2 times when he was supposed to do only once?

Any suggestions?

Thanks in advance.

2 scenarios that can occur:

(1) check whether you have a message notification function that is also an insert in the custom table.
(2) to ensure that the procedure called by your function activity have good if funcmode conditions. Paste the snippet of the Workflow Developer's Guide:

API standard for procedures called by function activities PL/SQL

PL/SQL all the stored procedures that are called by the function or the notification of activities in a Workflow Oracle process should follow this standard API format so that the workflow engine can correctly run the activity.

Important: The Workflow Engine traps errors generated by the function activities by defining a backup point before each function activity. If an activity generates an unhandled exception, the engine performs a restore to the backup point and sets the activity of the error state. For this reason, you should never engage in the PL/SQL to an activity of the function procedure. The questions never one workflow engine commit it is the responsibility of the calling application to commit.

For environments such as database triggers or distributed transactions that do not allow for recording points, the workflow engine automatically intercepts the errors 'Point unauthorized registration' and differs from the execution of the activity of the base engine.

Components of Oracle workflow that continue the asynchronous processing, such engines at bottom and the system of Notification, workflow are issued is committed, where appropriate on behalf of the calling application.

The example in this section is numbered using the notation (1) for ease of use. The numbers themselves are not part of the process.

(1) procedure
(itemtype in varchar2,
ItemKey in varchar2,
actid number,
funcmode in varchar2,
Result out out varchar2) is

(2)

(3) start

If (funcmode = 'RUN') then

Out result: = ' COMPLETE:';
return;
end if;

(4) if (funcmode = ' CANCEL') then

Out result: = "FULL";
return;
end if;

(5) if (funcmode = 'SKIP') then

Out result: = ' COMPLETE:';
return;
end if;

(6) if (funcmode = ' RETRY') then

Out result: = ' COMPLETE:';
return;
end if;

(7) if (funcmode = ' VALIDATE') then

Out result: = "FULL";
return;
end if;

(8) if (funcmode = 'RESPONSE') then

Out result: = "FULL";
return;
end if;

(9) if (funcmode = "forward") then

Out result: = "FULL";
return;
end if;

(10) if (funcmode = 'TRANSFER') then

Out result: = "FULL";
return;
end if;

(11) if (funcmode = 'QUESTION') then

Out result: = "FULL";
return;
end if;

(12) if (funcmode = ' REPLY') then

Out result: = "FULL";
return;
end if;

(13) if (funcmode = "TIMEOUT") then

If () then
Out result: = "FULL";
on the other
Out result: = wf_engine.eng_timedout;
end if;
return;
end if;

(14) if (funcmode = "") then
Out result: = ' ';
return;
end if;

(15) exception
while others then
WF_CORE. CONTEXT ("", "",
, ,
TO_CHAR (), );
lift;

(16) end ;

Tags: Database

Similar Questions

  • Type of the object called several times Oracle constructor

    I have an object of type with a custom constructor. In SQL, when I reference attributes the constructor is called several times in Oracle 11.2.0.4.

    1. Why the constructor is called more than once?
    2. How can I stop it?

    My current job is about to reference attributes and use the / * + materialize * / tip.


    Problem installation

        create or replace type Foo as object
        (
          Bar1 NUMBER,
          Bar2 NUMBER,
          Bar3 NUMBER,
    
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
        )
    /
        create or replace type body Foo is
    
          -- Member procedures and functions
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
          AS
          BEGIN
            SELF.Bar1 := p_Bar1;
            SELF.Bar2 := p_Bar2;
            SELF.Bar3 := p_Bar3;
            dbms_output.put_line('Foo Constructor Called');
            RETURN;
          END;
    
        end;
    

    Problem

        -- Constructor is called 6 times! 
        -- Once for each column and once for each predicate in the where clause.
        SELECT x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3, f
        FROM (
          SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
          FROM dual d
        ) x
        WHERE x.f.bar1 = x.f.bar1 AND x.f.bar2 = x.f.bar2
    

    Output

    Foo constructor called

    Foo constructor called

    Foo constructor called

    Foo constructor called

    Foo constructor called

    Foo constructor called

    Workaround

        -- Work Around
        -- Constructor is called 3 times
        -- Once for each column in the inline view. 
        -- Note, I removed column f (the object type) because it's not compatible with the materialize hint.
        WITH y AS (
          SELECT /*+ materialize */ x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3
          FROM (
            SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
            FROM dual d
          ) x
        )
        SELECT y.bar1, y.bar2, y.bar3
        FROM y
        WHERE y.bar1 = y.bar1 AND y.bar2 = y.bar2
    

    Another solution is described in this thread... Access to the fields of an object custom type... which makes use of a type of collection combined with SCOREBOARD operator, like this...

    create or replace type FooTable as table of Foo;
    
    SELECT x.bar1 AS bar1, x.bar2 AS bar2, x.bar3 AS bar3, value(x) f
        FROM table(FooTable(
          foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3)
        )) x
        WHERE x.bar1 = x.bar1 AND x.bar2 = x.bar2
    ;
    
    BAR1 BAR2 BAR2 F
    1    2    3    (1, 2, 3)
    
    Foo Constructor Called
    

    Hope that helps...

    Gerard

  • The purpose of programmatic view called several times ExecuteQueryForCollection

    [JDev/ADF v11.1.1.5.0]

    I am trying to create a VO that is not supported by DB, but instead takes its data from an external source (subsequently, a web service, but that's irrelevant to this question). I followed on each sample, I found and have created the VO and all overridden methods. I use this VO to create a LOV list for a VO another attribute, and the values in the LOV will vary based on a value in another attribute in the main volume (this is called LOVs cascading in various places).

    Here's an example, using the HR schema (a little artificial, I admit it):

    -Two your - DepartmentVO and ManagerVO - are defined

    -The DepartmentVO is supported by the DB and a normal EO and VO.

    -L' Manager in the DepartmentVO attribute is set to a supported by the ManagerVO LOV

    -The ManagerVO is programmatic and returns a list of employees who are in the same Department as the DepartmentID in the line of master DepartmentVO. To do this, use a Bind Variable (DeptId) that is set up to take the value of the DepartmentID attribute in the current line of DepartmentVO. This value of binding is used to filter the list of employees referred to only in the same Department.

    -J' replaced the executeQueryForCollection method in ManagerVOImpl. Here, I retrieve the value of the variable DeptId bind parameters passed in object/object2 to the method, and then use to retrieve employees in this Department of my main source.

    So far so good. Presents all works. (He lifts the employees in the same Department and displays them in the popup LOV.) If you change the Department then click to display the attribute Manager LOV, it shows you the list of employees in the new Department.)

    The problem I see is that the executeQueryForCollection method is called several times (2 or 3), causing the recovery of employees in the Department occur several times. For example, the test by running the AM executeQueryForCollection is called when I click the button to display the popup LOV (which makes sense). However, it is said AGAIN when I click the OK button in the popup LOV after selecting one of the values. (This should NOT!) And, if I create a JSF page and drop the data control to create a form and test it in this way, the executeQueryForCollection is called THREE times!

    I have the logic in the class ManagerVOImpl, which checks whether the list of employees has been recovered already, and if so, it's just returns the existing list. However, multiple calls are actually coming from different instances of the VO class, so that they only "see" the list has already been retrieved (because she was retrieved from another instance of the class, not this one).

    So my question is: How can I ADF do not call the executeQueryForCollection several times during the use of the VO as a LOV so that my (very expensive) call in the master repository to retrieve the list of employees is not executed more than necessary?  Is my only option to implement share caching mechanism myself that stores the list of employees of a Department somewhere in memory? I thought that ADF BC will make caching for me at the level VO?

    Thanks for any help that anyone can provide. I have literally been taken with that for two weeks, when I thought it would be a 'fast' to implement! :-)

    I'd be happy to upload/attach the source of my 'ManagerVOImpl' class, if that would be helpful.

    Have you tried to put a conditional statement in your back-end call happens only on your principal of the VO and not on the other 2 forums and see if that affects your functionality?

    that is, if (myIdName == "myVOInstance") {}

    do things;

    }

    I did it with VO this call that some heavy DB stored procedures in the executeQueryForCollection.

  • FieldChangeListener fieldChanged called several times to EditField?

    Why fieldChanged is called several times in an EditField and how to avoid what is happening or maybe even control how many times the method, I want to be called, is called.

    The debugger that I noticed that my method is running serval times, most of the time + 20 times, and it's ruining the flow of just this is an edit field, is far from avoid this? I'm doing something wrong? or is this a normal behavior?

    I'm past the code if it helps, but if I can get the answers to these questions, am sure I can fix the code myself.

    Thank you

    Nevermind, figured it out, sorry for losing space, bandwidth, etc etc.

  • method of before the Phase of initMethod() in view calling several times:

    Hello world

    I dragged a table as read-only table with simple rank of verified selection.
    A button to go there in the page.
    The code in the go button takes the curretn by selecting the current row and the values of print.
    The initMethod() code is execution of the VO.

    The problem is when the page load the initMethod() (before the phase in view) calls several times even after loading the page.
    Continuously its call to this method.

    How to call only once when the page is loaded?

    All suggestions will be really useful.

    Thank you.

    Hello Kumar,
    There are many topics on the web to achieve this.
    This is one of them
    https://blogs.Oracle.com/ADF/entry/an_epic_question_how_to

  • Function used in the view definition is called several times

    I'm writing a view that boils down to the following statement:

    SELECT val, val)
    SELECT SYS_GUID() val
    OF the double
    )

    Against my expectation, which calls SYS_GUID() twice, resulting in two different values for val.

    I have written here as view inline, but it must be a regular view in reality. Is it possible to build this view while SYS_GUID is called only once, even if the resulting value is then selected several times? Naively, I want to affect the outcome of SYS_GUID to a variable, and then select the value of this variable. However, this seems not possible in a view.

    New to Oracle PL/SQL. This works as expected in T - SQL SQL Server.

    Thanks for any help or insight you can provide.

    -Brian

    Hmmm, I have no 11 + available so I can't check a solution, but I would like to test:

    SELECT val, val FROM (
    SELECT SYS_GUID() val
    FROM dual
    WHERE ROWNUM = 1
    )
    

    or

    SELECT val, val FROM (
    SELECT /*+ NO_MERGE */ SYS_GUID() val
    FROM dual
    )
    

    Edit: the no_merge indicator seems to work in 10.2.0.4

    Published by: David_Aldridge on December 14, 2010 23:21

  • Managed Bean method called several times in AF:ITERATOR

    Dear all,
    I can do not to understand this concept in the ADF. Being a beginner, I would like to know
    the reasoning behind this.

    I use af:foreach components and then I link it to my below managed bean.
    <af:panelTabbed id="pt1">
         <af:forEach var="item" items="#{testBean.departmentsData}">
           <af:showDetailItem text="#{item}" id="sdi1"/>
         </af:forEach>
    </af:panelTabbed>
    public class TestBean {
        public List getDepartmentsData() {
            System.out.println("I was clicked!!!!");
            List lstData = new ArrayList();
            lstData.add("IT");
            lstData.add("Finance");
            lstData.add("Accounting");
            return lstData;
        }
    }
    On the first charge, it prints 7 times "I clicked".

    When I clicked on one of the tab, I get 7 again which means my method was called 7 times.
    Any reason behind this. ? Thank you.

    I have used JDEV PS3 is told by the way.

    Rather than build the list in your getter, build a list somewhere (in the constructor, perhaps). Your getter can then return just this list.

    John

  • Frame 1 called several times

    Hey all,.

    Have a problem with flash. I have the code that I placed in frame 1 that seems to be called many times. I thought that image1 could get called once during initialization when the page first loaded the object but which does not occur.

    Is this normal then? I put my code in a different location?

    Or simply put a stop() action somewhere after frame 1.

    --
    Dave-
    Developer leader
    www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • (Bug)  Function that is called on the authenticationSuccess parameter is called several times

    < rtc:AdobeHSAuthenticator id = "auth" authenticationKey = '{authToken}' protocol = "rtmfp" authenticationSuccess = "onAuthSuccess (); "authenticationFailure ="onAuthFailure (event); "/ >

    The onAuthSuccess() function that is called at all times

    Hi Ashish,

    Can you give us the smallest possible complete app that reproduces it

    question? I just built a simple and it worked.

    Thank you

    Nigel

  • PushApplication onMessage is called several times

    Hi guys,.

    I contacted my team BE but I'm waiting for answer, I want to ask the community:

    Your onMessage is called repeatedly with the same message?

    I see in the code for the examples of the RIM, they check that this message is new (not melted yet):

        public static void process( PushInputStream pis, Connection conn ) {
            Logger.log( "Reading incoming push message ..." );
    
            try {
    
                HttpServerConnection httpConn;
                if( conn instanceof HttpServerConnection ) {
                    httpConn = (HttpServerConnection) conn;
                } else {
                    throw new IllegalArgumentException( "Can not process non-http pushes, expected HttpServerConnection but have "
                            + conn.getClass().getName() );
                }
    
                String msgId = httpConn.getHeaderField( MESSAGE_ID_HEADER );
                String msgType = httpConn.getType();
                String encoding = httpConn.getEncoding();
    
                Logger.log( "Message props: ID=" + msgId + ", Type=" + msgType + ", Encoding=" + encoding );
    
                if( !alreadyReceived( msgId ) ) {
    }
    }
    

    You have the same control in your application?

    Thank you

    Eugen

    There is no guarantee that dups can be sent to the device, but in my experience its pretty rare. You will need to add a message id to the http header when you tap the message to make it work.

  • Paint is called several times...

    Hello

    My code has a check box form field, on which I paint custom color development on its width and its height. The user interface works fine, but her object is called repeatedly even though no cases of the user (such as scrolling or selection) occurs on the ground.

    Here is my code block:

    CheckboxField checkBoxField = new CheckboxField(checkBox
                            .toString()) {
    
    protected void paint(Graphics graphics) {
       System.out.println("in paint() of cb");
       if (this.isFocus()) {
        System.out.println("is focused");
        graphics.setColor(getHighlightColor());
        graphics.fillRect(0, 0,    this.getExtent().width,this.getExtent().height);
       }
    
    graphics.setColor(getFontColor());
    super.paint(graphics);
    }
    };
    

    Also, I found another similar post but it dint work for me: http://supportforums.blackberry.com/t5/Java-Development/paint-method-gets-called-repeatedly/m-p/5829...

    Any help would be much appreciated...

    P.S. This checkbox field is held in a verticalFieldManager.

    Thank you...

    Hey...

    Thanks for the reply Peter...

    finally understood it...

    My screen had an image bitmap field, in which object, I used the setSpace(). The setSpace() seems to invalidate the field and thus invoke its object in a nested way.

    However, what surprised me are the fact that such behavior was only on the screen with the check box and the date fields.

    Anyway, moral of the story: be careful of API do you use in object, do NOT invalidate the field.

    Thank you...

  • Reg: Count function call-

    Hi Experts,

    I am tracking my processing batch every night and find a particular function called many times.

    Is it possible that I can find how many times it was performed in a given period of time?

    AWR? Or, any dynamic view v$ _?

    Please notify.

    Thank you and best regards,

    -Nordine

    (on Oracle 10.2.0.4.0)

    Asked me the same question to the company less than a month ago so I can shed some light on this particular situation (not too much).

    Some (say seven) years ago our thinkers came up with the idea of VAE and apparently I was the only one who objected to the approach (https://www.simple-talk.com/opinion/opinion-pieces/bad-carma/ and articles in several Tom Kyte has had no effect he was only harmful for me - no promotion,...).

    Therefore, the number of attributes is greatly increased and the situation becomes more and more unbearable.

    As it is mandatory to call for attribute values, it is not just online treatment, plans sql also suffer (calling functions for each line) that the same functions are called from sql too.

    Verification of AWR reports it turns out that some functions that provide attribute values are called more than a hundead million times a day, and as we call them around there is little use querrying dependencies without taking into account the volumes of data (if only someone knew how).

    So something like WHO_CALLED_ME is required to identify the heaviest appellants and (much more than that), it is a problem of how silently (as much as possible) reduce the number of attributes where nobody is now willing to admit the decision was wrong or (not even in my dreams) that I was right.

    As far as I KNOW two attributes have been removed these time and proclaimed a spectacular feat of tuning.

    Chi lives, vedra that lets say our Italian neighbours.

    Concerning

    Etbin

  • receive the following error code when searching for a piece of music I did several times without a music problem but have recently updated Firefax: Fatal error: Call to undefined function AmazonData() in/home/boss/public_html/mc on line 13

    I am in the page web http://www.songarea.com/ and after searching a piece of music, I get the following error message:
    "Fatal error: Call to undefined function AmazonData() in/home/boss/public_html/mc on line 13.
    I did this several times before without a problem, but have recently updated Firefox with the Skype add-on and wonder if the two things are related.

    URL of affected sites

    http://www.songarea.com/

    Hi John,.

    It is an error message from the web server providing this site. Specifically, it is something wrong with their PHP code.

    It is not browser specific and would go into another browser besides Firefox.

    You will need to contact the webmaster of this site to report this problem. A quick test does not show this problem, but you do not specify what search query, you tried:

    http://www.songarea.com/music-codes/test.html

  • call the owner VI several times

    Hi all

    I try to call the owner VI several times and was not sure if it's possible. I try to call the same VI in a VI with different condition.

    I have this VI as active with reentrant template (VI_1), and inside the loop, he calls another instance of this model (let's call it VI_2) and wait for the completion called VI (VI_2) and proceed to the next action. The problem, it's wait until done does not wait even if I set it to True. Can someone tell me what I am doing wrong? or even if this is possible.

    Thank you in advance.

    So the VI calls himself?

    If so, you can drop the VI to its own diagram if it is defined in the version of LabVIEW 2009 neres and later.

    Tone

  • How to use a function switch box to the reference that is used several times in the previous drop-down list options?

    I use JavaScript coding in LiveCycle and development of dependent drop-down areas, but I find it difficult to write correct code. See the example below. I'm trying to use a multiple box function that refers to an option that is listed several times in the previous pull-down menu. The problem I am running into is that when I refer to any color or Nissan and Chevy, it returns the results of the color in the "Ford" column only. I'll always see color (blue, black, green and purple) options in my second drop-down list and it seems fine, but then the third drop reference only the options and colors 'Ford '. (I don't have the code for the third menu list drop-down).

    I want the client to choose Chevy or Nissan and have her drop downs (based on the color they chose)-dependent, but I can't seem to make this work.

    I hope it is clear enough (probably as mud...). I would appreciate help!

    Form1. #subform [0]. #subform [1]. cboModels::exit - (JavaScript, client)

    cboColor.clearItems ();

    {Switch (this.) RawValue)}

    case "Ford":

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    case 'Chevy ':

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    case "Nissan":

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    }

    Form1. #subform [0]. #subform [1]. cboColor::exit - (JavaScript, client)

    cboPrice.clearItems ();

    {Switch (this.) RawValue)}

    case "Ford":

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    case 'Chevy ':

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    case "Nissan":

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    }

    You can use '\n' for newline in a string, so

    "Option 1, \nOption 2, \nOption 3;

    Put each on its own line.

    Bruce

Maybe you are looking for

  • HP Laser Jet P2015: hp 2015

    I have this HP laser jet 2015 printer has stopped printing. When I select print nothing happens. He institutionalized will display if I restart the printer, but little else. In the printer dialog box it says the printer is off line/not connected. The

  • error 641

    Mereor242 thanks for this, wanted for more than a week for a solution, followed your instructions and after restarting my pc updates installed without problem, I was wondering just if this error correction 641 would work on a laptop running windows 7

  • cxmlfile0 - &#62; could not IID_IXMLDOMDocument2 instance... How 2 solve this

    cxmlfile0-> could not IID_IXMLDOMDocument2 instance... I get this error box and I need 2 know how 2 difficulty it... thnx 4 any help you can give...

  • Alignment falls down, won't print black

    Photosmart C410a Prem Mac osx hard wired and wireless printer alignment fail, won't print black Robert Eick

  • Problem with the activation of the scrolling features

    Hi all: I write a game application that takes advantage of two menus api normal (for the initial screen), as well as related graphical rendering tips, once the game is in progress.  One of the menus I have is a statistics screen, implemented as follo