Commit graph

179 commits

Author SHA1 Message Date
Sipke Schoorstra 08d91d1852 Update display name of FlowSwitch to distinguish from sequential Switch 2023-10-19 18:18:17 +02:00
Sipke Schoorstra 443e608a05 Fix FlowJoin completion issue
The order here is important. Before this change, the flowchart would determine that there was still pending work, after which the FlowJoin would then cancel that work, leaving the Flowchart uncompleted.
2023-10-19 17:41: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
Sipke Schoorstra 170a14c914 Update FlowDecision 2023-10-17 22:42:16 +02:00
Sipke Schoorstra cdf5f9f614 Rename Port Resolver to Activity Resolver
In the scenario where this resolver is used, it's not about discovering ports, but about constructing a graph from the workflow by going through each activity or activities property.
2023-10-15 11:31:24 +02:00
Sipke Schoorstra a770decc7f Update Flowchart to adhere to CanStartWorkflow 2023-10-12 11:52:05 +02:00
Sipke Schoorstra ca5692e3bc
Alteration Improvements and fixes (#4518)
* Remove unused NOOP stores

* Add activity execution manager and FindAsync method to store

The notification is used to broadcast changes to SignalR clients.

* Refactor ActiveActivityExectionContexts

Instead, the workflow state extractor is in control of what gets extracted.

* Add missing files for activity execution deleted broadcast

* Update Flowchart to not fault when child faults

* Update Flowchart to support scheduling existing activity instances

* Update namespaces from Services to Stores

* Improve activity cancellation alteration

* Update ScheduleActivity alteration
2023-10-10 12:34:32 +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 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 2a7ca95456 Make ConnectionComparer more resilient 2023-09-28 14:09:34 +02:00
Sipke Schoorstra f6f1d930e2 Rename display text of Flow Node 2023-09-28 13:38:37 +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 635d4f6948
Terminal Activities (#4454)
* Implement terminal node behavior

* Cleanup
2023-09-18 14:23:43 +02:00
Sipke Schoorstra 7f0b3cb8fc Fix cascaded handling of SetOutcome 2023-09-14 16:30:18 +02:00
Sipke Schoorstra 1f3851b652 Add debug logging to Flowchart activity 2023-09-14 12:51:10 +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 e8421bd148 Fix SetOutput when used in composite activity 2023-09-11 21:36:07 +02:00
Sipke Schoorstra 2ba5051880 Fix connection comparison
Fixes the issue where restored connections would keep being restored upon deserialization
2023-09-11 11:22:03 +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 5d7188a4e8 Add ability to schedule outcome names. 2023-09-10 15:34:26 +02:00
Sipke Schoorstra 018b3a3672 Fix flowchart not completing when using explicit WaitAny joins 2023-09-08 21:15:40 +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 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 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 3ba6a548e1
Update ForEach activity with local variables (#4315)
* Update ForEach activity with local variables

* Add option to include activity instance ID as part of bookmark hash
2023-08-11 21:59:39 +02:00
Sipke Schoorstra 62ae3b1f6e
Add ability to push variables to scheduled work (#4306) 2023-08-09 22:35:44 +02:00
Sipke Schoorstra a8079090aa
Telnyx fixes (#4300)
* Update flowchart to consider activity instance completion

* Update Telnyx activities to leverage workflow inbox

* Fix Telnyx webhook activities

* Fix TransferCall and IncomingCall activities

* Turn collections into arrays for JS

* Telnyx activity fixes
2023-08-08 20:50:21 +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 17a59eaa97 Use List instead of HashSet
Fixes #4286
2023-08-05 10:35:48 +02:00
Sipke Schoorstra 4faf40b3ae Improve Telnyx activities 2023-08-04 22:14:41 +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 226c25169f Improve Flowchart "Start" activity logic
With this change, the user has better control over what activity to use as the starting node. Originally, the designer wouls store the ID of the first activity to have dropped on the designer, which would cause unexpected results when later adding another activity as the root node. The logic is now changed to:

1. Use the trigger node if that node was triggered.
2. Use the Start node, if there is one.
3. Use the first activity that has no inbound connections.
4. Use the first activity in the collection.
2023-08-04 10:15:15 +02:00
Sipke Schoorstra e5e34c821b Add ActivityExecutionRecord entity, persistence and endpoints 2023-07-22 21:05:33 +02:00
Sipke Schoorstra d746456330 Use activity ID as Node ID for workflows created with tool version >= 3 2023-07-21 18:43:31 +02:00
Sipke Schoorstra 2c3e5719ce Fix that flowchart name was not read from JSON 2023-07-16 22:08:08 +02:00
Sipke Schoorstra b9ac7f2c4b Harden Flowchart and Connection JSON serializers 2023-07-12 18:33:19 +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 299f9248f0 Update flowchart JSON converter to handle undefined connections array 2023-06-30 11:23:12 +02:00
gurkanguran f0814f4f64
Fixes the issue with httpendoint not being suspended #4143 (#4171)
* Fixes the issue with httpendoint not being suspended #4143

* Simplify HttpEndpoint and bookmark processor

* Fix issue with null workflow state ID

* Remove implicit instalment of EF Core provider for Trigger and Bookmark store

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2023-06-28 20:55:57 +02:00
Sipke Schoorstra e0dd53b1ad Make collections in activity descriptor read-only 2023-06-28 18:07:16 +02:00
Sipke Schoorstra 90d1905e46 Cleanup 2023-06-28 12:38:06 +02:00
Sipke Schoorstra f84617a259 Make connection JON converter more resilient 2023-06-27 10:29:32 +02:00
Sipke Schoorstra 05680edb35 Move some flow activities to the Branching category 2023-06-24 13:15:11 +02:00
Sipke Schoorstra dab6ce622c Add backwards compatibility for customProperties <- applicationProperties 2023-06-18 22:13:15 +02:00
Sipke Schoorstra ce974a777f Rename application properties of flowchart activity for consistency 2023-06-18 22:06:54 +02:00
Sipke Schoorstra 8b05d89d43 Fix connection serialisation + front end connection error 2023-06-18 21:26:44 +02:00
Sipke Schoorstra b356cdb52b
Refactor connection model (#4146) 2023-06-18 14:32:48 +02:00