美文网首页
AX2012 batch process using sysOp

AX2012 batch process using sysOp

作者: axxxxxxxx | 来源:发表于2017-12-30 10:49 被阅读0次

    Example : https://stoneridgesoftware.com/batch-processing-in-dynamics-ax-2012-using-sysoperation-framework/

    first , define a controller

    class ACT_ProcessMessageLogController extends SysOperationServiceController
    {
        #define.ToDate('toDate')
    }
    
    public static ACT_ProcessMessageLogController construct(SysOperationExecutionMode _mode = SysOperationExecutionMode::Synchronous)
    {
        ACT_ProcessMessageLogController    controller;
        ACT_ProcessMessageLogContract      contract;
        ;
    
        controller = new ACT_ProcessMessageLogController(classStr(ACT_ProcessMessageLogService),
                                                         methodStr(ACT_ProcessMessageLogService, processMessages),
                                                         _mode);
    
        controller.parmDialogCaption(literalStr("QC Scheduler Job"));
        contract = controller.getDataContractObject();
        contract.parmToDate(systemDateGet()+1);
    
        return controller;
    }
    
    public static void main(Args args)
    {
        ACT_ProcessMessageLogController controller = ACT_ProcessMessageLogController::construct();
        ;
    
        controller.startOperation();
    }
    

    second, defind a contract:

    [
        DataContractAttribute
    ]
    class ACT_ProcessMessageLogContract
    {
        TransDate   toDate;
    }
    
    [DataMemberAttribute,
     SysOperationLabelAttribute("@SYS35904")]
    public TransDate parmToDate(TransDate _toDate = toDate)
    {
        toDate = _toDate;
    
        return toDate;
    }
    

    third ,denfie service and entry point


    image.png

    相关文章

      网友评论

          本文标题:AX2012 batch process using sysOp

          本文链接:https://www.haomeiwen.com/subject/lhyggxtx.html