Exemplo n.º 1
0
        private static Hashtable CreateOrchestrationResult(
            bool isDone,
            List <List <OrchestrationAction> > actions,
            object output,
            object customStatus)
        {
            var orchestrationMessage = new OrchestrationMessage(isDone, actions, output, customStatus);

            return(new Hashtable {
                { AzFunctionInfo.DollarReturn, orchestrationMessage }
            });
        }
        private static string FormatOrchestrationFailureMessage(
            List <List <OrchestrationAction> > actions,
            object customStatus,
            Exception exception)
        {
            // For more details on why this message looks like this, see:
            // - https://github.com/Azure/azure-functions-durable-js/pull/145
            // - https://github.com/Azure/azure-functions-durable-extension/pull/1171
            var orchestrationMessage = new OrchestrationMessage(isDone: false, actions, output: null, customStatus, exception.Message);
            var message = $"{exception.Message}{OutOfProcDataLabel}{JsonConvert.SerializeObject(orchestrationMessage)}";

            return(message);
        }