如何在所有页面上运行按需工作流 [英] How to run ondemand workflow over all pages

查看:115
本文介绍了如何在所有页面上运行按需工作流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在自定义实体上运行按需工作流,



让我说我有100万条记录,因此如何在这些记录上运行此工作流程。



据我所知,我们只能选择记录,然后从功能区单击运行工作流程并指定它。通过这种方式,我可以在一次尝试中最多获得一次记录,因此我只能选择一个页面记录,因此访问权限有限。 h2_lin>解决方案

您无法使用UI进行此操作。
最简单的方法是使用一个小的程序来选择所有记录并触发工作流执行。



您可以使用 ExecuteWorkflowRequest

  //创建ExecuteWorkflow请求。 
ExecuteWorkflowRequest请求=新的ExecuteWorkflowRequest()
{
WorkflowId =<在此处插入工作流ID,
EntityId =<在此处插入记录ID>
};

//执行工作流程。
var response =(ExecuteWorkflowResponse)_serviceProxy.Execute(request);


I have to run an ondemand workflow over my custom entity,

lets say i have 1 million records, so how can i run this work flow over these records.

since, as far as i know we can only select the record and from ribbon click run workflow and specify it. In this way for max in single try, i can only select one page records and hence limited access

any idea?

解决方案

You cannot do that with the UI. The simplest approach would be with a small program which selects all records and trigger the workflow execution.

You could use the ExecuteWorkflowRequestfor this task.

// Create an ExecuteWorkflow request.
ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
{
    WorkflowId = <insert workflow id here>,
    EntityId = <insert record id here>
};

// Execute the workflow.
var response = (ExecuteWorkflowResponse)_serviceProxy.Execute(request);

这篇关于如何在所有页面上运行按需工作流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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