/// <summary> /// Gets last execution context. Don't override this /// </summary> /// <returns></returns> internal virtual WorkflowState GetLastExecContext() { var req = new DescribeWorkflowExecutionRequest { Domain = _request.Domain, Execution = _decisionTask.WorkflowExecution }; var res = _swfClient.DescribeWorkflowExecutionAsync(req).Result; return(WorkflowStateSerializer.Deserialize(res.WorkflowExecutionDetail.LatestExecutionContext)); }
private Amazon.SimpleWorkflow.Model.DescribeWorkflowExecutionResponse CallAWSServiceOperation(IAmazonSimpleWorkflow client, Amazon.SimpleWorkflow.Model.DescribeWorkflowExecutionRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Simple Workflow Service (SWF)", "DescribeWorkflowExecution"); try { #if DESKTOP return(client.DescribeWorkflowExecution(request)); #elif CORECLR return(client.DescribeWorkflowExecutionAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }