XeroxDucati
XeroxDucati

Reputation: 5190

Expression for current context/workflowid

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

Answers (1)

Peter Goodman
Peter Goodman

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

Related Questions