在Acumatica中安排一些任务 [英] Schedule some task in Acumatica

查看:79
本文介绍了在Acumatica中安排一些任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下任务:以一定间隔执行一些事件。在T200手册中,我发现可以通过处理页面来完成。为此,我需要添加带有后缀过程的图形。但是,令我困惑的是如何使按钮显示为Process,Process All,Schedule?我还有一个问题是如何在Acumatica中按时间表执行某些操作?推荐的方法是什么?

I have following task: execute some event with some interval. In T200 manual I found that it can be done via Processing pages. For this I need to add graph with suffix process. But what puzzles me is how to make to appear buttons Process, Process All, Schedules? Another question which I have is how to execute some action by some schedule in Acumatica? What is recommended approach?

推荐答案

区别处理图形与Acumatica中其他类型页面的关键之处在于它们具有数据类型 PXProcessing<> PXProcessingJoin<> 的视图-这些以及图形中定义的处理例程,将使系统在相应屏幕上创建 Process Process All Schedule 按钮。通常,您的图形如下所示:

The key thing that distinguishes processing graphs from other kinds of pages in Acumatica is that they have a data view of type PXProcessing<> or PXProcessingJoin<> - these, together with a processing routine defined in the graph, will make the system create the Process, Process All and Schedule buttons on the corresponding screen. Generally your graph will look like this:

public class YourProcessingGraph : PXGraph<YourProcessingGraph>
{
    //Data view that provides a list of items to process
    public PXProcessing<ARInvoice,
        Where<ARInvoice.released, Equal<boolFalse>>> DocumentsToProcess;

    public YourProcessingGraph()
    {
        DocumentsToProcess.SetProcessDelegate(DoActualProcessing);

        //You can also change button captions
        DocumentsToProcess.SetProcessCaption("Do");
        DocumentsToProcess.SetProcessAllCaption("Do For All");
    }

    public static void DoActualProcessing(List<ARInvoice> itemsToProcess)
    {
        // Do something cool here
    }
}

您可以找到一个更好的示例,说明如何在您提到的T200培训中正确定义处理图以及Acumatica的源代码-例如 ARDocumentRelease 图。

You can find a better example of how to properly define a processing graph in the T200 training that you mention as well as in the source code of Acumatica - e.g. ARDocumentRelease graph.

Acumatica不依赖您定义的类的名称(无论是DAC还是图)确定什么是什么,因此 Process 后缀(以及 Entry Maint )只是样式/约定的问题。 (一个重要的例外是带有 Cst 前缀/后缀的自定义对象,但是情况有些不同。)

Acumatica doesn't rely on the names of the classes that you define (be it DACs or graphs) when determining what is what, so the Process suffix (as well as Entry and Maint) is just a matter of style/convention. (One important exception is the customization objects that come with Cst prefix/suffix, but these are a bit different story.)

对于定期执行某些操作,您可以使用自动化时间表(SM205020)-在任何处理屏幕上单击 Schedule 按钮时打开的屏幕。您可以在此处创建计划,以在特定处理屏幕上启动处理。可以对时间表进行微调,以在执行频率方面与您的目标匹配,甚至可以进行一些其他过滤。

As for executing some action periodically, for this you use the Automation Schedules (SM205020) - that's the screen opened when you click the Schedule button on any processing screen. There you can create a schedule that would launch processing on a particular processing screen. The schedules can be fine tuned to match your goals in terms of frequency of execution and even allow for some additional filtering.

这篇关于在Acumatica中安排一些任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