示例#1
0
        static void Main(string[] args)
        {
            IExternalTaskClient externalTaskClient = ExternalTaskClientBuilder.Create()
                                                     .WorkerId("DOT-NET-WORKER").Build();

            externalTaskClient.Startup();
            Console.ReadLine();
            externalTaskClient.Shutdown();
        }
        private async Task <IEnumerable <ExternalTask> > PerformSelection(
            IExternalTaskClient client,
            FetchAndLockRequest request,
            CancellationToken cancellationToken
            )
        {
            var externalTasks = await client.FetchAndLockAsync(request, cancellationToken);

            return(externalTasks);
        }
        static void Main(string[] args)
        {
            IExternalTaskClient externalTaskClient = ExternalTaskClientBuilder.Create()
                                                     .BaseUrl("http://localhost:8080/engine-rest")
                                                     .WorkerId("MicroserviceTrainingExample")
                                                     .Build();

            externalTaskClient.Startup();
            Console.ReadLine();
            externalTaskClient.Shutdown();
        }
 public ExternalTaskSelector(
     IExternalTaskClient client,
     ITopicsProvider topicsProvider,
     IOptions <CamundaWorkerOptions> options,
     ILogger <ExternalTaskSelector>?logger = null
     )
 {
     _client         = Guard.NotNull(client, nameof(client));
     _topicsProvider = Guard.NotNull(topicsProvider, nameof(topicsProvider));
     _options        = Guard.NotNull(options, nameof(options)).Value;
     _logger         = logger ?? NullLogger <ExternalTaskSelector> .Instance;
 }