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|
Category: OAF