SP2013工作流程中的外部变量

问题描述:

是否可以通过c#代码(控制台应用程序)设置sp2013工作流的外部变量?

Is there a way to set external variable of a sp2013 workflow from c# code (console application)?

我找到了这个例子:

https://code.msdn.microsoft.com/windowsdesktop/Using-External-Variables-82fd6dce/sourcecode?fileId=94073&pathId=757844397

https://code.msdn.microsoft.com/windowsdesktop/Using-External-Variables-82fd6dce/sourcecode?fileId=94073&pathId=757844397

但是,它设置了变量,然后发布了wf.这不是我想要的.

but, it set variables and then publishes wf. This is not what I want.

比方说,我已经发布了我的工作流程,并且该工作流程正在列表项上运行.有没有办法我可以通过另一个控制台应用程序在该工作流中设置外部变量?

Let's say that I've already published my workflow and it is running on a list item. Is there a way I could somehow set external variable in that workflow from another console application??

您可以创建自定义代码活动,以便从服务中获取价值.

或其他方法供您参考.

在工作流程中为您的工作流程创建配置列表,从配置列表中调用REST api来检索实际值.

在控制台应用程序中,更新配置列表值通过CSOM.

最好的问候,

Lee