File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public static IServiceCollection AddFunctions(this IServiceCollection services)
2020 services . RegisterScopedFunctionAlias < TriggerBodyFunction > ( "triggerBody" ) ;
2121 services . RegisterScopedFunctionAlias < TriggerOutputsFunction > ( "triggerOutputs" ) ;
2222 services . RegisterScopedFunctionAlias < OutputsFunction > ( "outputs" ) ;
23+ services . RegisterScopedFunctionAlias < OutputsBodyFunction > ( "outputsBody" ) ;
2324 services . RegisterScopedFunctionAlias < ItemsFunction > ( "items" ) ;
2425
2526
Original file line number Diff line number Diff line change 1+ using ExpressionEngine ;
2+ using ExpressionEngine . Functions . Base ;
3+ using System . Threading . Tasks ;
4+
5+ namespace WorkflowEngine . Core . Expressions
6+ {
7+ public class OutputsBodyFunction : IFunction
8+ {
9+ private readonly OutputsFunction _outputsFunction ;
10+
11+ public OutputsBodyFunction ( OutputsFunction outputsFunction )
12+ {
13+ _outputsFunction = outputsFunction ;
14+ }
15+ public async ValueTask < ValueContainer > ExecuteFunction ( params ValueContainer [ ] parameters )
16+ {
17+ var output = await _outputsFunction . ExecuteFunction ( parameters ) ;
18+
19+ return output ? [ "body" ] ;
20+ }
21+ }
22+ }
Original file line number Diff line number Diff line change 1- using ExpressionEngine ;
1+ using ExpressionEngine ;
22using ExpressionEngine . Functions . Base ;
33using Newtonsoft . Json . Linq ;
44using System . Threading . Tasks ;
You can’t perform that action at this time.
0 commit comments