Add webhook configuration and support to Elsa Server
Integrated webhook sinks via appsettings.json for handling "Run Task" events. Enabled webhook functionality in the application pipeline and added the necessary project reference for Elsa.Webhooks. This enhances event-driven capabilities and improves extensibility.
This commit is contained in:
parent
361b644a75
commit
33d291cfcc
|
|
@ -28,6 +28,7 @@
|
|||
<ProjectReference Include="..\..\modules\Elsa.Sql.SqlServer\Elsa.Sql.SqlServer.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Sql\Elsa.Sql.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Tenants.AspNetCore\Elsa.Tenants.AspNetCore.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Webhooks\Elsa.Webhooks.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa\Elsa.csproj" />
|
||||
<ProjectReference Include="..\..\common\Elsa.DropIns\Elsa.DropIns.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Alterations.MassTransit\Elsa.Alterations.MassTransit.csproj" />
|
||||
|
|
|
|||
|
|
@ -665,7 +665,8 @@ services
|
|||
tenantHttpRouting.WithTenantHeader("X-Tenant-ID");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
elsa.UseWebhooks(webhooks => webhooks.ConfigureSinks += options => builder.Configuration.GetSection("Webhooks").Bind(options));
|
||||
elsa.InstallDropIns(options => options.DropInRootDirectory = Path.Combine(Directory.GetCurrentDirectory(), "App_Data", "DropIns"));
|
||||
elsa.AddSwagger();
|
||||
elsa.AddFastEndpointsAssembly<Program>();
|
||||
|
|
|
|||
|
|
@ -327,5 +327,19 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Webhooks": {
|
||||
"Sinks": [
|
||||
{
|
||||
"Id": "1",
|
||||
"Name": "Run Task",
|
||||
"Filters": [
|
||||
{
|
||||
"EventType": "Elsa.RunTask"
|
||||
}
|
||||
],
|
||||
"Url": "https://localhost:6001/webhooks/run-task"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue