Reputation: 5190
Is there any way to write an expression that gets the current context/workflowid? I'd like to do something like
Me.WorkflowId.ToString()
and pass that as a parameter to an action, but can't find the object reference.
Upvotes: 1
Views: 113
Reputation: 404
Not that I know of. There are no useful wf instance info items available statically in Expressions.
You can of course create a code activity like:
public sealed class GetWorkflowInstanceId : CodeActivity<Guid>{
protected override Guid Execute(CodeActivityContext context) {
return context.WorkflowInstanceId;
}
}
Upvotes: 1