6 Replies Latest reply: Jun 12, 2012 9:10 AM by 529456 RSS

    What starts a workflow?

    529456
      Hello,

      We would like to determine what events or user activities start workflows. This question can be interpretted numerous ways, so to give an example, what button on what form causes workflow POAPPRV to start? We would like to determine this for a long list of workflows I have been given.

      Is there a way to determine this?

      Thank you,
        • 1. Re: What starts a workflow?
          Alejandro Sosa-Oracle
          Please submit this question to the Purchasing team as WF provides the mechanisms to start a workflow process, which is mainly through the business event system and the WF_ENGINE APIs. These can be used from any kind of application from back or front ends.

          Regards.
          • 2. Re: What starts a workflow?
            529456
            Thank you Alejandro,
            The PO workflow was just an example. I was given the following list of workflows, and hoped there was some query I could run to find out what event started the workflow, so I would not have to research each one separately.

            CS_KB_W1
            FNDFFWK
            HRSSA
            HXCEMP
            OTWF
            PAEPCISC
            PAEPCWF
            PAPROWF
            POAPPRV
            POWFPOAG
            POWFRQAG
            REQAPPRV
            WFERROR
            WFSTD
            XIRC_ANO
            XOLM_LPA
            • 3. Re: What starts a workflow?
              SarojaKandepuneni
              The workflow engine APIs that start the workflow are below.

              1. wf_engine.StartProcess()
              The syntax is below
              procedure StartProcess
              (itemtype in varchar2,
              itemkey in varchar2);

              itemtype is the name of the workflow which you listed eg:POAPPRV.

              2. wf_engine.LaunchProcess()
              The syntax is below

              procedure LaunchProcess
              (itemtype in varchar2,
              itemkey in varchar2,
              process in varchar2 default '',
              userkey in varchar2 default '',
              owner in varchar2 default '');

              itemtype is the name of the workflow which you listed eg:POAPPRV.


              You can know the events which will launch the listed workflow in the following way.
              Actually the event subscription that has the action type as "Send the event message to a workflow process" will launch the workflow.
              You can find the event subscription that will launch the workflow using below query
              select * from wf_active_subscriptions_v where wf_process_type = 'WFERROR'
              wf_process_type -- is the name of the workflow process which will be launched

              You need to run this query for each workflow items
              • 4. Re: What starts a workflow?
                529456
                Thank you for your help.
                • 5. Re: What starts a workflow?
                  SarojaKandepuneni
                  Can you mark my answer is correct/Helpful if it is useful to you.
                  • 6. Re: What starts a workflow?
                    529456
                    I thought I did. I have now. Thank you.