Edit

WorkflowContext class

Namespace: Microsoft.Azure.Workflows.Sdk

WorkflowContext is an abstract runtime context passed to custom code actions. It provides access to trigger results and previously executed action results while workflow code is running.

Methods

GetActionResults

Gets the WorkflowOperationResult for a named action that has already executed in the current workflow run.

public abstract Task<WorkflowOperationResult> GetActionResults(string actionName)
Name Description Type Required
actionName The name of the action to retrieve results for. string Yes
public async Task<string> RunAsync(WorkflowContext context)
{
    WorkflowOperationResult composeResult = await context.GetActionResults("ComposeStep");
    return "Processed";
}

GetTriggerResults

Gets the WorkflowOperationResult for the trigger that started the current workflow run.

public abstract Task<WorkflowOperationResult> GetTriggerResults()

This method has no parameters.

public async Task<string> RunAsync(WorkflowContext context)
{
    WorkflowOperationResult triggerResult = await context.GetTriggerResults();
    return "Processed";
}