Share via


JmgConsistencyCheck_job.executionOrder Method [AX 2012]

Returns an integer that represents the order of which the consistency check should be executed.

Syntax

public Integer executionOrder()

Run On

Called

Return Value

Type: Integer Extended Data Type
The order of execution.

Examples

The following example demonstrates the use of this method.

void initTmp() 
{ 
    int                     i; 
    DictClass               curClass; 
    SysConsistencyCheck     consistencyCheck; 
    container               classData; 
    ListEnumerator          classEnum; 
 
    TmpSysConsistencyCheck  tmpParents; 
 
    void add(classId classId) 
    { 
        curClass            = new DictClass(classId); 
        consistencyCheck    = curClass.makeObject(); 
        if (consistencyCheck.showInTree() && this.hasCorrectParent(consistencyCheck, curClass.id())) 
        { 
            tmp.Id = curClass.id(); 
            if (tmp.Id == topClassId) 
                tmp.ParentId = 0; 
            else 
                tmp.ParentId = consistencyCheck.treeParentClassId(); 
 
            tmp.Selected      = true; 
            tmp.Description   = RunBase::getDescription(tmp.Id); 
            tmp.ExeOrder      = consistencyCheck.executionOrder(); 
            tmp.HelpTxt       = RunBase::getHelpText(tmp.Id); 
            if (consistencyCheck.hasDialog()) 
            { 
                consistencyCheck.getLast(); 
                classData = consistencyCheck.pack(); 
            } 
            else 
            { 
                classData = connull(); 
            } 
            tmp.Data = classData; 
            tmp.insert(); 
        } 
    } 
 
    delete_from tmp; 
 
    curClass = new DictClass(this.baseClassId()); 
    if (! curClass) 
        return; 
 
    add(curClass.id()); 
 
    classEnum = curClass.extendedBy().getEnumerator(); 
    while (classEnum.moveNext()) 
    { 
        add(classEnum.current()); 
    } 
 
    if (module2classIdMap) 
        return; 
 
    module2classIdMap = new Map(Types::Integer,Types::Integer); 
    classEnum.reset(); 
    while (classEnum.moveNext()) 
    { 
        curClass            = new DictClass(classEnum.current()); 
        consistencyCheck    = curClass.makeObject(); 
        if (curClass.id()    != this.baseClassId() && 
            isConfigurationkeyEnabled(consistencyCheck.configurationKey()) && 
            (consistencyCheck && consistencyCheck.treeParentClassId() != this.baseClassId())) 
        { 
            continue; 
        } 
        tmpParents.Id           = classEnum.current(); 
        tmpParents.Description  = RunBase::getDescription(tmpParents.Id); 
        tmpParents.insert(); 
    } 
 
    module2classIdMap.insert(0,this.baseClassId()); 
    i=1; 
    while select tmpParents 
        order by Description 
    { 
        module2classIdMap.insert(i,tmpParents.Id); 
        i++; 
    } 
}

See Also

Reference

JmgConsistencyCheck_job Class