export / import ax 2012 workflow

static void workflow(Args _args)
{
    str path;
    SysWorkflowConfigurationListPage Obj;
    WorkflowTable workflowTable;
    WorkflowVersionTable version;
// Export function:select the export workflow
  select workflowTable join version where workflowTable.recid == version.workflowTable && workflowTable.SequenceNumber == '000093' && workflowTable.DataArea == 'cnk';
 // export the workflow by configurationid to path
   SysWorkflowConfigurationListPage::exportConfiguration(path,version.ConfigurationId);

// import to your company
    changeCompany('yourCompany')
    {
    obj = new SysWorkflowConfigurationListPage();
    path = 'importExportFilePath'
    Obj.importConfiguration( WorkflowAXVersion::AX6, path , true );
    }
    info('Done');
}

你可能感兴趣的:(export / import ax 2012 workflow)