1 Reply Latest reply on Dec 19, 2016 2:54 PM by mdtaylor

    Workflow startprocess not launching

    LokeshSurana

      Hi

       

      Developed one custom workflow.

      Below is code for launching workflow.

       

      When i am tying to launch, its not get completed. After 2 hours its says Time Out error.

       

      When i am check in Status Monitor Process got launched but Start function not initiated.

       

      Please guide.

       

      Thanks.

       

      Code -

      declare

           l_itemtype VARCHAR2(30)  := 'PAEVAPP';

          l_itemkey  VARCHAR2(300);-- := 'PAEVAPP-' || P_SEQ;

          p_err_code number;

          P_SEQ number;

         

        BEGIN

       

          P_SEQ:=4;

           

          l_itemkey := 'PAEVAPP-' || P_SEQ;

         

          wf_engine.createprocess(l_itemtype,l_itemkey,'XXPAEVAPP',NULL,NULL);

       

       

          wf_engine.setitemuserkey(itemtype => l_itemtype ,itemkey => l_itemkey ,userkey =>  l_itemkey);

        

          wf_engine.setitemowner(itemtype => l_itemtype ,itemkey => l_itemkey ,owner => 'SYSADMIN');

       

       

          wf_engine.setitemattrnumber(itemtype => l_itemtype ,itemkey => l_itemkey ,aname => 'UNIQUE_SEQ' ,avalue => P_SEQ);

       

       

         wf_engine.startprocess(l_itemtype, l_itemkey);

         

        END;