OAF how to invoke Workflow Process from Controller

//Controller Java Code

    if(pageContext.getParameter("invokeWF")!=null)
      {
     
                        String PItemType = "XXLTWF07";
                        String PProcess = "XXEMBEDOAFPROC";
                        oracle.jbo.domain.Number pitekKeyNo = 
                        pageContext.getApplicationModule(webBean).getSequenceValue("XX_TEST_SEQ");

                        String PItemKey = pitekKeyNo.toString(); // This can be a random item key generated 

                        OANavigation wf = new OANavigation();

                        // Now create Workflow Process
                        wf.createProcess(pageContext, PItemType, PProcess, PItemKey);

                        // Set Sales Order Number
                 wf.setItemAttrText(pageContext, PItemType, PItemKey,"XXPERFORMER", 
                 "OPERATIONS");
                 
                java.math.BigDecimal personIDBD = new java.math.BigDecimal(5) ;
                
                wf.setItemAttrNumber(pageContext, PItemType, 
                         PItemKey,"XXWF_HRMS_PERSONID", personIDBD);

                        // Start Workflow Process
                        wf.startProcess(pageContext, PItemType, PProcess, PItemKey);
                        
                       // pageContext.writeDiagnostics();
                    
      }

Comments |0|

Legend *) Required fields are marked
**) You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Category: OAF