public string ReplayOrchestration(string name, string version, string serializedHistoryEvents) { TaskOrchestration taskOrchestration = this.orchestrationObjectManager.GetObject(name, version); IList<HistoryEvent> replayEvents = this.DeserializeHistoryEvents(serializedHistoryEvents); if (replayEvents.Any(re => re.EventType == EventType.GenericEvent)) { throw new InvalidOperationException("Cannot replay with GenericEvent"); } var runtimeState = new OrchestrationRuntimeState(this.DeserializeHistoryEvents(serializedHistoryEvents)); TaskOrchestrationExecutor executor = new TaskOrchestrationExecutor(runtimeState, taskOrchestration); return JsonConvert.SerializeObject(executor.Execute(), new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.All, Formatting = Formatting.Indented }); }
public string ReplayOrchestration(string name, string version, string serializedHistoryEvents) { TaskOrchestration taskOrchestration = this.orchestrationObjectManager.GetObject(name, version); IList <HistoryEvent> replayEvents = this.DeserializeHistoryEvents(serializedHistoryEvents); if (replayEvents.Any(re => re.EventType == EventType.GenericEvent)) { throw new InvalidOperationException("Cannot replay with GenericEvent"); } var runtimeState = new OrchestrationRuntimeState(this.DeserializeHistoryEvents(serializedHistoryEvents)); TaskOrchestrationExecutor executor = new TaskOrchestrationExecutor(runtimeState, taskOrchestration); return(JsonConvert.SerializeObject(executor.Execute(), new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.All, Formatting = Formatting.Indented })); }