// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime lifetime)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            #region Autofac

            ContainerBuilder builder = new ContainerBuilder();

            WorkflowDI.Configure(app, env, lifetime, builder);

            var container = builder.Build();

            // Create the ActorSystem and Dependency Resolver
            var system = app.ApplicationServices.GetService <ActorSystem>();
            system.UseAutofac(container);

            #endregion
        }
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            WorkflowDI.ConfigureServices(services, "Workflow");
        }