< Summary

Information
Class: Elsa.Extensions.ExpressionExecutionContextExtensions
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Extensions/ExpressionExecutionContextExtensions.cs
Line coverage
80%
Covered lines: 156
Uncovered lines: 38
Coverable lines: 194
Total lines: 562
Line coverage: 80.4%
Branch coverage
81%
Covered branches: 88
Total branches: 108
Branch coverage: 81.4%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Extensions/ExpressionExecutionContextExtensions.cs

#LineLine coverage
 1using System.Collections;
 2using System.Text.Json;
 3using System.Text.Json.Serialization;
 4using Elsa.Common;
 5using Elsa.Expressions.Helpers;
 6using Elsa.Expressions.Models;
 7using Elsa.Workflows;
 8using Elsa.Workflows.Activities;
 9using Elsa.Workflows.Memory;
 10using Elsa.Workflows.Models;
 11using Elsa.Workflows.Options;
 12using Humanizer;
 13using Microsoft.Extensions.Options;
 14
 15// ReSharper disable once CheckNamespace
 16namespace Elsa.Extensions;
 17
 18/// <summary>
 19/// Provides extensions on <see cref="ExpressionExecutionContext"/>
 20/// </summary>
 21public static class ExpressionExecutionContextExtensions
 22{
 23    /// <summary>
 24    /// The key used to store the <see cref="WorkflowExecutionContext"/> in the <see cref="ExpressionExecutionContext.Tr
 25    /// </summary>
 526    public static readonly object WorkflowExecutionContextKey = new();
 27
 28    /// <summary>
 29    /// The key used to store the <see cref="ActivityExecutionContext"/> in the <see cref="ExpressionExecutionContext.Tr
 30    /// </summary>
 531    public static readonly object ActivityExecutionContextKey = new();
 32
 33    /// <summary>
 34    /// The key used to store the input in the <see cref="ExpressionExecutionContext.TransientProperties"/> dictionary.
 35    /// </summary>
 536    public static readonly object InputKey = new();
 37
 38    /// <summary>
 39    /// The key used to store the workflow in the <see cref="ExpressionExecutionContext.TransientProperties"/> dictionar
 40    /// </summary>
 541    public static readonly object WorkflowKey = new();
 42
 43    /// <summary>
 44    /// The key used to store the activity in the <see cref="ExpressionExecutionContext.TransientProperties"/> dictionar
 45    /// </summary>
 546    public static readonly object ActivityKey = new();
 47
 48    /// <summary>
 49    /// Creates a dictionary for the specified <see cref="WorkflowExecutionContext"/> and <see cref="ActivityExecutionCo
 50    /// </summary>
 51    public static IDictionary<object, object> CreateActivityExecutionContextPropertiesFrom(WorkflowExecutionContext work
 354452        new Dictionary<object, object>
 354453        {
 354454            [WorkflowExecutionContextKey] = workflowExecutionContext,
 354455            [InputKey] = input,
 354456            [WorkflowKey] = workflowExecutionContext.Workflow,
 354457        };
 58
 59    /// <summary>
 60    /// Creates a dictionary for the specified <see cref="WorkflowExecutionContext"/> and <see cref="ActivityExecutionCo
 61    /// </summary>
 62    public static IDictionary<object, object> CreateTriggerIndexingPropertiesFrom(Workflow workflow, IDictionary<string,
 6163        new Dictionary<object, object>
 6164        {
 6165            [WorkflowKey] = workflow,
 6166            [InputKey] = input
 6167        };
 68
 69    /// <param name="context">The context to start searching from.</param>
 70    extension(ExpressionExecutionContext context)
 71    {
 72        /// <summary>
 73        /// Returns the <see cref="Workflow"/> of the specified <see cref="ExpressionExecutionContext"/>
 74        /// </summary>
 6775        public bool TryGetWorkflowExecutionContext(out WorkflowExecutionContext workflowExecutionContext) => context.Tra
 76
 77        /// <summary>
 78        /// Returns the <see cref="WorkflowExecutionContext"/> of the specified <see cref="ExpressionExecutionContext"/>
 79        /// </summary>
 4880        public WorkflowExecutionContext GetWorkflowExecutionContext() => (WorkflowExecutionContext)context.TransientProp
 81
 82        /// <summary>
 83        /// Returns the <see cref="ActivityExecutionContext"/> of the specified <see cref="ExpressionExecutionContext"/>
 84        /// </summary>
 181885        public ActivityExecutionContext GetActivityExecutionContext() => (ActivityExecutionContext)context.TransientProp
 86
 87        /// <summary>
 88        /// Returns the <see cref="ActivityExecutionContext"/> of the specified <see cref="ExpressionExecutionContext"/>
 89        /// </summary>
 36590        public bool TryGetActivityExecutionContext(out ActivityExecutionContext activityExecutionContext) => context.Tra
 91
 92        /// <summary>
 93        /// Returns the <see cref="Activity"/> of the specified <see cref="ExpressionExecutionContext"/>
 94        /// </summary>
 095        public IActivity GetActivity() => (IActivity)context.TransientProperties[ActivityKey];
 96
 97        /// <summary>
 98        /// Returns the value of the specified input.
 99        /// </summary>
 334100        public T? Get<T>(Input<T>? input) => input != null ? context.GetBlock(input.MemoryBlockReference).Value.ConvertT
 101
 102        /// <summary>
 103        /// Returns the value of the specified output.
 104        /// </summary>
 0105        public T? Get<T>(Output output) => context.GetBlock(output.MemoryBlockReference).Value.ConvertTo<T>();
 106
 107        /// <summary>
 108        /// Returns the value of the specified output.
 109        /// </summary>
 0110        public object? Get(Output output) => context.GetBlock(output.MemoryBlockReference).Value;
 111
 112        /// <summary>
 113        /// Returns the value of the variable with the specified name.
 114        /// </summary>
 115        public T? GetVariable<T>(string name)
 116        {
 71117            var block = context.GetVariableBlock(name);
 71118            return (T?)block?.Value;
 119        }
 120
 121        /// <summary>
 122        /// Returns the variable with the specified name.
 123        /// </summary>
 124        public Variable? GetVariable(string name, bool localScopeOnly = false)
 125        {
 114126            var block = context.GetVariableBlock(name, localScopeOnly);
 114127            return block?.Metadata is VariableBlockMetadata metadata ? metadata.Variable : null;
 128        }
 129
 130        private MemoryBlock? GetVariableBlock(string name, bool localScopeOnly = false)
 131        {
 1081132            foreach (var block in context.Memory.Blocks.Where(b => b.Value.Metadata is VariableBlockMetadata))
 133            {
 148134                var metadata = block.Value.Metadata as VariableBlockMetadata;
 148135                if (metadata!.Variable.Name == name)
 86136                    return block.Value;
 137            }
 138
 250139            return localScopeOnly ? null : context.ParentContext?.GetVariableBlock(name);
 140        }
 141
 142        /// <summary>
 143        /// Creates a named variable in the context.
 144        /// </summary>
 145        public Variable CreateVariable<T>(string name, T? value, Type? storageDriverType = null, Action<MemoryBlock>? co
 146        {
 94147            var existingVariable = context.GetVariable(name, localScopeOnly: true);
 148
 94149            if (existingVariable != null)
 1150                throw new($"Variable {name} already exists in the context.");
 151
 93152            var variable = new Variable(name, value)
 93153            {
 93154                StorageDriverType = storageDriverType ?? typeof(WorkflowInstanceStorageDriver)
 93155            };
 156
 93157            var parsedValue = variable.ParseValue(value);
 158
 159            // Find the first parent context that has a variable container.
 160            // If not found, use the current context.
 93161            var variableContainerContext = context.GetVariableContainerContext();
 162
 93163            variableContainerContext.Set(variable, parsedValue, configure);
 93164            return variable;
 165        }
 166
 167        /// <summary>
 168        /// Returns the first parent context that contains a variable container.
 169        /// </summary>
 170        public ExpressionExecutionContext GetVariableContainerContext()
 171        {
 93172            return context.FindParent(x =>
 93173            {
 193174                var activityExecutionContext = x.TryGetActivityExecutionContext(out var activityExecutionContextResult) 
 193175                return activityExecutionContext?.Activity is IVariableContainer;
 93176            }) ?? context;
 177        }
 178
 179        /// <summary>
 180        /// Sets the value of a named variable in the context.
 181        /// </summary>
 182        public Variable SetVariable<T>(string name, T? value, Action<MemoryBlock>? configure = null)
 183        {
 15184            var variable = context.GetVariable(name);
 185
 15186            if (variable == null)
 4187                return CreateVariable(context, name, value, configure: configure);
 188
 189            // Get the context where the variable is defined.
 11190            var contextWithVariable = context.FindContextContainingBlock(variable.Id) ?? context;
 191
 192            // Set the value on the variable.
 11193            var parsedValue = variable.ParseValue(value);
 11194            variable.Set(contextWithVariable, parsedValue, configure);
 195
 196            // Return the variable.
 11197            return variable;
 198        }
 199
 200        /// <summary>
 201        /// Sets the output to the specified value.
 202        /// </summary>
 203        public void Set(Output? output, object? value, Action<MemoryBlock>? configure = null)
 204        {
 1451205            if (output != null)
 206            {
 207                // Set the value on the output.
 31208                var outputMemoryBlockReference = output.MemoryBlockReference();
 31209                var parsedValue = output.ParseValue(value);
 31210                context.Set(outputMemoryBlockReference, parsedValue, configure);
 211
 212                // If the referenced output is a workflow output definition, set the value on the workflow execution con
 31213                var workflowExecutionContext = context.GetWorkflowExecutionContext();
 31214                var workflow = workflowExecutionContext.Workflow;
 33215                var workflowOutputDefinition = workflow.Outputs.FirstOrDefault(x => x.Name == outputMemoryBlockReference
 216
 31217                if (workflowOutputDefinition != null)
 0218                    workflowExecutionContext.Output[workflowOutputDefinition.Name] = value!;
 219            }
 1451220        }
 221
 222        /// <summary>
 223        /// Returns a dictionary of memory block keys and values across scopes.
 224        /// </summary>
 225        public IDictionary<string, object> ReadAndFlattenMemoryBlocks() =>
 5226            context.FlattenMemoryBlocks().ToDictionary(x => x.Key, x => x.Value.Value!);
 227
 228        /// <summary>
 229        /// Returns a dictionary of memory blocks across scopes.
 230        /// </summary>
 231        public IDictionary<string, MemoryBlock> FlattenMemoryBlocks()
 232        {
 1233            var currentContext = context;
 1234            var memoryBlocks = new Dictionary<string, MemoryBlock>();
 235
 3236            while (currentContext != null)
 237            {
 2238                var register = currentContext.Memory;
 239
 8240                foreach (var entry in register.Blocks)
 2241                    memoryBlocks.TryAdd(entry.Key, entry.Value);
 242
 2243                currentContext = currentContext.ParentContext;
 244            }
 245
 1246            return memoryBlocks;
 247        }
 248
 249        /// <summary>
 250        /// Returns a the first context that contains a memory block with the specified ID.
 251        /// </summary>
 252        public ExpressionExecutionContext? FindContextContainingBlock(string blockId)
 253        {
 774254            return context.FindParent(x => x.Memory.HasBlock(blockId));
 255        }
 256
 257        /// <summary>
 258        /// Returns the first context in the hierarchy that matches the specified predicate.
 259        /// </summary>
 260        /// <param name="predicate">The predicate to match.</param>
 261        /// <returns>The first context that matches the predicate or <c>null</c> if no match was found.</returns>
 262        public ExpressionExecutionContext? FindParent(Func<ExpressionExecutionContext, bool> predicate)
 263        {
 324264            var currentContext = context;
 265
 856266            while (currentContext != null)
 267            {
 736268                if (predicate(currentContext))
 204269                    return currentContext;
 270
 532271                currentContext = currentContext.ParentContext;
 272            }
 273
 120274            return null;
 275        }
 276
 277        /// <summary>
 278        /// Returns the value of the specified variable.
 279        /// </summary>
 280        public object GetVariableInScope(string variableName)
 281        {
 2282            var variable = context.GetVariable(variableName);
 2283            var value = variable?.Get(context);
 284
 2285            return ConvertIEnumerableToArray(value);
 286        }
 287
 288        /// <summary>
 289        /// Gets all variables names in scope.
 290        /// </summary>
 291        public IEnumerable<string> GetVariableNamesInScope() =>
 34292            EnumerateVariablesInScope(context)
 36293                .Select(x => x.Name)
 36294                .Where(x => !string.IsNullOrWhiteSpace(x))
 34295                .Distinct();
 296
 297        /// <summary>
 298        /// Gets all variables in scope.
 299        /// </summary>
 300        public IEnumerable<Variable> GetVariablesInScope() =>
 0301            EnumerateVariablesInScope(context)
 0302                .Where(x => !string.IsNullOrWhiteSpace(x.Name))
 0303                .DistinctBy(x => x.Name);
 304
 305        /// <summary>
 306        /// Sets the value of a named variable in the context.
 307        /// </summary>
 308        public void SetVariableInScope(string variableName, object? value)
 309        {
 2310            var q = from v in EnumerateVariablesInScope(context)
 2311                where v.Name == variableName
 2312                where v.TryGet(context, out _)
 2313                select v;
 314
 2315            var variable = q.FirstOrDefault();
 316
 2317            if (variable != null)
 2318                variable.Set(context, value);
 319
 2320            if (variable == null)
 0321                CreateVariable(context, variableName, value);
 2322        }
 323
 324        /// <summary>
 325        /// Enumerates all variables in scope.
 326        /// </summary>
 327        public IEnumerable<Variable> EnumerateVariablesInScope()
 328        {
 43329            var currentScope = context;
 330
 141331            while (currentScope != null)
 332            {
 106333                if (!currentScope.TryGetActivityExecutionContext(out var activityExecutionContext))
 334                {
 37335                    var variables = currentScope.Memory.Blocks.Values
 336                        .Where(x => x.Metadata is VariableBlockMetadata)
 337                        .Select(x => x.Metadata as VariableBlockMetadata)
 338                        .Select(x => x!.Variable)
 37339                        .ToList();
 340
 100341                    foreach (var variable in variables)
 14342                        yield return variable;
 343                }
 344                else
 345                {
 69346                    var variables = activityExecutionContext.Variables;
 347
 180348                    foreach (var variable in variables)
 24349                        yield return variable;
 350                }
 351
 98352                currentScope = currentScope.ParentContext;
 353            }
 354
 35355            if (context.TryGetWorkflowExecutionContext(out var workflowExecutionContext))
 356            {
 19357                if (workflowExecutionContext.Workflow.ResultVariable != null)
 12358                    yield return workflowExecutionContext.Workflow.ResultVariable;
 359            }
 35360        }
 361
 362        /// <summary>
 363        /// Returns the input value associated with the specified <see cref="InputDefinition"/> in the given <see cref="
 364        /// </summary>
 365        /// <typeparam name="T">The type of the input value.</typeparam>
 366        /// <param name="inputDefinition">The <see cref="InputDefinition"/> specifying the input to retrieve.</param>
 367        /// <returns>The input value associated with the specified <see cref="InputDefinition"/> in the <see cref="Expre
 368        public T? GetInput<T>(InputDefinition inputDefinition)
 369        {
 15370            return context.GetInput<T>(inputDefinition.Name);
 371        }
 372    }
 373
 374    private static JsonSerializerOptions? _serializerOptions;
 375
 376    private static JsonSerializerOptions GetSerializerOptions(ExpressionExecutionContext context)
 377    {
 15378        if (_serializerOptions != null)
 12379            return _serializerOptions;
 380
 3381        var serializerOptions = context.GetRequiredService<IJsonSerializer>().GetOptions().Clone();
 3382        serializerOptions.ReferenceHandler = ReferenceHandler.Preserve;
 3383        _serializerOptions = serializerOptions;
 3384        return serializerOptions;
 385    }
 386
 387    /// <param name="context"></param>
 388    extension(ExpressionExecutionContext context)
 389    {
 390        /// <summary>
 391        /// Returns the value of the specified input.
 392        /// </summary>
 393        /// <param name="name">The name of the input.</param>
 394        /// <typeparam name="T">The type of the input.</typeparam>
 395        /// <returns>The value of the specified input.</returns>
 396        public T? GetInput<T>(string name)
 397        {
 15398            var value = context.GetInput(name);
 15399            var serializerOptions = GetSerializerOptions(context);
 15400            var converterOptions = new ObjectConverterOptions(serializerOptions);
 15401            return value.ConvertTo<T>(converterOptions);
 402        }
 403
 404        /// <summary>
 405        /// Returns the value of the specified input.
 406        /// </summary>
 407        /// <param name="name">The name of the input.</param>
 408        /// <returns>The value of the specified input.</returns>
 409        public object? GetInput(string name)
 410        {
 15411            if (context.IsContainedWithinCompositeActivity())
 412            {
 413                // If there's a variable in the current scope with the specified name, return that.
 0414                var variable = context.GetVariable(name);
 415
 0416                if (variable != null)
 0417                    return variable.Get(context);
 418            }
 419
 420            // Otherwise, return the input.
 15421            var workflowExecutionContext = context.GetWorkflowExecutionContext();
 15422            var input = workflowExecutionContext.Input;
 15423            return input.TryGetValue(name, out var value) ? value : null;
 424        }
 425
 426        /// <summary>
 427        /// Returns the value of the specified output.
 428        /// </summary>
 429        /// <param name="activityIdOrName">The ID or name of the activity.</param>
 430        /// <param name="outputName">The name of the output.</param>
 431        /// <returns>The value of the specified output.</returns>
 432        /// <exception cref="InvalidOperationException">Thrown when the activity is not found.</exception>
 433        public object? GetOutput(string activityIdOrName, string? outputName)
 434        {
 0435            var workflowExecutionContext = context.GetWorkflowExecutionContext();
 0436            var activityExecutionContext = context.GetActivityExecutionContext();
 0437            var activity = activityExecutionContext.FindActivityByIdOrName(activityIdOrName);
 438
 0439            if (activity == null)
 0440                throw new InvalidOperationException("Activity not found.");
 441
 0442            var outputRegister = workflowExecutionContext.GetActivityOutputRegister();
 0443            var outputRecordCandidates = outputRegister.FindMany(activity.Id, outputName);
 0444            var containerIds = activityExecutionContext.GetAncestors().Select(x => x.Id).ToList();
 0445            var filteredOutputRecordCandidates = outputRecordCandidates.Where(x => containerIds.Contains(x.ContainerId))
 0446            var outputRecord = filteredOutputRecordCandidates.FirstOrDefault();
 0447            return outputRecord?.Value;
 448        }
 449
 450        /// <summary>
 451        /// Returns all activity outputs.
 452        /// </summary>
 453        public async IAsyncEnumerable<ActivityOutputs> GetActivityOutputs()
 454        {
 17455            if (!context.TryGetActivityExecutionContext(out var activityExecutionContext))
 8456                yield break;
 457
 9458            var useActivityName = activityExecutionContext.WorkflowExecutionContext.Workflow.CreatedWithModernTooling();
 9459            var activitiesWithOutputs = activityExecutionContext.GetActivitiesWithOutputs();
 460
 9461            if (useActivityName)
 462                activitiesWithOutputs = activitiesWithOutputs.Where(x => !string.IsNullOrWhiteSpace(x.Activity.Name));
 463
 28464            await foreach (var activityWithOutput in activitiesWithOutputs)
 465            {
 5466                var activity = activityWithOutput.Activity;
 5467                var activityDescriptor = activityWithOutput.ActivityDescriptor;
 5468                var activityIdentifier = useActivityName ? activity.Name : activity.Id;
 5469                var activityIdPascalName = activityIdentifier.Pascalize();
 470
 44471                foreach (var output in activityDescriptor.Outputs)
 472                {
 17473                    var outputPascalName = output.Name.Pascalize();
 17474                    yield return new(activity.Id, activityIdPascalName, [
 17475                        outputPascalName
 17476                    ]);
 477                }
 5478            }
 17479        }
 480
 481        /// <summary>
 482        /// Returns a value indicating whether the current activity is inside a composite activity.
 483        /// </summary>
 484        public bool IsContainedWithinCompositeActivity()
 485        {
 32486            if (!context.TryGetActivityExecutionContext(out var activityExecutionContext))
 8487                return false;
 488
 489            // If the first workflow definition in the ancestor hierarchy and that workflow definition has a parent, the
 62490            var firstWorkflowContext = activityExecutionContext.GetAncestors().FirstOrDefault(x => x.Activity is Workflo
 491
 24492            return firstWorkflowContext?.ParentActivityExecutionContext != null;
 493        }
 494
 495        /// <summary>
 496        /// Returns the result of the activity that was executed before the current activity.
 497        /// </summary>
 498        public object? GetLastResult()
 499        {
 0500            var workflowExecutionContext = context.GetWorkflowExecutionContext();
 0501            return workflowExecutionContext.GetLastActivityResult();
 502        }
 503
 504        /// <summary>
 505        /// Returns all activity inputs.
 506        /// </summary>
 507        public IEnumerable<WorkflowInput> GetWorkflowInputs()
 508        {
 509            // Check if we are evaluating an expression during workflow execution.
 16510            if (context.TryGetWorkflowExecutionContext(out var workflowExecutionContext))
 511            {
 8512                var input = workflowExecutionContext.Input;
 513
 24514                foreach (var inputEntry in input)
 515                {
 4516                    var inputPascalName = inputEntry.Key.Pascalize();
 4517                    var inputValue = inputEntry.Value;
 4518                    yield return new(inputPascalName, inputValue);
 519                }
 520            }
 521            else
 522            {
 523                // We end up here when we are evaluating an expression during trigger indexing.
 524                // The scenario being that a workflow definition might have variables declared, that we want to be able 
 16525                foreach (var block in context.Memory.Blocks.Values)
 526                {
 0527                    if (block.Metadata is not VariableBlockMetadata variableBlockMetadata)
 528                        continue;
 529
 0530                    var variable = variableBlockMetadata.Variable;
 0531                    var variablePascalName = variable.Name.Pascalize();
 0532                    yield return new(variablePascalName, block.Value);
 533                }
 534            }
 16535        }
 536    }
 537
 538    private static object ConvertIEnumerableToArray(object? obj)
 539    {
 2540        if (obj == null)
 0541            return null!;
 542
 543        // If it's not an IEnumerable or it's a string or dictionary, return the original object.
 2544        if (obj is not IEnumerable enumerable || obj is string || obj is IDictionary)
 2545            return obj;
 546
 547        // If this is an async enumerable, return as-is.
 0548        if (obj.GetType().Name == "AsyncIListEnumerableAdapter`1")
 0549            return obj;
 550
 551        // Use LINQ to convert the IEnumerable to an array.
 0552        var elementType = obj.GetType().GetGenericArguments().FirstOrDefault();
 553
 0554        if (elementType == null)
 0555            return obj;
 556
 0557        var toArrayMethod = typeof(Enumerable).GetMethod("ToArray")!.MakeGenericMethod(elementType);
 0558        return toArrayMethod.Invoke(null, [
 0559            enumerable
 0560        ])!;
 561    }
 562}

Methods/Properties

.cctor()
CreateActivityExecutionContextPropertiesFrom(Elsa.Workflows.WorkflowExecutionContext,System.Collections.Generic.IDictionary`2<System.String,System.Object>)
CreateTriggerIndexingPropertiesFrom(Elsa.Workflows.Activities.Workflow,System.Collections.Generic.IDictionary`2<System.String,System.Object>)
TryGetWorkflowExecutionContext(Elsa.Expressions.Models.ExpressionExecutionContext,Elsa.Workflows.WorkflowExecutionContext&)
GetWorkflowExecutionContext(Elsa.Expressions.Models.ExpressionExecutionContext)
GetActivityExecutionContext(Elsa.Expressions.Models.ExpressionExecutionContext)
TryGetActivityExecutionContext(Elsa.Expressions.Models.ExpressionExecutionContext,Elsa.Workflows.ActivityExecutionContext&)
GetActivity(Elsa.Expressions.Models.ExpressionExecutionContext)
Get(Elsa.Expressions.Models.ExpressionExecutionContext,Elsa.Workflows.Models.Input`1<T>)
Get(Elsa.Expressions.Models.ExpressionExecutionContext,Elsa.Workflows.Models.Output)
Get(Elsa.Expressions.Models.ExpressionExecutionContext,Elsa.Workflows.Models.Output)
GetVariable(Elsa.Expressions.Models.ExpressionExecutionContext,System.String)
GetVariable(Elsa.Expressions.Models.ExpressionExecutionContext,System.String,System.Boolean)
GetVariableBlock(Elsa.Expressions.Models.ExpressionExecutionContext,System.String,System.Boolean)
CreateVariable(Elsa.Expressions.Models.ExpressionExecutionContext,System.String,T,System.Type,System.Action`1<Elsa.Expressions.Models.MemoryBlock>)
GetVariableContainerContext(Elsa.Expressions.Models.ExpressionExecutionContext)
SetVariable(Elsa.Expressions.Models.ExpressionExecutionContext,System.String,T,System.Action`1<Elsa.Expressions.Models.MemoryBlock>)
Set(Elsa.Expressions.Models.ExpressionExecutionContext,Elsa.Workflows.Models.Output,System.Object,System.Action`1<Elsa.Expressions.Models.MemoryBlock>)
ReadAndFlattenMemoryBlocks(Elsa.Expressions.Models.ExpressionExecutionContext)
FlattenMemoryBlocks(Elsa.Expressions.Models.ExpressionExecutionContext)
FindContextContainingBlock(Elsa.Expressions.Models.ExpressionExecutionContext,System.String)
FindParent(Elsa.Expressions.Models.ExpressionExecutionContext,System.Func`2<Elsa.Expressions.Models.ExpressionExecutionContext,System.Boolean>)
GetVariableInScope(Elsa.Expressions.Models.ExpressionExecutionContext,System.String)
GetVariableNamesInScope(Elsa.Expressions.Models.ExpressionExecutionContext)
GetVariablesInScope(Elsa.Expressions.Models.ExpressionExecutionContext)
SetVariableInScope(Elsa.Expressions.Models.ExpressionExecutionContext,System.String,System.Object)
EnumerateVariablesInScope()
GetInput(Elsa.Expressions.Models.ExpressionExecutionContext,Elsa.Workflows.Models.InputDefinition)
GetSerializerOptions(Elsa.Expressions.Models.ExpressionExecutionContext)
GetInput(Elsa.Expressions.Models.ExpressionExecutionContext,System.String)
GetInput(Elsa.Expressions.Models.ExpressionExecutionContext,System.String)
GetOutput(Elsa.Expressions.Models.ExpressionExecutionContext,System.String,System.String)
GetActivityOutputs()
IsContainedWithinCompositeActivity(Elsa.Expressions.Models.ExpressionExecutionContext)
GetLastResult(Elsa.Expressions.Models.ExpressionExecutionContext)
GetWorkflowInputs()
ConvertIEnumerableToArray(System.Object)