Commit graph

503 commits

Author SHA1 Message Date
Craig Fowler 6f7d512a9f
Merge pull request #735 from craigfowler/feature/728-WorkflowInstances-not-persisting
Resolve #728 workflow instances weren't persisting
2021-03-11 09:01:07 +00:00
Craig Fowler 10094942a4 PR rework #728 - Remove repetitive logging 2021-03-10 20:15:52 +00:00
Craig Fowler 5c927501d0 PR rework #728 - Default persistence behavior
This reworks the way that the default behavior is selected, in line
with comments.  The changes to the enum are reverted, and the
three places which create a workflow definition are now altered to
explicitly choose WorkflowBurst

This includes a change to the TS enum definition - update to match
its C# counterpart.
2021-03-10 20:08:53 +00:00
Sipke Schoorstra 4eb3f47d30 Extract options and UI hint resolvers 2021-03-10 20:23:21 +01:00
Sipke Schoorstra 0442e1e699 Refactor options provider with DI support 2021-03-10 20:23:21 +01:00
Sipke Schoorstra 14bf27942a Provide icons for core activities 2021-03-10 15:11:51 +01:00
Craig Fowler 7f5a6228cf Resolve #728 - Fix ActivityExecuted persistence
The PersistWorkflow service will now handle ActivityExecuted
persistence behaviour, presumably as-intended.
2021-03-09 20:09:36 +00:00
Craig Fowler 8751bead5a WIP #728 - Make WorkflowBurst default behaviour
In the comments to #728 it was suggested that
WorkflowBurst persistence behaviour was a more
sane default.
2021-03-09 19:57:45 +00:00
Craig Fowler 32bcf9a751 WIP #728 - Add test cases for persistence
This also includes a change to the workflow used in the test-case.
There are quite complex reasons for this, as explained here:

  https://github.com/elsa-workflows/elsa-core/issues/728#issuecomment-794319236

The real crux of it is that the workflow must have an activity
which suspends it, and that activity that suspends the workflow
must not be the starting activity.  This is why I added an unused
set-variable activity as the starter.

