public void importRecords(){
  List<X_I_Workflow> iworkflows=getRecords(false,m_IsImportOnlyNoErrors);
  for (  X_I_Workflow importWorkflow : iworkflows) {
    MWFNode node=null;
    MWorkflow workflow=getWorkflow(importWorkflow);
    if (workflow != null) {
      node=getWorkflowNode(importWorkflow,workflow);
    }
    if (node != null) {
      if (workflow.getAD_WF_Node_ID() <= 0) {
        workflow.setAD_WF_Node_ID(node.get_ID());
        workflow.saveEx();
      }
      importWorkflow.setAD_WF_Node_ID(node.get_ID());
      importWorkflow.setAD_Workflow_ID(workflow.get_ID());
      imported++;
    }
    importWorkflow.setI_IsImported(true);
    importWorkflow.setProcessed(true);
    importWorkflow.saveEx();
  }
  for (  X_I_Workflow importWorkflow : iworkflows) {
    MWFNode node=(MWFNode)importWorkflow.getAD_WF_Node();
    if (node != null) {
      int node_id=getID(MWFNode.Table_Name,"AD_Workflow_ID= ? AND Value=?",new Object[]{importWorkflow.getAD_Workflow_ID(),importWorkflow.getNodeNextValue()});
      if (node_id > 0) {
        MWFNode next=new MWFNode(getCtx(),node_id,get_TrxName());
        createTransition(node,next);
      }
    }
  }
}

public void importRecords ( ) { List < X_I_Workflow > iworkflows = getRecords ( false , m_IsImportOnlyNoErrors ) ; for ( X_I_Workflow importWorkflow : iworkflows ) { MWFNode node = null ; MWorkflow workflow = getWorkflow ( importWorkflow ) ; if ( workflow != null ) { node = getWorkflowNode ( importWorkflow , workflow ) ; } if ( node != null ) { if ( workflow . getAD_WF_Node_ID ( ) <= 0 ) { workflow . setAD_WF_Node_ID ( node . get_ID ( ) ) ; workflow . saveEx ( ) ; } importWorkflow . setAD_WF_Node_ID ( node . get_ID ( ) ) ; importWorkflow . setAD_Workflow_ID ( workflow . get_ID ( ) ) ; imported ++ ; } importWorkflow . setI_IsImported ( true ) ; importWorkflow . setProcessed ( true ) ; importWorkflow . saveEx ( ) ; } for ( X_I_Workflow importWorkflow : iworkflows ) { MWFNode node = ( MWFNode ) importWorkflow . getAD_WF_Node ( ) ; if ( node != null ) { int node_id = getID ( MWFNode . Table_Name , "AD_Workflow_ID= ? AND Value=?" , new Object [ ] { importWorkflow . getAD_Workflow_ID ( ) , importWorkflow . getNodeNextValue ( ) } ) ; if ( node_id > 0 ) { MWFNode next = new MWFNode ( getCtx ( ) , node_id , get_TrxName ( ) ) ; createTransition ( node , next ) ; } } } }
import records from i_workflow to ad_workflow table
