8 Replies Latest reply: Jun 14, 2012 10:02 AM by Mike F -Oracle RSS

    Commit happened in activity/function Exception When Launching CREATEPO WF

    483412
      <p>
      Hi all,
      </p>
      <p>
      Got a good one here. Client is receiving the error above in the standard eBusiness Suite Req Approval Workflow. The problem has been narrowed down to the responsibility level. When the final approver is logged is as one Responsibility, the error does not occur. When the final approval is done through logging in as another Responsibility, the error halts the workflow.
      </p>
      <p>

      All profile options are the same for both responsibilities. Both responsibilities use the same function 'Advanced Worklist' to display the Workflow Notifications. This started happening after an upgrade to 11.5.10.2.
      </p>
      <p>
      There is one hit on Metalink but this didn't work (note: 603475.1).
      </p>
      <p>

      I have been through the PL/SQL code and found that there is infact a commit statement in there. The PO Requisition Approval Workflow is calling the Create PO workflow and the error occurs when the wf_engine.StartProcess call is hit. Code flow below.
      </p>
      <p>

      I was always under the impression that commit statements were a big 'no no' in Workflow? I could always take it out but this is standard 11.5.10.2 code so I assume it is there for a reason. Ultimately there must be something wrong with the Responsibility but I cannot for the life of me see it. I suspect that this is tied in with the way Workflow uses the responsibility.
      </p>
      <p>

      <u>Code Flow</u>

      <sup>PO_REQAPPROVAL_LAUNCH.LAUNCH_CREATEPO_WF - called from Workflow function.
      PO_REQAPPROVAL_LAUNCH.LaunchCreatePOWF
      PO_REQAPPROVAL_LAUNCH.CreateWFInstance
      PO_AUTOCREATE_DOC.start_WF_process
      commit;
      wf_engine.CreateProcess - (item type - CREATEPO)
      wf_engine.StartProcess - exception!
      </sup>
      </p>
      <p>

      Any help or comments appreciated.
      </p>
      <p>

      Cheers,
      </p>
      <p>
      Jon.
      </p>
        • 1. Re: Commit happened in activity/function Exception When Launching CREATEPO WF
          NoLongerActive
          Hi,

          Indeed, it is a big "no, no" to have a commit - for exactly the reason that you are seeing :)

          If an activity does a commit, then if there is a problem, the Workflow Engine cannot roll back to the pre-activity savepoint, as this has been blown away. Likewise, you should not roll back - unless it is in an autonomous transaction.

          As much as I hate to say it - I'd raise an SR with Oracle Support since this is something that could impact every instance, if there is an error. If you give them the code stack, that should at least allow them to know where to start.

          Given the impact that this could have, ideally there should be a quick fix - I wouldn't hold your breath though.

          Matt
          -----
          WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development

          Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
          Have you read the blog at http://www.workflowfaq.com/blog ?
          WorkflowFAQ support forum: http://forum.workflowfaq.com
          • 2. Re: Commit happened in activity/function Exception When Launching CREATEPO WF
            NoLongerActive
            Not that I think that it will make any difference, BUT - have you seen MetaLink note 465827.1?

            I can't see why that would make any difference - but I also disagree with the "solution" proposed in 603475.1. That particular "fix" seems to be to workaround the problem rather than actually address the fundamental flaw in the process, i.e. an activity invoked by a Workflow should NEVER issue a commit or a rollback. I'd guess that the PO team need to revisit this completely - the commit was introduced to fix a bug (which I don't have visibility of), but seems to have intoduced more problems further down the line.

            My gut feeling says that the initial response from Oracle will be to determine why one responsibility is causing problems - which again is a fudge of the real problem. If you can, avoid going down this route :)

            Matt
            -----
            WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development

            Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
            Have you read the blog at http://www.workflowfaq.com/blog ?
            WorkflowFAQ support forum: http://forum.workflowfaq.com
            • 3. Re: Commit happened in activity/function Exception When Launching CREATEPO WF
              483412
              Yep, looked at that note but it is a pretty noddy answer. If that setup wasn't there then the whole approval / po creation process wouldn't work. Like you point out in your previous post, the 'commit happening' error is masking another problem that has occurred. In the case of note 465827.1, the problem would be that the workflow is trying to start a process that is invalid, does not exist or is not defined (not sure if you are aware but the setup in the note is to specify the workflow to call to auto create PO's).

              I'll raise an SR on Monday morning and try and avoid the usual faff from Oracle Support. After that I am going to remove the commit and see if I get any meaningful message out of Workflow that will point to the problem with the responsibility. Do you think this is likely?

              Cheers,

              Jon.
              • 4. Re: Commit happened in activity/function Exception When Launching CREATEPO WF
                483412
                Just a quick update. Removed the 'commit' statement but still getting the same error. There must be another 'commit' used somewhere in the code.

                Interestingly, I switched the creation of PO's to 'online', rather than 'background' and this fixes the issue. No error message received. Trouble is the client are creating large volumes of Req's / PO's therefore I think the use of 'online' will cause performance issues.

                This does make me now think that the problem is something to do with the Background process initialising some session info set at the responsibility level.

                About to raise an SR **sigh!**.

                Jon.
                • 5. Re: Commit happened in activity/function Exception When Launching CREATEPO WF
                  483412
                  Done some more testing. Narrowed the problem down to two profile options: "HR: Security Profile" and "HR: Business Group".

                  When a Req is created using a Responsibility with Profile Options "HR: Security Profile" and "HR: Business Group" = "DVC" then Approved with a Responsibility with the same Profile Option values, no error occurs.

                  When a Req is created using a Responsibility with Profile Options "HR: Security Profile" and "HR: Business Group" = "DVC" then Approved with a Responsibility with different Profile Option values, the Workflow errors with 'Commit happened in activity/function Exception When Launching CREATEPO WF' when trying to lauch Create PO workflow.

                  Anyone know if this is a known problem with Workflow? Still awaiting the official response from Oracle.

                  Also, Profile Option "HR: Cross Business Group" is set to "yes" in both requisitioner and approver Responsibilities.

                  Cheers,

                  Jon.
                  • 6. Re: Commit happened in activity/function Exception When Launching CREATEPO WF
                    621593
                    Jon, did you ever receive a resolution for this problem? The same thing is happening to us.

                    Thanks,
                    Dale
                    • 7. Re: Commit happened in activity/function Exception When Launching CREATEPO WF
                      483412
                      Hi Dale,

                      Unfortunately still playing "tennis' with Oracle on this one. Think they are about to exhaust their easy returns soon though so hopefully will get a result quickly. Will keep this thread up to date with any further info as and when I get it.

                      Cheers.

                      Jon.