[英]Set InArgument when launching a workflow programmatically
Is there any way to set the value of a workflow's InArgument
parameter from another workflow when launching it programmatically ? 有什么方法可以通过编程方式从另一个工作流中设置工作流的
InArgument
参数的值吗?
Here's how I launch it: 这是我如何推出它:
var req = new ExecuteWorkflowRequest { WorkflowId = new Guid(WorkflowGuids.RenewalWorkflowId), EntityId = theContact.Id };
service.Execute(req);
I can catch the EntityId
value back in the other workflow in context.PrimaryEntityId
but I am at a loss as to how to populated the arguments and retrieve them on the other side. 我可以在
context.PrimaryEntityId
中的其他工作流中捕获EntityId
值,但我不知道如何填充参数并在另一侧检索它们。
Is this possible ? 这可能吗 ? Thanks.
谢谢。
InArgument
are defined at step level, not at workflow level. InArgument
在步骤级别定义,而不是在工作流级别定义。
When a workflow is executed (by a trigger, on-demand or by code) you have the record Id. 当执行工作流(通过触发器,按需或按代码)时,您具有记录Id。
You can create a custom workflow activity to fetch other data related (or not connected at all) with your record Id and make it as OutArgument
so will be available as input for the InArgument
you want to set. 您可以创建自定义工作流活动以使用您的记录ID获取与其相关(或根本不连接)的其他数据,并将其设置为
OutArgument
以便作为您要设置的InArgument
输入。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.