< 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: 160
Uncovered lines: 38
Coverable lines: 198
Total lines: 569
Line coverage: 80.8%
Branch coverage
80%
Covered branches: 90
Total branches: 112
Branch coverage: 80.3%
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 Humanizer;
 12
 13// ReSharper disable once CheckNamespace
 14namespace Elsa.Extensions;
 15
 16/// <summary>
 17/// Provides extensions on <see cref="ExpressionExecutionContext"/>
 18/// </summary>
 19public static class ExpressionExecutionContextExtensions
 20{
 21    /// <summary>
 22    /// The key used to store the <see cref="WorkflowExecutionContext"/> in the <see cref="ExpressionExecutionContext.Tr
 23    /// </summary>
 524    public static readonly object WorkflowExecutionContextKey = new();
 25
 26    /// <summary>
 27    /// The key used to store the <see cref="ActivityExecutionContext"/> in the <see cref="ExpressionExecutionContext.Tr
 28    /// </summary>
 529    public static readonly object ActivityExecutionContextKey = new();
 30
 31    /// <summary>
 32    /// The key used to store the input in the <see cref="ExpressionExecutionContext.TransientProperties"/> dictionary.
 33    /// </summary>
 534    public static readonly object InputKey = new();
 35
 36    /// <summary>
 37    /// The key used to store the workflow in the <see cref="ExpressionExecutionContext.TransientProperties"/> dictionar
 38    /// </summary>
 539    public static readonly object WorkflowKey = new();
 40
 41    /// <summary>
 42    /// The key used to store the activity in the <see cref="ExpressionExecutionContext.TransientProperties"/> dictionar
 43    /// </summary>
 544    public static readonly object ActivityKey = new();
 45
 46    /// <summary>
 47    /// Creates a dictionary for the specified <see cref="WorkflowExecutionContext"/> and <see cref="ActivityExecutionCo
 48    /// </summary>
 49    public static IDictionary<object, object> CreateActivityExecutionContextPropertiesFrom(WorkflowExecutionContext work
 387950        new Dictionary<object, object>
 387951        {
 387952            [WorkflowExecutionContextKey] = workflowExecutionContext,
 387953            [InputKey] = input,
 387954            [WorkflowKey] = workflowExecutionContext.Workflow,
 387955        };
 56
 57    /// <summary>
 58    /// Creates a dictionary for the specified <see cref="WorkflowExecutionContext"/> and <see cref="ActivityExecutionCo
 59    /// </summary>
 60    public static IDictionary<object, object> CreateTriggerIndexingPropertiesFrom(Workflow workflow, IDictionary<string,
 26561        new Dictionary<object, object>
 26562        {
 26563            [WorkflowKey] = workflow,
 26564            [InputKey] = input
 26565        };
 66
 67    /// <param name="context">The context to start searching from.</param>
 68    extension(ExpressionExecutionContext context)
 69    {
 70        /// <summary>
 71        /// Returns the <see cref="Workflow"/> of the specified <see cref="ExpressionExecutionContext"/>
 72        /// </summary>
 9173        public bool TryGetWorkflowExecutionContext(out WorkflowExecutionContext workflowExecutionContext) => context.Tra
 74
 75        /// <summary>
 76        /// Returns the <see cref="WorkflowExecutionContext"/> of the specified <see cref="ExpressionExecutionContext"/>
 77        /// </summary>
 78        public WorkflowExecutionContext GetWorkflowExecutionContext()
 79        {
 10280            return context.TransientProperties.TryGetValue(WorkflowExecutionContextKey, out var value)
 10281                ? (WorkflowExecutionContext)value
 10282                : throw new InvalidOperationException("WorkflowExecutionContext not found. This value exists only on act
 83        }
 84
 85        /// <summary>
 86        /// Returns the <see cref="ActivityExecutionContext"/> of the specified <see cref="ExpressionExecutionContext"/>
 87        /// </summary>
 88        public ActivityExecutionContext GetActivityExecutionContext()
 89        {
 212290            return context.TransientProperties.TryGetValue(ActivityExecutionContextKey, out var value)
 212291                ? (ActivityExecutionContext)value
 212292                : throw new InvalidOperationException("ActivityExecutionContext not found. This value exists only on act
 93        }
 94
 95        /// <summary>
 96        /// Returns the <see cref="ActivityExecutionContext"/> of the specified <see cref="ExpressionExecutionContext"/>
 97        /// </summary>
 40798        public bool TryGetActivityExecutionContext(out ActivityExecutionContext activityExecutionContext) => context.Tra
 99
 100        /// <summary>
 101        /// Returns the <see cref="Activity"/> of the specified <see cref="ExpressionExecutionContext"/>
 102        /// </summary>
 0103        public IActivity GetActivity() => (IActivity)context.TransientProperties[ActivityKey];
 104
 105        /// <summary>
 106        /// Returns the value of the specified input.
 107        /// </summary>
 1498108        public T? Get<T>(Input<T>? input) => input != null ? context.GetBlock(input.MemoryBlockReference).Value.ConvertT
 109
 110        /// <summary>
 111        /// Returns the value of the specified output.
 112        /// </summary>
 0113        public T? Get<T>(Output output) => context.GetBlock(output.MemoryBlockReference).Value.ConvertTo<T>();
 114
 115        /// <summary>
 116        /// Returns the value of the specified output.
 117        /// </summary>
 0118        public object? Get(Output output) => context.GetBlock(output.MemoryBlockReference).Value;
 119
 120        /// <summary>
 121        /// Returns the value of the variable with the specified name.
 122        /// </summary>
 123        public T? GetVariable<T>(string name)
 124        {
 71125            var block = context.GetVariableBlock(name);
 71126            return (T?)block?.Value;
 127        }
 128
 129        /// <summary>
 130        /// Returns the variable with the specified name.
 131        /// </summary>
 132        public Variable? GetVariable(string name, bool localScopeOnly = false)
 133        {
 114134            var block = context.GetVariableBlock(name, localScopeOnly);
 114135            return block?.Metadata is VariableBlockMetadata metadata ? metadata.Variable : null;
 136        }
 137
 138        private MemoryBlock? GetVariableBlock(string name, bool localScopeOnly = false)
 139        {
 1081140            foreach (var block in context.Memory.Blocks.Where(b => b.Value.Metadata is VariableBlockMetadata))
 141            {
 148142                var metadata = block.Value.Metadata as VariableBlockMetadata;
 148143                if (metadata!.Variable.Name == name)
 86144                    return block.Value;
 145            }
 146
 250147            return localScopeOnly ? null : context.ParentContext?.GetVariableBlock(name);
 148        }
 149
 150        /// <summary>
 151        /// Creates a named variable in the context.
 152        /// </summary>
 153        public Variable CreateVariable<T>(string name, T? value, Type? storageDriverType = null, Action<MemoryBlock>? co
 154        {
 94155            var existingVariable = context.GetVariable(name, localScopeOnly: true);
 156
 94157            if (existingVariable != null)
 1158                throw new($"Variable {name} already exists in the context.");
 159
 93160            var variable = new Variable(name, value)
 93161            {
 93162                StorageDriverType = storageDriverType ?? typeof(WorkflowInstanceStorageDriver)
 93163            };
 164
 93165            var parsedValue = variable.ParseValue(value);
 166
 167            // Find the first parent context that has a variable container.
 168            // If not found, use the current context.
 93169            var variableContainerContext = context.GetVariableContainerContext();
 170
 93171            variableContainerContext.Set(variable, parsedValue, configure);
 93172            return variable;
 173        }
 174
 175        /// <summary>
 176        /// Returns the first parent context that contains a variable container.
 177        /// </summary>
 178        public ExpressionExecutionContext GetVariableContainerContext()
 179        {
 93180            return context.FindParent(x =>
 93181            {
 193182                var activityExecutionContext = x.TryGetActivityExecutionContext(out var activityExecutionContextResult) 
 193183                return activityExecutionContext?.Activity is IVariableContainer;
 93184            }) ?? context;
 185        }
 186
 187        /// <summary>
 188        /// Sets the value of a named variable in the context.
 189        /// </summary>
 190        public Variable SetVariable<T>(string name, T? value, Action<MemoryBlock>? configure = null)
 191        {
 15192            var variable = context.GetVariable(name);
 193
 15194            if (variable == null)
 4195                return context.CreateVariable(name, value, configure: configure);
 196
 197            // Get the context where the variable is defined.
 11198            var contextWithVariable = context.FindContextContainingBlock(variable.Id) ?? context;
 199
 200            // Set the value on the variable.
 11201            var parsedValue = variable.ParseValue(value);
 11202            variable.Set(contextWithVariable, parsedValue, configure);
 203
 204            // Return the variable.
 11205            return variable;
 206        }
 207
 208        /// <summary>
 209        /// Sets the output to the specified value.
 210        /// </summary>
 211        public void Set(Output? output, object? value, Action<MemoryBlock>? configure = null)
 212        {
 1722213            if (output != null)
 214            {
 215                // Set the value on the output.
 85216                var outputMemoryBlockReference = output.MemoryBlockReference();
 85217                var parsedValue = output.ParseValue(value);
 85218                context.Set(outputMemoryBlockReference, parsedValue, configure);
 219
 220                // If the referenced output is a workflow output definition, set the value on the workflow execution con
 85221                var workflowExecutionContext = context.GetWorkflowExecutionContext();
 85222                var workflow = workflowExecutionContext.Workflow;
 87223                var workflowOutputDefinition = workflow.Outputs.FirstOrDefault(x => x.Name == outputMemoryBlockReference
 224
 85225                if (workflowOutputDefinition != null)
 0226                    workflowExecutionContext.Output[workflowOutputDefinition.Name] = value!;
 227            }
 1722228        }
 229
 230        /// <summary>
 231        /// Returns a dictionary of memory block keys and values across scopes.
 232        /// </summary>
 233        public IDictionary<string, object> ReadAndFlattenMemoryBlocks() =>
 5234            context.FlattenMemoryBlocks().ToDictionary(x => x.Key, x => x.Value.Value!);
 235
 236        /// <summary>
 237        /// Returns a dictionary of memory blocks across scopes.
 238        /// </summary>
 239        public IDictionary<string, MemoryBlock> FlattenMemoryBlocks()
 240        {
 1241            var currentContext = context;
 1242            var memoryBlocks = new Dictionary<string, MemoryBlock>();
 243
 3244            while (currentContext != null)
 245            {
 2246                var register = currentContext.Memory;
 247
 8248                foreach (var entry in register.Blocks)
 2249                    memoryBlocks.TryAdd(entry.Key, entry.Value);
 250
 2251                currentContext = currentContext.ParentContext;
 252            }
 253
 1254            return memoryBlocks;
 255        }
 256
 257        /// <summary>
 258        /// Returns a the first context that contains a memory block with the specified ID.
 259        /// </summary>
 260        public ExpressionExecutionContext? FindContextContainingBlock(string blockId)
 261        {
 1100262            return context.FindParent(x => x.Memory.HasBlock(blockId));
 263        }
 264
 265        /// <summary>
 266        /// Returns the first context in the hierarchy that matches the specified predicate.
 267        /// </summary>
 268        /// <param name="predicate">The predicate to match.</param>
 269        /// <returns>The first context that matches the predicate or <c>null</c> if no match was found.</returns>
 270        public ExpressionExecutionContext? FindParent(Func<ExpressionExecutionContext, bool> predicate)
 271        {
 452272            var currentContext = context;
 273
 1116274            while (currentContext != null)
 275            {
 934276                if (predicate(currentContext))
 270277                    return currentContext;
 278
 664279                currentContext = currentContext.ParentContext;
 280            }
 281
 182282            return null;
 283        }
 284
 285        /// <summary>
 286        /// Returns the value of the specified variable.
 287        /// </summary>
 288        public object GetVariableInScope(string variableName)
 289        {
 2290            var variable = context.GetVariable(variableName);
 2291            var value = variable?.Get(context);
 292
 2293            return ConvertIEnumerableToArray(value);
 294        }
 295
 296        /// <summary>
 297        /// Gets all variables names in scope.
 298        /// </summary>
 299        public IEnumerable<string> GetVariableNamesInScope() =>
 46300            context.EnumerateVariablesInScope()
 36301                .Select(x => x.Name)
 36302                .Where(x => !string.IsNullOrWhiteSpace(x))
 46303                .Distinct();
 304
 305        /// <summary>
 306        /// Gets all variables in scope.
 307        /// </summary>
 308        public IEnumerable<Variable> GetVariablesInScope() =>
 0309            context.EnumerateVariablesInScope()
 0310                .Where(x => !string.IsNullOrWhiteSpace(x.Name))
 0311                .DistinctBy(x => x.Name);
 312
 313        /// <summary>
 314        /// Sets the value of a named variable in the context.
 315        /// </summary>
 316        public void SetVariableInScope(string variableName, object? value)
 317        {
 2318            var q = from v in context.EnumerateVariablesInScope()
 2319                where v.Name == variableName
 2320                where v.TryGet(context, out _)
 2321                select v;
 322
 2323            var variable = q.FirstOrDefault();
 324
 2325            if (variable != null)
 2326                variable.Set(context, value);
 327
 2328            if (variable == null)
 0329                context.CreateVariable(variableName, value);
 2330        }
 331
 332        /// <summary>
 333        /// Enumerates all variables in scope.
 334        /// </summary>
 335        public IEnumerable<Variable> EnumerateVariablesInScope()
 336        {
 59337            var currentScope = context;
 338
 177339            while (currentScope != null)
 340            {
 130341                if (!currentScope.TryGetActivityExecutionContext(out var activityExecutionContext))
 342                {
 49343                    var variables = currentScope.Memory.Blocks.Values
 344                        .Where(x => x.Metadata is VariableBlockMetadata)
 345                        .Select(x => x.Metadata as VariableBlockMetadata)
 346                        .Select(x => x!.Variable)
 49347                        .ToList();
 348
 124349                    foreach (var variable in variables)
 14350                        yield return variable;
 351                }
 352                else
 353                {
 81354                    var variables = activityExecutionContext.Variables;
 355
 208356                    foreach (var variable in variables)
 28357                        yield return variable;
 358                }
 359
 118360                currentScope = currentScope.ParentContext;
 361            }
 362
 47363            if (context.TryGetWorkflowExecutionContext(out var workflowExecutionContext))
 364            {
 19365                if (workflowExecutionContext.Workflow.ResultVariable != null)
 12366                    yield return workflowExecutionContext.Workflow.ResultVariable;
 367            }
 47368        }
 369
 370        /// <summary>
 371        /// Returns the input value associated with the specified <see cref="InputDefinition"/> in the given <see cref="
 372        /// </summary>
 373        /// <typeparam name="T">The type of the input value.</typeparam>
 374        /// <param name="inputDefinition">The <see cref="InputDefinition"/> specifying the input to retrieve.</param>
 375        /// <returns>The input value associated with the specified <see cref="InputDefinition"/> in the <see cref="Expre
 376        public T? GetInput<T>(InputDefinition inputDefinition)
 377        {
 15378            return context.GetInput<T>(inputDefinition.Name);
 379        }
 380    }
 381
 382    private static JsonSerializerOptions? _serializerOptions;
 383
 384    private static JsonSerializerOptions GetSerializerOptions(ExpressionExecutionContext context)
 385    {
 15386        if (_serializerOptions != null)
 14387            return _serializerOptions;
 388
 1389        var serializerOptions = context.GetRequiredService<IJsonSerializer>().GetOptions().Clone();
 1390        serializerOptions.ReferenceHandler = ReferenceHandler.Preserve;
 1391        _serializerOptions = serializerOptions;
 1392        return serializerOptions;
 393    }
 394
 395    extension(ExpressionExecutionContext context)
 396    {
 397        /// <summary>
 398        /// Returns the value of the specified input.
 399        /// </summary>
 400        /// <param name="name">The name of the input.</param>
 401        /// <typeparam name="T">The type of the input.</typeparam>
 402        /// <returns>The value of the specified input.</returns>
 403        public T? GetInput<T>(string name)
 404        {
 15405            var value = context.GetInput(name);
 15406            var serializerOptions = GetSerializerOptions(context);
 15407            var converterOptions = new ObjectConverterOptions(serializerOptions);
 15408            return value.ConvertTo<T>(converterOptions);
 409        }
 410
 411        /// <summary>
 412        /// Returns the value of the specified input.
 413        /// </summary>
 414        /// <param name="name">The name of the input.</param>
 415        /// <returns>The value of the specified input.</returns>
 416        public object? GetInput(string name)
 417        {
 15418            if (context.IsContainedWithinCompositeActivity())
 419            {
 420                // If there's a variable in the current scope with the specified name, return that.
 0421                var variable = context.GetVariable(name);
 422
 0423                if (variable != null)
 0424                    return variable.Get(context);
 425            }
 426
 427            // Otherwise, return the input.
 15428            var workflowExecutionContext = context.GetWorkflowExecutionContext();
 15429            var input = workflowExecutionContext.Input;
 15430            return input.TryGetValue(name, out var value) ? value : null;
 431        }
 432
 433        /// <summary>
 434        /// Returns the value of the specified output.
 435        /// </summary>
 436        /// <param name="activityIdOrName">The ID or name of the activity.</param>
 437        /// <param name="outputName">The name of the output.</param>
 438        /// <returns>The value of the specified output.</returns>
 439        /// <exception cref="InvalidOperationException">Thrown when the activity is not found.</exception>
 440        public object? GetOutput(string activityIdOrName, string? outputName)
 441        {
 0442            var workflowExecutionContext = context.GetWorkflowExecutionContext();
 0443            var activityExecutionContext = context.GetActivityExecutionContext();
 0444            var activity = activityExecutionContext.FindActivityByIdOrName(activityIdOrName);
 445
 0446            if (activity == null)
 0447                throw new InvalidOperationException("Activity not found.");
 448
 0449            var outputRegister = workflowExecutionContext.GetActivityOutputRegister();
 0450            var outputRecordCandidates = outputRegister.FindMany(activity.Id, outputName);
 0451            var containerIds = activityExecutionContext.GetAncestors().Select(x => x.Id).ToList();
 0452            var filteredOutputRecordCandidates = outputRecordCandidates.Where(x => containerIds.Contains(x.ContainerId))
 0453            var outputRecord = filteredOutputRecordCandidates.FirstOrDefault();
 0454            return outputRecord?.Value;
 455        }
 456
 457        /// <summary>
 458        /// Returns all activity outputs.
 459        /// </summary>
 460        public async IAsyncEnumerable<ActivityOutputs> GetActivityOutputs()
 461        {
 23462            if (!context.TryGetActivityExecutionContext(out var activityExecutionContext))
 14463                yield break;
 464
 9465            var useActivityName = activityExecutionContext.WorkflowExecutionContext.Workflow.CreatedWithModernTooling();
 9466            var activitiesWithOutputs = activityExecutionContext.GetActivitiesWithOutputs();
 467
 9468            if (useActivityName)
 469                activitiesWithOutputs = activitiesWithOutputs.Where(x => !string.IsNullOrWhiteSpace(x.Activity.Name));
 470
 28471            await foreach (var activityWithOutput in activitiesWithOutputs)
 472            {
 5473                var activity = activityWithOutput.Activity;
 5474                var activityDescriptor = activityWithOutput.ActivityDescriptor;
 5475                var activityIdentifier = useActivityName ? activity.Name : activity.Id;
 5476                var activityIdPascalName = activityIdentifier.Pascalize();
 477
 44478                foreach (var output in activityDescriptor.Outputs)
 479                {
 17480                    var outputPascalName = output.Name.Pascalize();
 17481                    yield return new(activity.Id, activityIdPascalName, [
 17482                        outputPascalName
 17483                    ]);
 484                }
 5485            }
 23486        }
 487
 488        /// <summary>
 489        /// Returns a value indicating whether the current activity is inside a composite activity.
 490        /// </summary>
 491        public bool IsContainedWithinCompositeActivity()
 492        {
 38493            if (!context.TryGetActivityExecutionContext(out var activityExecutionContext))
 14494                return false;
 495
 496            // If the first workflow definition in the ancestor hierarchy and that workflow definition has a parent, the
 62497            var firstWorkflowContext = activityExecutionContext.GetAncestors().FirstOrDefault(x => x.Activity is Workflo
 498
 24499            return firstWorkflowContext?.ParentActivityExecutionContext != null;
 500        }
 501
 502        /// <summary>
 503        /// Returns the result of the activity that was executed before the current activity.
 504        /// </summary>
 505        public object? GetLastResult()
 506        {
 0507            var workflowExecutionContext = context.GetWorkflowExecutionContext();
 0508            return workflowExecutionContext.GetLastActivityResult();
 509        }
 510
 511        /// <summary>
 512        /// Returns all activity inputs.
 513        /// </summary>
 514        public IEnumerable<WorkflowInput> GetWorkflowInputs()
 515        {
 516            // Check if we are evaluating an expression during workflow execution.
 22517            if (context.TryGetWorkflowExecutionContext(out var workflowExecutionContext))
 518            {
 8519                var input = workflowExecutionContext.Input;
 520
 24521                foreach (var inputEntry in input)
 522                {
 4523                    var inputPascalName = inputEntry.Key.Pascalize();
 4524                    var inputValue = inputEntry.Value;
 4525                    yield return new(inputPascalName, inputValue);
 526                }
 527            }
 528            else
 529            {
 530                // We end up here when we are evaluating an expression during trigger indexing.
 531                // The scenario being that a workflow definition might have variables declared, that we want to be able 
 28532                foreach (var block in context.Memory.Blocks.Values)
 533                {
 0534                    if (block.Metadata is not VariableBlockMetadata variableBlockMetadata)
 535                        continue;
 536
 0537                    var variable = variableBlockMetadata.Variable;
 0538                    var variablePascalName = variable.Name.Pascalize();
 0539                    yield return new(variablePascalName, block.Value);
 540                }
 541            }
 22542        }
 543    }
 544
 545    private static object ConvertIEnumerableToArray(object? obj)
 546    {
 2547        if (obj == null)
 0548            return null!;
 549
 550        // If it's not an IEnumerable or it's a string or dictionary, return the original object.
 2551        if (obj is not IEnumerable enumerable || obj is string || obj is IDictionary)
 2552            return obj;
 553
 554        // If this is an async enumerable, return as-is.
 0555        if (obj.GetType().Name == "AsyncIListEnumerableAdapter`1")
 0556            return obj;
 557
 558        // Use LINQ to convert the IEnumerable to an array.
 0559        var elementType = obj.GetType().GetGenericArguments().FirstOrDefault();
 560
 0561        if (elementType == null)
 0562            return obj;
 563
 0564        var toArrayMethod = typeof(Enumerable).GetMethod("ToArray")!.MakeGenericMethod(elementType);
 0565        return toArrayMethod.Invoke(null, [
 0566            enumerable
 0567        ])!;
 568    }
 569}

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)