SysOperation framework - Scenario 1: Creating a simple batch

Rumman Ansari   Software Engineer   2024-07-01 02:59:22   108  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

Table of Content:

To Create a simple batch we need Controller class, Service class and Menu Item to run it

Service Class

Learn more about Service Class.

class TestServiceClass extends SysOperationServiceBase
{
    public void processOperation()
    {
        // business process logic that need to be scheduled on batch
        info ("Running Batch Operation");
    }

}

Controller Class

Learn more about Controller Class.

class TestControllerClass extends SysOperationServiceController
{
    public void new()
    {
        super();
        this.parmClassName(classStr(TestServiceClass));
        this.parmMethodName(methodStr(TestServiceClass, processOperation));
        this.parmExecutionMode(SysOperationExecutionMode::synchronous);
        this.parmShowDialog(true);
        this.parmDialogCaption("Batch Dialog Title ");
       
    }

    public ClassDescription caption()
    {
        return "Batch Task Description";
    }

    public static void main(Args args)
    {
        TestControllerClass controller;
        controller = new TestControllerClass();
        controller.startOperation();
    }

}

Menu Item


Name: TestSysOperationBatchMenu
Type: Action menu item
Object type: Class
Object: TestControllerClass

Then add created menu item to some Menu like Accounts payable

MCQ Available

There are 1 MCQs available for this topic.

1 MCQ