@@ -319,37 +319,39 @@ public static IEnumerable<Variable> EnumerateVariablesInScope(this ExpressionExe
319
319
/// <summary>
320
320
/// Returns the value of the specified input.
321
321
/// </summary>
322
- /// <param name="expressionExecutionContext "></param>
322
+ /// <param name="context "></param>
323
323
/// <param name="name">The name of the input.</param>
324
324
/// <typeparam name="T">The type of the input.</typeparam>
325
325
/// <returns>The value of the specified input.</returns>
326
- public static T ? GetInput < T > ( this ExpressionExecutionContext expressionExecutionContext , string name )
326
+ public static T ? GetInput < T > ( this ExpressionExecutionContext context , string name )
327
327
{
328
- var value = expressionExecutionContext . GetInput ( name ) ;
328
+ var value = context . GetInput ( name ) ;
329
329
return value . ConvertTo < T > ( ) ;
330
330
}
331
331
332
332
/// <summary>
333
333
/// Returns the value of the specified input.
334
334
/// </summary>
335
- /// <param name="expressionExecutionContext "></param>
335
+ /// <param name="context "></param>
336
336
/// <param name="name">The name of the input.</param>
337
337
/// <returns>The value of the specified input.</returns>
338
- public static object ? GetInput ( this ExpressionExecutionContext expressionExecutionContext , string name )
338
+ public static object ? GetInput ( this ExpressionExecutionContext context , string name )
339
339
{
340
- // If there's a variable in the current scope with the specified name, return that.
341
- var variable = expressionExecutionContext . GetVariable ( name ) ;
340
+ if ( context . IsInsideCompositeActivity ( ) )
341
+ {
342
+ // If there's a variable in the current scope with the specified name, return that.
343
+ var variable = context . GetVariable ( name ) ;
342
344
343
- if ( variable != null )
344
- return variable . Get ( expressionExecutionContext ) ;
345
+ if ( variable != null )
346
+ return variable . Get ( context ) ;
347
+ }
345
348
346
349
// Otherwise, return the input.
347
- var workflowExecutionContext = expressionExecutionContext . GetWorkflowExecutionContext ( ) ;
350
+ var workflowExecutionContext = context . GetWorkflowExecutionContext ( ) ;
348
351
var input = workflowExecutionContext . Input ;
349
352
return input . TryGetValue ( name , out var value ) ? value : default ;
350
353
}
351
-
352
-
354
+
353
355
/// <summary>
354
356
/// Returns the value of the specified input.
355
357
/// </summary>
0 commit comments