Пример #1
0
        public static void RunWorkflow()
        {
            string workflowName = "HelloWorld Workflow";

            // Setup
            DomainRegistration.RegisterDomain(swfClient, domainName);
            RegisterActivites(domainName);
            WorkflowRegistration.RegisterWorkflow(swfClient, workflowName, domainName);
            InitiateWorkers();
            InitiateDeciders();


            //Start the workflow
            Task.Run(() => StartWorkflow(workflowName));


            Console.Read();
            DeprecateDomainRequest request = new DeprecateDomainRequest()
            {
                Name = domainName
            };
            var response = swfClient.DeprecateDomain(request);

            Console.WriteLine(response.ResponseMetadata.ToString());


            Console.Read();
        }
 private Amazon.SimpleWorkflow.Model.DeprecateDomainResponse CallAWSServiceOperation(IAmazonSimpleWorkflow client, Amazon.SimpleWorkflow.Model.DeprecateDomainRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Simple Workflow Service (SWF)", "DeprecateDomain");
     try
     {
         #if DESKTOP
         return(client.DeprecateDomain(request));
         #elif CORECLR
         return(client.DeprecateDomainAsync(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;
     }
 }