File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/java/com/microsoft/azure/functions/worker/broker Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -121,15 +121,19 @@ private FunctionExecutionMiddleware getFunctionExecutionMiddleWare() {
121121 public Optional <TypedData > invokeMethod (String id , InvocationRequest request , List <ParameterBinding > outputs )
122122 throws Exception {
123123 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 {
124130 ClassLoader prevContextClassLoader = Thread .currentThread ().getContextClassLoader ();
125131 try {
126132 Thread .currentThread ().setContextClassLoader (classLoaderProvider .createClassLoader ());
127133 this .invocationChainFactory .create ().doNext (executionContextDataSource );
128134 } finally {
129135 Thread .currentThread ().setContextClassLoader (prevContextClassLoader );
130136 }
131- outputs .addAll (executionContextDataSource .getDataStore ().getOutputParameterBindings (true ));
132- return executionContextDataSource .getDataStore ().getDataTargetTypedValue (BindingDataStore .RETURN_NAME );
133137 }
134138
135139 private ExecutionContextDataSource buildExecutionContext (String id , InvocationRequest request )
You can’t perform that action at this time.
0 commit comments