use of org.compiere.wf.MWFProcess in project adempiere by adempiere.
the class WorkflowTest method testQuery.
public void testQuery() throws Exception {
//
// Check MWFActivity
int AD_Table_ID = MRequisition.Table_ID;
// dummy;
int Record_ID = 1;
MWFActivity.get(getCtx(), AD_Table_ID, Record_ID, false);
MWFActivity.get(getCtx(), AD_Table_ID, Record_ID, true);
//
// Check MWFEventAudit
// dummy
int AD_WF_Process_ID = 1;
// dummy
int AD_WF_Node_ID = 1;
MWFEventAudit.get(getCtx(), AD_WF_Process_ID, AD_WF_Node_ID, getTrxName());
MWFEventAudit.get(getCtx(), AD_WF_Process_ID, getTrxName());
//
// Check MWFProcess
MWFProcess proc = new Query(getCtx(), MWFProcess.Table_Name, null, getTrxName()).setClient_ID().setOrderBy(MWFProcess.COLUMNNAME_AD_WF_Process_ID).first();
if (proc != null) {
proc.getActivities(true, false, getTrxName());
proc.getActivities(true, true, getTrxName());
} else {
// TODO: check MWFProcess - need better test
}
//
// Check MWorkflow, MWFNode, MWFNodeNext etc
int AD_Client_ID = getAD_Client_ID();
// Process_Requisition
int AD_Workflow_ID = 115;
MWorkflow wf = MWorkflow.get(getCtx(), AD_Workflow_ID);
for (MWFNode node : wf.getNodes(false, AD_Client_ID)) {
MWFNodePara.getParameters(node.getCtx(), node.getAD_WF_Node_ID());
for (MWFNodeNext next : node.getTransitions(AD_Client_ID)) {
next.getConditions(true);
next.getConditions(false);
}
}
// Check MWorkflowProcessor
for (MWorkflowProcessor processor : MWorkflowProcessor.getActive(getCtx())) {
processor.getLogs();
}
//
//
}
Aggregations