Commit graph

318 commits

Author SHA1 Message Date
Sipke Schoorstra bf205c72b9 Fix SetOutput handling 2023-11-17 20:59:09 +01:00
Sipke Schoorstra 3a4b15be13 Fix output mapping naming collision 2023-11-15 15:13:19 +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
Sipke Schoorstra f0f39bec77 Fix flowchart completion miss
Added a check to take into account scheduled work who's owner is tje flowchart
2023-11-10 22:08:35 +01:00
Sipke Schoorstra cd33d29768 Add support for direct-output binding
This change enables activity output to be directly bound to workflow output.
2023-11-09 13:35:02 +01:00
Sipke Schoorstra 5d1a1aaf86
Add C# expression support (#4594)
* Initial version of c# expressions

* Add support for strongly-typed workflow variable accessors

* Fix type casting

* Rename c# to C# in XML comments

* Rename Globals.Context to ExecutionContext and Variables to Context

* Move RunJavaScript activity to Elsa.JavaScript

* Add RunCSharp activity

* Add CSharpOptions

* Add common workflow properties and methods
2023-11-03 20:28:10 +01:00
Sipke Schoorstra abff7f3907 Add test for activities and variables 2023-10-20 13:42:18 +02:00
Sipke Schoorstra bd1eb2edfa Rename ServiceBus integration tests project 2023-10-20 13:38:40 +02:00
Sipke Schoorstra 5c2dc39606 Formatting 2023-10-20 09:08:19 +02:00
jdevillard fb68814974
Service Bus Activities enhancements - Workflow Inbox and Test (#4512)
* Add Service Bus Message Test Scenario

* change filename

* add workflow test

* save new unit test project (don't know why Guid have changed

* use WorkfloInbox Message for ReceiveActivity and Worker

* add test

* add correlationId

* add test with correlationId

* saving sln

* Fix project references

* remove Moq librairies for UnitTests Projects

* remove Moq and use NSubstitute

---------

Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2023-10-19 20:00:43 +02:00
Sipke Schoorstra 3ae9d0a023 Add integration test for direct output mapping 2023-10-18 19:34:04 +02:00
Sipke Schoorstra 382dc4b124 Initial work on activity unit testing 2023-10-18 00:10:48 +02:00
Nokecy 4056434e45
fix: fix hashSet deserialize error (#4545)
* update hangfire version to 1.8.5

* fix: fix hashSet deserialize error

* fix: replace HashSet to ISet<T>

* Update polymorphic converter and tests

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2023-10-17 23:14:40 +02:00
solutionmania 1f014c9264
Corrected behaviour of 'For' activity. (#4497)
* Add 'Auto Step Direction' option to 'For' activity.

* Adjusted 'For' behaviour to be more consistent with generally expected behaviour.
2023-10-07 23:31:16 +02:00
Sipke Schoorstra bddf522e55
Activity Preconditions (#4507)
* Add CanExecuteAsync precondition method

* Rename GetInput to GetWorkflowInput to disambiguate between input sent to workflow and input sent to indiviudal activities.
2023-10-07 14:22:51 +02:00
Sipke Schoorstra 523f301bf7
Feature: Alterations (#4501)
* Implement Alteration types and engine

* Implement Alteration APIs

* Refactor activity work item with support for activity input

* Serialize scheduled activities as part of workflow state

* Add signal to schedule child activity

* Implement stores for plans and jobs

* Add EF Core provider

* Add Retry endpoint

* Keep root context as always active. The root context is the workflow execution context and contains persistent variable state

* Regenerate EF Core migrations

* Handle orphaned activity execution contexts

* Refactor workflow execution factory

* Enable configuring Jint from Program

* Update ModifyVariable alteration with support for type deserialization

* Use ShortGuid for identity

* Cleanup WorkflowServer host
2023-10-07 12:47:36 +02:00
Sipke Schoorstra a5d13e4e9b
Enhance HTTP Endpoint + Flowchart fix (#4469)
* Fix flowchart next activity scheduling bug

This fixes a bug where the Flowchart activity would schedule connected activities regardless of the outcome of the completed activity.

* Cancel activity execution when cancellation token is triggered.

* Enable user to handle HTTP endpoint validation failures as outcomes

* Don't respond with full details in case of HTTP Endpoint faults for security
2023-09-22 18:45:18 +02:00
Sipke Schoorstra 89f94a2261
File Uploads (#4457)
* Initial support for receiving files via HTTP Endpoint activity

* Implement HTTP endpoint request timeout

* Implement request time out handling

* Implement request size validation

* Formatting

* Implement application and system level cancellation tokens

* Create CancellationTokens struct

* Cleanup HttpEndpoint

* Implement file size validation

* Implement file extension validation

* Implement mime type validation

* Update usages of cancellation tokens
2023-09-19 22:42:53 +02:00
Sipke Schoorstra 7f0b3cb8fc Fix cascaded handling of SetOutcome 2023-09-14 16:30:18 +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
Sipke Schoorstra 6fddd5223d Add execution context affinity and prevent duplicate scheduling for Join
This fixes the issue where the Join activity executes twice and potentially one instance never completes.
2023-09-12 20:27:36 +02:00
Sipke Schoorstra f6c4ffb934 Fix tag not passed to child completion callback
Fixes #4387
2023-09-10 18:34:40 +02:00
Sipke Schoorstra 018b3a3672 Fix flowchart not completing when using explicit WaitAny joins 2023-09-08 21:15:40 +02:00
Sipke Schoorstra 003bf4e335 Fix output accessors and add tests 2023-09-06 22:57:01 +02:00
Sipke Schoorstra 69744bd63c Fix naming collision between workflow input and activity input 2023-09-06 13:50:08 +02:00
Sipke Schoorstra 45d194125d
Remove WorkflowStateStore (#4374)
* Remove WorkflowStateStore and use WorkflowInstanceStore instead

* Delete RunningWorkflows actor

* Cleanup
2023-08-30 15:42:16 +02:00
Sipke Schoorstra b3e0c0064c Fix sample and test 2023-08-28 22:44:43 +02:00
Sipke Schoorstra ca25b78457
Fix Break behavior (#4365)
* Fix Break behavior

* Ensure removal of completion callbacks
2023-08-26 01:11:10 +02:00
Sipke Schoorstra 4d37c2a1da
Fix Default Workflow Runtime Race condition (#4362)
* Refactor Telnyx activities to use instance ID for correlating events

* Ensure SetVariable sets value in correct scope

* Fix race condition between new instances that are being resumed

* Fix tests
2023-08-24 21:41:45 +02:00
Sipke Schoorstra 46c9a76259 Move input accessors to Jint service to control order 2023-08-22 14:59:31 +02:00
Sipke Schoorstra 7c99037de2
EF Core NoTracking (#4323)
* Use NoTracking for EF Core

* Use Activity ID as Node ID for modern tooling

* Fix DispatchWorkflow activity

* Update tests and remove redundant ToolVersion
2023-08-12 16:41:16 +02:00
Sipke Schoorstra 265434b651
Update output selector with support for activity instances (#4307)
* Update output selector with support for activity instances

* Update tests
2023-08-10 00:20:30 +02:00
Sipke Schoorstra 166e11c416
Fix loss of source file + line number (#4293)
Fixes #4287
2023-08-06 20:55:24 +02:00
Sipke Schoorstra 911d13d31c Fix component test project reference 2023-08-05 10:40:09 +02:00
Sipke Schoorstra 815b544f53 Update Flowchart completion logic
In addition to taking into account scheduled work, also check if there are actual activity instances still running
2023-08-04 11:45:07 +02:00
Sipke Schoorstra e1784f7f6c Rename GetVariableByName to GetVariable and increase XML coverage 2023-07-31 20:03:41 +02:00
gurkanguran d29df110d2
Fixed getting and setting variables in context (#4267)
* Fixed getting and setting variables in context

* Added unit tests

* Add test for named variable

* Search variable in parent contexts

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2023-07-31 18:53:50 +02:00
Sipke Schoorstra d31934e9bf Remove unused namespace imports 2023-07-14 19:40:09 +02:00
gurkanguran 90e560bc73
Redis proto cluster member store (#4241)
* Implemented redis as a proto cluster member store

* Added component tests for redis protocluster member store

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2023-07-14 19:29:43 +02:00
Sipke Schoorstra 9671d85013 Cleanup namespaces 2023-07-09 14:02:41 +02:00
Sipke Schoorstra fe2a897a30 Restructure models in Workflows.Core 2023-07-09 13:12:13 +02:00
Sipke Schoorstra 466c4b922e Fix tests, remove named variables
Only reference variables by C# reference or reference ID
2023-07-03 21:31:03 +02:00
Sipke Schoorstra b356cdb52b
Refactor connection model (#4146) 2023-06-18 14:32:48 +02:00
Sipke Schoorstra c216185c5e
Update Workflow model with support for Inputs, Outputs and Outcomes (#4112)
* Fix mutable prop changes warning

* Fix graph no longer scrolling to content

* Remove unused namespace imports

* Update Workflow model with support for input, output and outcomes

* Update sample with EF core persistence

* Rename FluentStorage to BlobStorage
2023-06-08 11:39:19 +02:00
Sipke Schoorstra 0bb2ddcfee
Support sub-workflow dependency handling of JSON workflows (#4098)
* Change "Usable as Activity" setting into checkbox

* Update client model

* Update query to use shadow property

* Update UsableAsActivity usages

* Implement staged provisioning of workflows

* Add tests

* Update migrations
2023-06-03 12:28:10 +02:00
Sipke Schoorstra a7f4aac97b Add tests for workflow result variable 2023-04-28 15:16:09 +02:00
Sipke Schoorstra a67361c6ae Fix variable type serialization 2023-04-28 14:31:38 +02:00
Sipke Schoorstra 316d35e796 Remove unused code 2023-04-28 11:42:36 +02:00
Sipke Schoorstra 5d766e921b Merge remote-tracking branch 'origin/v3' into v3 2023-04-28 11:38:13 +02:00
Sipke Schoorstra 885119c768 Add events for ActivityExecuting and ActivityExecuted 2023-04-28 11:37:01 +02:00