Commit graph

37 commits

Author SHA1 Message Date
Sipke Schoorstra 53bd1f9df9 Add IExecuteWorkflowApi interface and refine retry policy configuration
A new interface, IExecuteWorkflowApi, was created to handle execution and dispatch of workflow definitions. This breaks down functionalities previously present in IWorkflowDefinitionsApi. Also, the retry policy configuration for HTTP requests has been refactored. Instead of hardcoding retry settings, now a delegate method can be optionally passed to customize the behavior. This makes it more flexible and shifts the responsibility of configuring retry policies to the client.
2024-01-06 11:13:29 +01:00
Night Wu c750686a4b New options to control retry logic for transient failures (#4750)
* Add an option to control the number of automatic retries for transient failures.

* Add SleepDurationProvider option for ElsaClientBuilderOptions

---------

Co-authored-by: admin <admin@admin.com>
2024-01-06 10:43:12 +01:00
Sipke Schoorstra d9781510f2 Refactor Elsa API client to use API key authentication
The Elsa API client configuration has been refactored to use API key for authentication instead of HTTP handlers. Besides, the configuration method name was changed to 'AddElsaApiKeyClient' and its parameters were simplified for ease of use. Object 'ElsaClientBuilderOptions' has also been extended with additional properties for further customization.
2023-12-29 19:23:11 +01:00
Sipke Schoorstra 704d4cd834 Remove ElsaClient and related interfaces
Files ElsaClient.cs, IElsaClient.cs and IElsaClientFactory.cs have been deleted from the Elsa.Api.Client project. The commit also includes an update in the DependencyInjectionExtensions.cs file where IElsaClient service registration is removed, reflecting these changes.
2023-12-29 11:34:58 +01:00
Sipke Schoorstra dc223bc273 Refactor parameter in AddElsaClient method
The parameter "configureOptions" in the AddElsaClient method has been renamed and refactored to allow direct HTTP client configuration. This change enables the actions for configuring the HTTP client to be passed directly, providing greater flexibility for customization.
2023-12-29 09:17:29 +01:00
Sipke Schoorstra bdc9d47c09 Add API key authentication for Elsa client
Introduced an `ApiKeyHttpMessageHandler` to use an API key as the authorization header for Elsa API client. This ensures secure interaction with the Elsa server. Also made updates to the `ElsaClientOptions` class to include the API key. An `AddElsaClient` method is added with the API key parameter in `DependencyInjectionExtensions` class for convenience.
2023-12-28 21:54:06 +01:00
Sipke Schoorstra c97282f7d5 Remove ApiHttpMessageHandler and update ElsaClient configuration
The ApiHttpMessageHandler and the related configuration in ElsaClientOptions have been removed. The configuration for creating Api clients in DependencyInjectionExtensions has been updated to handle these changes. This includes the addition of a retry policy in case of transient HTTP error and changing the way clients are created to use the HttpClientFactory directly.
2023-12-09 20:44:11 +01:00
Sipke Schoorstra e4d6ad22c4
Decouple Expression Types (#4622)
* Refactor Expressions model

* Enable expression type filtering

* Implement dynamic enablement of satelite dependencies
2023-11-14 20:44:42 +01:00
jdevillard 1b48305418
Enhancement/runtime options provider#4491 (#4614)
* add Endpoint to fetch data from options provider

* add Api Client Contract

* add context object in Endpoint

* Update Api Client Contract for Context

---------

Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
2023-11-09 13:01:51 +01:00
Sipke Schoorstra 67c16a3c4c
Add WorkflowContext client API (#4585) 2023-10-29 11:36:01 +01:00
Sipke Schoorstra de4cf34c47 Expose HTTP Message Handler factory 2023-10-26 21:10:07 +02:00
Sipke Schoorstra 3281523c5c Fix duplicate HTTP client handler registration
#4543
2023-10-18 22:36:54 +02:00
Sipke Schoorstra 03b608410b
Incidents (#4436)
* Implement Incident Strategy interface and resolver

* Add ActivityIncident model

* Add IncidentCount and Incidents properties and update migrations

* Expose incident strategies API endpoint

* Update API client with Incident Strategy models

* Replace Fault with Incidents

* Register fault status when any children have faulted

* Map incident count

* Remove unnecessary AlreadyCompleted result

* Ensure next activities are scheduled only if activity completed normally

* Incident roundtrip and fix workflow instance realtime updates

* Remove unused variable

* Add integration tests
2023-09-14 10:50:02 +02:00
Ray 811f8b4c93
V3 get type definitions request (#4353)
* Update IWorkflowDefinitionsApi.cs

Add GetTypeDefinitions Refit request

* Create GetTypeDefinitionsRequest.cs

Add the Request model.

* Refactor WorkflowDefinitionRequest to seperate resource.

---------

Co-authored-by: Raymon Boer <r.boer@sense-cloud.nl>
2023-08-24 21:44:04 +02:00
Sipke Schoorstra 6a66c3f0ae Add message handler provider API 2023-08-20 20:02:59 +02:00
Sipke Schoorstra 3ff0655fac Add Elsa API client configuration API 2023-08-19 13:37:17 +02:00
RuslanSay 0ea9399f81
Add to ElsaClientOptions.ConfigureHttpClient access to the service provider (#4318) 2023-08-11 23:02:36 +02:00
Sipke Schoorstra c429fe6fcc Update API client 2023-07-31 22:37:57 +02:00
Sipke Schoorstra 0c8bbb935c Implement real time workflow update broadcasting using SignalR 2023-07-25 15:12:27 +02:00
Sipke Schoorstra e5e34c821b Add ActivityExecutionRecord entity, persistence and endpoints 2023-07-22 21:05:33 +02:00
Sipke Schoorstra ae4dce9119 Refactor API client to handle activities as JsonObjects 2023-07-16 15:08:13 +02:00
Sipke Schoorstra 77b1a97682 Cleanup unused code and blanks 2023-07-09 12:33:26 +02:00
Sipke Schoorstra 8bf20732be Restructure folders in API client and add WorkflowInstances API client 2023-07-07 13:53:44 +02:00
Sipke Schoorstra 13db9bc1ac Add retract client API 2023-07-04 11:57:01 +02:00
Sipke Schoorstra 159f27b635 Add activation strategy API client 2023-07-02 18:59:13 +02:00
Sipke Schoorstra 143fbefd55 Add API client for variable types and storage drivers 2023-07-01 22:18:04 +02:00
Sipke Schoorstra 336e55a230 Add FlowSwitch resolver to API client 2023-06-29 14:51:00 +02:00
Sipke Schoorstra 171e78d8ab Update API client models 2023-06-23 22:38:37 +02:00
Sipke Schoorstra ac57c07e7c Update API client models 2023-06-21 11:10:07 +02:00
Sipke Schoorstra 75eaf1020d Refactor API client model 2023-06-19 15:32:26 +02:00
Sipke Schoorstra 4689e83cf9 Update API client 2023-06-10 20:32:06 +02:00
Sipke Schoorstra 144d9d0aa4 Update Elsa API Client with ActivityDescriptors API 2023-06-10 15:33:32 +02:00
Sipke Schoorstra 5f02e744e2 Add login API client 2023-05-19 14:36:16 +02:00
Sipke Schoorstra c07e561ad3 Update API client 2023-05-16 22:37:08 +02:00
Sipke Schoorstra 3a2b7f40bc Restructure API client 2023-05-16 20:03:12 +02:00
Sipke Schoorstra 3ec9df87c1 Initial work on Elsa Client 2023-04-01 16:15:35 +02:00
Sipke Schoorstra 30c4e5b1e7
Implement API key authentication (#3834)
* Implement API key storage

* Implement API key validation

* Implement EF Core providers
2023-03-26 23:53:17 +02:00