Commit graph

1036 commits

Author SHA1 Message Date
Craig Fowler 3943e64c70 WIP #738 - Add test coverage to replace big test
The large/complex test is now removed, replaced by
smaller/simpler unit tests for the individual units in
the overall process of getting triggers.
2021-03-19 19:45:16 +00:00
Craig Fowler 6700ac2402 WIP #738 - Simplify unit test
Now that the class is a little less complex, this
simplified unit test covers just what remains.
2021-03-18 21:22:19 +00:00
Craig Fowler 9ec698c7bc WIP #738 - Refactor a troublesome extension method
This extension method is quite complex and is frustrating
when a unit test passes-through it.  That's because extension
methods can't be mocked in tests.
2021-03-18 21:09:04 +00:00
Craig Fowler f00f02041a WIP #738 - Further refactor (remove loop)
This is pretty trivial really, it just cuts down on
indentation and moves the looping into a Linq
map (Select) which builds a collection and then
reduces it (SelectMany) to a flattened collection.

Also remove some needless await'ing.
2021-03-18 20:40:09 +00:00
Craig Fowler d9724e5267 WIP #738 - Refactor-out a further service
The triggers-for-activity-blueprint functionality
is quite complex just on its own, so I have moved this to
a new service.

Once again the integration test which is left behind proves
that it still does the same job.
2021-03-18 20:29:06 +00:00
Craig Fowler 654f3072d9 WIP #738 - Refactor some logic into services
This simplifies the unit a little and the test proves that
it still does the same thing overall.  Strictly speaking, this
is now an integration test.
2021-03-18 19:35:05 +00:00
Craig Fowler 1dee17b904 WIP #738 - Add test coverage for new service
This test passes, but as you can see it's
massive because of the complexity of what the
class has to do.
2021-03-18 18:54:23 +00:00
Craig Fowler 523c96a535 WIP #738 - Straight refactor to new service (SRP)
There's no logic change here at all.  I just moved a large function
out of the TriggerIndexer into a service of its own.
2021-03-17 19:47:58 +00:00
Sipke Schoorstra 0c15c94ea7
Telnyx Activities (#768)
* Fix liquid syntax for accessing activity output

* Initial scaffolding of Telnyx module + API changes

* Make Telnyx Notification activity blocking

* Implement Telnyx correlation

* Post workflow suspension tasks improvements

* Add Telnyx activities

* Add HangupCall and TransferCall activities

* Call activity improvements
2021-03-17 13:07:14 +01:00
Sipke Schoorstra 17e072a74e Post workflow suspension tasks improvements 2021-03-16 11:41:43 +01:00
Craig Fowler 994e55abe1
Merge pull request #756 from craigfowler/feature/748-multi-tenant-EntityFramework
Resolve #748 multi tenant entity framework
2021-03-14 14:34:20 +00:00
Craig Fowler 4bc3539c4d
Merge branch 'feature/elsa-2.0' into feature/748-multi-tenant-EntityFramework 2021-03-14 13:51:06 +00:00
Craig Fowler 2320d216f2
Resolve #683 - Tests to prove no exception (#758)
As stated in the comments for
  WorkflowMayContainDuplicateActivitiesIntegrationTests

These tests might not describe actually-desired behaviour.
If they begin to "get in the way" in future, then it would
probably be safe to remove them.
2021-03-14 14:38:58 +01:00
jdevillard 418cc85ba3
Add Azure Servicebus Topic Activities (Sender & Receiver) (#749)
* Add Service Bus Topic Sender & Receiver Activities

* Ability to manage simple "string" message

* Rename MessageReceived to  MessageQueueReceived  and SendMessage to SendQueueMessage

* Missing renaming bookmark , fix TopicWorker

Co-authored-by: jdevillard <jeremie.devillard@moskitos.fr>
2021-03-14 12:10:31 +01:00
Craig Fowler 4873aac316 Resolve #748 - Test coverage for EF Db Contexts
As well as providing a unit test which matches other persistence
provider tests (round-tripping a workflow instance), two other tests
are included here:

* When using the default DI registration extension method, this sets
  up pooling of DB contexts and so a resolved context will come from
  the pool.

* When using the non-pooled DI registration extension method, this
  sets up EF without pooling, which is more useful in a multi-tenanted
  environment.

There are also some other changes in this commit corresponding to
improving the tests.  Mainly de-duplicating logic & improving names.
2021-03-13 15:21:44 +00:00
Craig Fowler 7804e35d68 WIP #748 - Extend EF Core to support multi-tenant
This adds new elective functionality to EF Core persistence:
* Use non-pooled DB Contexts
* Allow control of (non pooled) DB Contexts service lifetimes
2021-03-13 12:59:43 +00:00
Sipke Schoorstra 6567f59fd4
Add Interfirst sponsore (#754)
* Add Interfirst sponsor logo
2021-03-12 17:29:25 +01:00
Sipke Schoorstra c790ff797a
Update README.md
Add Interfirst as a sponsor 🙏
2021-03-12 16:56:31 +01:00
Sipke Schoorstra 94d71c54f3 JavaScript engine type conversion improvements 2021-03-11 22:51:29 +01:00
Sipke Schoorstra 044caf533f MongoDB provider improvements 2021-03-11 22:50:50 +01:00
Sipke Schoorstra 422203ac36 Change syntax to get activity output using JS 2021-03-11 22:50:18 +01:00
Sipke Schoorstra efb27e73e5 Fix designer bg 2021-03-11 16:05:58 +01:00
Sipke Schoorstra 5df7621b5b Generate optimized tailwind css 2021-03-11 15:14:27 +01:00
Sipke Schoorstra 4a4961471a Implement Import feature 2021-03-11 14:51:17 +01:00
Sipke Schoorstra e66b410545 Implement Export feature 2021-03-11 14:51:17 +01:00
Sipke Schoorstra f61df66148
Activity editor tabs (#745)
* Add activity editor tabs

* WIP: Workflow Context activity tab

* Implement common activity settings
2021-03-11 11:28:19 +01:00
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 edc9a5ceda Remove unnecessary workflowDefinition construction in constructor of workflow editor component 2021-03-10 20:55:53 +01:00
Sipke Schoorstra 7075b6ae77 Auto-clean invalid connections 2021-03-10 20:50:06 +01: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 68675b685a Fix that icon components are reused 2021-03-10 20:01:20 +01:00
Sipke Schoorstra 14bf27942a Provide icons for core activities 2021-03-10 15:11:51 +01:00
Sipke Schoorstra f6cea85821 Package Monaco Editor worker initialization for easier reuse 2021-03-10 13:38:18 +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
Craig Fowler 2c79a9395c WIP #728 - Add test for in-memory persistence
This test case shows that in-memory persistence is
also affected.  It seems that that would mean that this
issue is not related to only a single persistence provider.

In fact, in retrospect this is not really a persistence
problem at all, but a problem with the test case.  More
information is available in the comments to #728.
2021-03-09 19:56:14 +00:00
Sipke Schoorstra 98798c8dfd Fix designer to insert new activities connected between Start and existing target 2021-03-09 14:08:16 +01:00
Sipke Schoorstra dee30999b4 Implement drag&drop to change connections 2021-03-09 13:49:22 +01:00
Sipke Schoorstra 6220a49708 Implement delete connection on click 2021-03-09 13:49:22 +01:00
Sipke Schoorstra bba0878de3 Implement persistence of manually created connections 2021-03-09 13:49:22 +01:00
David Peters 91675c987b EFCore sample able to use any provider 2021-03-08 22:10:17 +01:00
David Peters 69d2260333 Sqlite indicies 2021-03-08 22:10:17 +01:00
David Peters 3d12e8969a WIP: SQL Server cant't index nvarchar(max) fields 2021-03-08 22:10:17 +01:00
David Peters 006101499b postgres migration 2021-03-08 22:10:17 +01:00
David Peters 0aa2f7d8b0 added EFCore indicies 2021-03-08 22:10:17 +01:00
Craig Fowler b12a77b238 Merge branch 'feature/552-mongodb-serialization' into feature/728-WorkflowInstances-not-persisting
This brings some of the tests I was writing for #552 into
this branch.  That's where I first repro'd this problem and
I will begin my work based on that.
2021-03-08 19:05:59 +00:00