Elsa Core
Elsa Core 之 SendHttpRequest
读取返回结果
1、首先要开启读取返回结果,如下所示
2、在下一节点或者其他地方读取
使用liquid
{{ Activities.请求节点名.ResponseContent }}
请求Timeout的问题解决
错误方式1:
在RequestHeader中配置Timeout,实际没效果
另,需要使用json格式才能保存,用默认的一直保存不成功
成功方式:
在Startup.cs中配置Timeout
services
.AddElsa(options => options
.UseEntityFrameworkPersistence(ef => ef.UseSqlServer(Configuration.GetConnectionString("ElsaConnection")), false)
.AddConsoleActivities()
.AddHttpActivities(elsaSection.GetSection("Server").Bind, configureHttpClient: httpClientBuilder => {
httpClientBuilder.ConfigureHttpClient((client) => { client.Timeout = TimeSpan.FromHours(1); });
})
.AddEmailActivities(elsaSection.GetSection("Smtp").Bind)
.AddJavaScriptActivities()
.AddQuartzTemporalActivities()
.AddActivitiesFrom<Startup>()
.AddFeatures(new[] { typeof(Startup) }, Configuration)
);
关键字: elsa