OAF how to invoke Workflow Process from Controller

//Controller Java Code

                        String PItemType = "XXLTWF07";
                        String PProcess = "XXEMBEDOAFPROC";
                        oracle.jbo.domain.Number pitekKeyNo = 

                        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", 
                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();

Leave a Reply

Your email address will not be published.