0

我有一个需要更新自定义实体的工作流程(比如自定义实体),但它将使用插件更新需要传递的记录(即该记录的 GUID)。此插件触发某些事件需要该记录的 GUID,需要将此 GUID 传递给系统工作流。我不知道如何将参数传递给系统工作流。

                There Is Some Boundation That Is Why i can not directly trigger that workflow on that event on which PlugIn fires..

任何形式的帮助将不胜感激。

谢谢, 阿尼什

4

1 回答 1

2

I'll be honest, I only slightly understand your question.

I believe you are asking: "How can I start a workflow programatically? For example in a plugin?".

In which case you do it like this:

ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
{
    WorkflowId = workflowId, //Guid of the workflow you want to start
    EntityId = recordId //Guid of your record
};

ExecuteWorkflowResponse response = (ExecuteWorkflowResponse)serviceProxy.Execute(request);

The workflow must be set to "Run On Demand".

Full MSDN article.

于 2012-09-17T16:22:49.477 回答