File tree 1 file changed +6
-2
lines changed
src/main/java/com/microsoft/azure/functions/worker/broker
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -121,15 +121,19 @@ private FunctionExecutionMiddleware getFunctionExecutionMiddleWare() {
121
121
public Optional <TypedData > invokeMethod (String id , InvocationRequest request , List <ParameterBinding > outputs )
122
122
throws Exception {
123
123
ExecutionContextDataSource executionContextDataSource = buildExecutionContext (id , request );
124
+ invoke (executionContextDataSource );
125
+ outputs .addAll (executionContextDataSource .getDataStore ().getOutputParameterBindings (true ));
126
+ return executionContextDataSource .getDataStore ().getDataTargetTypedValue (BindingDataStore .RETURN_NAME );
127
+ }
128
+
129
+ private void invoke (ExecutionContextDataSource executionContextDataSource ) throws Exception {
124
130
ClassLoader prevContextClassLoader = Thread .currentThread ().getContextClassLoader ();
125
131
try {
126
132
Thread .currentThread ().setContextClassLoader (classLoaderProvider .createClassLoader ());
127
133
this .invocationChainFactory .create ().doNext (executionContextDataSource );
128
134
} finally {
129
135
Thread .currentThread ().setContextClassLoader (prevContextClassLoader );
130
136
}
131
- outputs .addAll (executionContextDataSource .getDataStore ().getOutputParameterBindings (true ));
132
- return executionContextDataSource .getDataStore ().getDataTargetTypedValue (BindingDataStore .RETURN_NAME );
133
137
}
134
138
135
139
private ExecutionContextDataSource buildExecutionContext (String id , InvocationRequest request )
You can’t perform that action at this time.
0 commit comments