use of org.compiere.model.X_ASP_Workflow in project adempiere by adempiere.
the class ASPGenerateLevel method generateWorkflow.
private void generateWorkflow(int p_AD_Workflow_ID) {
// Add Workflow and Nodes
MWorkflow workflow = new MWorkflow(getCtx(), p_AD_Workflow_ID, get_TrxName());
if (DB.getSQLValueEx(get_TrxName(), "SELECT COUNT(*) FROM ASP_Workflow WHERE ASP_Level_ID = ? AND AD_Workflow_ID = ?", p_ASP_Level_ID, workflow.getAD_Workflow_ID()) < 1) {
X_ASP_Workflow aspWorkflow = new X_ASP_Workflow(getCtx(), 0, get_TrxName());
aspWorkflow.setASP_Level_ID(p_ASP_Level_ID);
aspWorkflow.setAD_Workflow_ID(workflow.getAD_Workflow_ID());
aspWorkflow.setASP_Status(p_ASP_Status);
if (aspWorkflow.save())
noWorkflows++;
}
}
use of org.compiere.model.X_ASP_Workflow in project adempiere by adempiere.
the class ASPGenerateFields method generateWorkflow.
private void generateWorkflow(int p_AD_Workflow_ID) {
// Add Workflow and Nodes
MWorkflow workflow = new MWorkflow(getCtx(), p_AD_Workflow_ID, get_TrxName());
if (DB.getSQLValueEx(get_TrxName(), "SELECT COUNT(*) FROM ASP_Workflow WHERE ASP_Level_ID = ? AND AD_Workflow_ID = ?", p_ASP_Level_ID, workflow.getAD_Workflow_ID()) < 1) {
X_ASP_Workflow aspWorkflow = new X_ASP_Workflow(getCtx(), 0, get_TrxName());
aspWorkflow.setASP_Level_ID(p_ASP_Level_ID);
aspWorkflow.setAD_Workflow_ID(workflow.getAD_Workflow_ID());
aspWorkflow.setASP_Status(p_ASP_Status);
if (aspWorkflow.save())
noWorkflows++;
}
}
Aggregations