This commit shows that the various persistence test cases _mostly_
work OK, with the one exception of ActivityExecuted.
2021-03-09 19:57:02 +00:00
Sipke Schoorstra 222d88c275 Add Retract endpoint 2021-03-08 15:14:02 +01:00
Sipke Schoorstra 972dd49139 Add Unpublish method to WorkflowPublisher 2021-03-08 15:14:02 +01:00
Sipke Schoorstra 62352e27ac Remove IsEnabled flag 2021-03-08 15:14:02 +01:00
Sipke Schoorstra 7481d3e08b Add Published notification 2021-03-06 22:04:30 +01:00
Sipke Schoorstra d7d7bd4a7e Add RunJavaScript activity 2021-03-06 13:41:52 +01:00
Sipke Schoorstra dc95276abb Update SendEmail activity property UI hints 2021-03-06 09:40:49 +01:00
Sipke Schoorstra 21ac6866ea Add multi-text control 2021-03-06 09:40:49 +01:00
Sipke Schoorstra 7f768f4b17 Update If activity to use expression editor input control for Condition 2021-03-06 09:40:49 +01:00
Sipke Schoorstra 4b33418cf7 Fix declarative composite activity definition to blueprint mapping 2021-03-04 21:52:23 +01:00
Sipke Schoorstra 6eadac5736 Improve javascript engine 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 8aa40f9f73 Handle re-scheduling of temporal events after (re-)indexing triggers 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 9e31439802 Fix JavaScriptExpressionHandler string conversion 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 3b7e5aff57 Add dropdown control 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 149916c73d Minor cleanup 2021-03-04 17:45:59 +01:00
Sipke Schoorstra bd23810972 Re-index workflow triggers when workflow definition gets published 2021-03-04 17:45:59 +01:00
Sipke Schoorstra b90e0c1a71 Implement workflow registry cache eviction upon workflow definition saving 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 59d2cf8239 Publish WorkflowDefinitionPublished event when publishing workflow definition 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 9cf13df50d Update TriggerFinder parameter naming 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 128705fd19 Make WorkflowBlueprintMaterializer resilient to missing properties 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 404339e097 Update TriggerIndexer to ignore deprecated IsEnabled flag 2021-03-04 17:45:59 +01:00
Sipke Schoorstra e15893bef2 WIP: Add JSON expression handler 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 1c948ba0e3 WIP: Improved code editor style and added check-list input editor 2021-03-04 17:45:59 +01:00
Sipke Schoorstra fe691f6d9c Refactor activity property type to UIHint 2021-03-04 17:45:59 +01:00
Sipke Schoorstra 1daed3c1c3 Update Startup activities 2021-03-03 11:42:35 +01:00
Sipke Schoorstra a14f7cc267
Expressions editor (#695)
* A functioning monaco editor

* Incremental work on intellisense

* Add Workflow Context Options settings to designer

* Rudimentary work on variables
2021-03-02 09:00:51 +01:00
Craig Fowler a0f0db4d54 WIP #564 - Removed reference/dependency from Elsa
Because the consumer must choose either Hangfire or Quartz impl
package, the main Elsa metapackage can no longer directly provide
Temporal activities.
2021-02-28 20:49:34 +01:00
Craig Fowler 77a8f5be52 WIP #564 - Rename Elsa.Activities.Timers
The project/NuGet package for common logic relating to
temporal actions has been renamed:
  Elsa.Activities.Timers → Elsa.Activities.Temporal.Common

Whilst large numbers of files are "changed" by this commit,
it's just a straight move to a new path.
2021-02-28 20:49:34 +01:00
Sipke Schoorstra 046cf53b06
Add WorkflowExecutionBurstStarting event to allow for persisting status changes before executing activities that potentially take a long time to finish (#666)
* Add WorkflowExecutionBurstStarting event to allow for persisting status changes before executing activities that potentially take a long time to finish

* Also persist workflow instance when burst is starting and behavior set to WorkflowPassCompleted
2021-02-25 15:43:12 +01:00
Sipke Schoorstra 3814ea6ff4
Update OutcomeResult to try a default connection via implicit "Done" outcome (#655)
* Update OutcomeResult to try a default connection via implicit "Done" outcome

* Add demo project for auto-connected activities
2021-02-24 14:29:56 +01:00
Craig Fowler b583c7f1a9
Resolves #485 - Add PurgeVariables functionality (#654)
* Trivial - Add VS Code workspace

* Trivial - Add VSCode build task & extra ignore

On GNU/Linux, auto-generated .directory
files should be ignored.

* WIP #485 - Boilerplate for unit test project

* WIP #485 - Add test coverage (Remove/RemoveAll)

* WIP #485 - Implement RemoveAll

* Remove redundant logic, covered by IDictionary

Per the following, the contract for a generic IDictionary,
the Remove method already deals with non-existent keys.

  https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2.remove?view=net-5.0#System_Collections_Generic_IDictionary_2_Remove__0_

* Resolve #485 - Add PurgeVariables methods

These are convenience methods upon ActivityExecutionContext
and WorkflowExecutionContext, consistent with their current APIs.

Also in this commit are tests for those simple methods.
There's a bit of test-scaffold as well included, such as:
* Autofixture Xunit2 integration
* New project for unit tests
* Customize attribute for avoiding crashes on Autofixture recursion
* Reusable specimen builder for creating IServiceProvider which
  resolves services from Autofixture
* Custonize attribute for a parameter to use that ^^ specimen builder
2021-02-24 14:29:03 +01:00
Sipke Schoorstra b2d6859331 Undo dictionary serialization processing 2021-02-22 16:27:43 +01:00
Sipke Schoorstra 05c15a2eaf Autogenerate switch case labels 2021-02-20 21:21:18 +01:00
Sipke Schoorstra f048e6d3ef
Refactor Switch builder API (#649)
* Refactor Switch builder API

* Remove unused namespaces
2021-02-20 20:47:56 +01:00
Sipke Schoorstra 0bf3fecf18 Rename IfElse to If 2021-02-20 15:56:32 +01:00
Sipke Schoorstra a29905bae2
Introduce AmbientActivityExecutionContext to support direct access to composite activity input properties from child activities (#648) 2021-02-20 15:23:39 +01:00
Sipke Schoorstra 15f1411838
Add support for scoped variables (#647) 2021-02-20 12:45:16 +01:00
Sipke Schoorstra 94dce2466b
Improve Finish activity (#646)
* Update Finish behavior to exit out of composite activities (including root workflows)

* Update Finish activity to evict contained scopes
2021-02-20 11:12:29 +01:00
Sipke Schoorstra 3f173d6468 Implement unwinding of Switch activity 2021-02-17 21:43:16 +01:00
Sipke Schoorstra a67f07ac70 Small ForEach builder API improvements 2021-02-17 21:42:42 +01:00
Sipke Schoorstra bc496ddcc3 Small Workflow Context API improvements 2021-02-17 21:42:09 +01:00
Sipke Schoorstra 3280570252 Add convenience overload to enqueue workflow by type 2021-02-17 21:41:25 +01:00