@@ -40,7 +40,7 @@ public Hashtable Invoke(OrchestrationBindingInfo orchestrationBindingInfo, IPowe
40
40
{
41
41
// The orchestration function should be stopped and restarted
42
42
pwsh . StopInvoke ( ) ;
43
- return CreateOrchestrationResult ( isDone : false , actions , output : null ) ;
43
+ return CreateOrchestrationResult ( isDone : false , actions , output : null , context . CustomStatus ) ;
44
44
}
45
45
else
46
46
{
@@ -49,13 +49,13 @@ public Hashtable Invoke(OrchestrationBindingInfo orchestrationBindingInfo, IPowe
49
49
// The orchestration function completed
50
50
pwsh . EndInvoke ( asyncResult ) ;
51
51
var result = FunctionReturnValueBuilder . CreateReturnValueFromFunctionOutput ( outputBuffer ) ;
52
- return CreateOrchestrationResult ( isDone : true , actions , output : result ) ;
52
+ return CreateOrchestrationResult ( isDone : true , actions , output : result , context . CustomStatus ) ;
53
53
}
54
54
catch ( Exception e )
55
55
{
56
56
// The orchestrator code has thrown an unhandled exception:
57
57
// this should be treated as an entire orchestration failure
58
- throw new OrchestrationFailureException ( actions , e ) ;
58
+ throw new OrchestrationFailureException ( actions , context . CustomStatus , e ) ;
59
59
}
60
60
}
61
61
}
@@ -68,9 +68,10 @@ public Hashtable Invoke(OrchestrationBindingInfo orchestrationBindingInfo, IPowe
68
68
private static Hashtable CreateOrchestrationResult (
69
69
bool isDone ,
70
70
List < List < OrchestrationAction > > actions ,
71
- object output )
71
+ object output ,
72
+ object customStatus )
72
73
{
73
- var orchestrationMessage = new OrchestrationMessage ( isDone , actions , output ) ;
74
+ var orchestrationMessage = new OrchestrationMessage ( isDone , actions , output , customStatus ) ;
74
75
return new Hashtable { { AzFunctionInfo . DollarReturn , orchestrationMessage } } ;
75
76
}
76
77
}
0 commit comments