RunBase framework:

The RunBaseBatch class extends the RunBase class and allows one to create classes (jobs) that can be added to the batch queue. Once the job has been added to the queue, it will be executed by the batch server. This concept is known as batch processing.

Whenever you write a class that typically asks a user for input and then starts a process based on that input you use the RunBase framework as most of the typical methods needed for such a Job is already implemented in the RunBase class. This means that using the RunBase framework is done by extending RunBase either by directly extending RunBase or by extending a class that extends RunBase.

For more: RunBase

Some of the features implemented in the RunBase framework are the following:

• Run: The main flow of the operation
• Dialog: Prompting the user for input and storing that input
• Batch execution: Schedule the Job for later execution
• Query: Used to select data
• Progress bar: Shows the progress of a task
• Pack/unpack with versioning: Remember variable values until the next time
the task is executed
Pack and Unpack method:

This method is a standard method inherited from RunBase. It is used to save
the values that the user selects and store them until the next time the user executes
the class.

public container pack()
    return [#CurrentVersion,#CurrentList];// + [super()];

And under unpack:

public boolean unpack(container packedClass)
    container       _base;
    boolean         _ret;
    Integer         _version    = conpeek(packedClass,1);

    switch (_version)
        case #CurrentVersion:
            [_version, #CurrentList, _base] = packedClass;
            //_ret = super(_base);

            _ret = false;
    return _ret;

And your class declaration looks like:

class ItemCreationApprove extends runbase
    Dialogfield fieldapprover;
    approvedby  approver;

Other framework in Microsoft dynamics AX:

Ø  Runbase Framework
Ø  Batch Framework
Ø  Dialog Framework
Ø  Operation Progress Framework 
Ø  NumberSequence Framework
Ø  SysLastValue Framework
Ø  AIF-Application Integration Framework
Ø  Wizard Framework
Ø  Infolog Framework
Ø  Unit Test Framework

No comments

Powered by Blogger.