Commit graph

90 commits

Author SHA1 Message Date
raymonddenhaan 4b151ff8af
Feature/cancel dispatched workflows (#5136)
* Made cancel API call dispatch the request

* Added ParentWorkflowInstanceId

* Recursively cancel child workflows

* Made single workflow cancellation include child workflows

* Updated migrations

* Processed comments
2024-03-27 12:07:55 +01:00
Raymond den Haan c1d0e7a0a2 Made loading workflows more robust 2024-03-14 16:08:30 +01:00
Sipke Schoorstra bb4a764eb8 Revert "Prevented overwriting of existing workflows (#5067)"
This reverts commit 2dcaab9bf8.
2024-03-13 20:43:34 +01:00
raymonddenhaan 2dcaab9bf8
Prevented overwriting of existing workflows (#5067) 2024-03-13 10:05:50 +01:00
Sipke Schoorstra f7b010a518
Add Unicode string serialization tests (#5064)
Added tests in `Elsa.Workflows.Core.UnitTests` and `Elsa.JavaScript.UnitTests` to ensure unicode string serialization works correctly. Added a shared `UnicodeRangeGenerator` for test data generation and updated project references accordingly. Renamed `WorkflowDefinitionActivityJavaScriptHandlerTests.cs` to `ToJsonTests.cs` to reflect the focused test purpose.
2024-03-12 19:31:39 +01:00
Marko Lahma bc3d6d9bbc Convert to use Central Package Management
* Add GitHubActionsTestLogger
2024-02-04 13:49:54 +02:00
Marko Lahma 68beb5c61f replace configureawait.props and frameworks.props with Directory.Build.props 2024-01-26 19:04:39 +02:00
jdevillard 9175322774
Add a more generic UIHandler to customize how inputAttributes can be handle by UI (#4688)
* add a more generic UIHandler to customize how inputAttributes can be handle by the ui

* Add IPropertyUIHandlerResolver and update PropertyUIHandlerResolver

Introduced a new interface, IPropertyUIHandlerResolver, to resolve UI options for a property. Refactored PropertyUIHandlerResolver to implement this interface and removed the unnecessary partial class structure. Also, cleaned up some unnecessary usings in various files for better code organization.

* Refactor variable name and description in InputDescriptor

The 'uISpecifications' variable in the InputDescriptor model is renamed to 'uiSpecifications' for better readability. Additionally, the associated comment was revised to explain that the dictionary is used by the UI.

* "Refactor codebase for improved organization and cleaner architecture"

The codebase has been significantly refactored, moving several classes to more appropriate namespaces for improved organization and cleaner architecture. This includes shifting UI hint handlers, activities, and memory-related components, amongst others. The changes should improve code readability and maintainability, but as this is a broad refactoring effort, thorough regression testing is advised.

* Add CheckList UIHint with associated handler and provider

This update introduces a new UIHint called CheckList to the Elsa.Workflows.Core. This includes the necessary handler and provider classes. The handler is registered in the WorkflowsFeature.cs, and the CheckList UIHint key has been added to the InputUIHints.cs. Various associated files have been created in both the Elsa.Api.Client and Elsa.Workflows.Core project to support this new UIHint.

---------

Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2023-12-26 18:56:29 +01:00
Sipke Schoorstra bec8cbc322
Target .NET 8 (#4660) 2023-11-27 11:26:16 +01: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 382dc4b124 Initial work on activity unit testing 2023-10-18 00:10:48 +02:00
Sipke Schoorstra 46c9a76259 Move input accessors to Jint service to control order 2023-08-22 14:59:31 +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 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 fad27d0fb0
Refactor composite activity input and scoped memory (#3815)
* Incremental work

* Enable control over when to include full compositie root

* Cleanup

* Update WorkflowDefinitionActivity

* Implement input as variables

* Delete unused class

* Remove less common types

* Rename ExpandoObject to JSON

* Implement variable scoping

* Remove parent/child relationship from MemoryRegister

* Add support for sending input to "trigger event" endpoint

* Add support for configuring input storage driver

* Remove unused namespace imports

* Auto-register activity types when running a workflow

* Fix missing variables from containers
2023-03-20 19:55:11 +01:00
Sipke Schoorstra 1a713b4619
Rename "services" to "contracts" and "implementations" to "services" (#3758) 2023-03-03 22:47:23 +01:00
Sipke Schoorstra 00bd3228f6 Restructure contracts vs services namespace 2023-03-03 14:48:05 +01:00
Sipke Schoorstra 9a23d82916 Fix test project 2023-03-03 10:40:53 +01:00
Sipke Schoorstra 1e407a9f70
Fix cyclic input argument evaluation (#3755)
* Prevent stack overflow when evaluating input arguments

* Shuffle test folders
2023-03-02 21:21:50 +01:00
Sipke Schoorstra 42ce946d64 Reset 2022-01-04 09:38:11 +01:00
Yopi Cahya 4933a2e81e
Upgrade all projects to .NET6.0 (#2616)
* Upgrade all projects to .NET6.0

* Add compatibility NET5.0

* Add compatibility NET Core 3.1

* Update appveyor.yml

* Update packages

* Update src/activities/Elsa.Activities.Http/Elsa.Activities.Http.csproj

Remove common Authorization package

* Update src/activities/Elsa.Activities.Http/Elsa.Activities.Http.csproj

reimplement fix for #1568

* reimplement fix for #1611

* add missing .netcoreapp3.1 references to persistence packages

* fix Jint reference

* change samples and tests to target .NET 6

* cleanup multi-targeting conditions in samples/tests

* revert Elsa and Elsa.Temporal.Common to .netstandard2.1 only

* Update docker files to use net6.0 SDK

* Fix docker poor performance on arm64

* Update Elsa.sln

* Update Elsa.Activities.RabbitMq.csproj

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
2021-12-26 22:31:35 +01:00
Sipke Schoorstra cea453cb4f Fix unit tests 2021-09-16 20:34:32 +02:00
Sipke Schoorstra 142b574481 Update packages 2021-09-16 20:25:38 +02:00
Sipke Schoorstra 6352372179 Update package references 2021-09-14 16:09:59 +02:00
Sipke Schoorstra 8255861842 Fix package downgrade error 2021-09-14 15:33:24 +02:00
Sipke Schoorstra 1ee631b397 Deal with some warnings 2021-08-31 21:30:47 +02:00
Rafael Carnucci e316ca6c80 Added TenantId in IStartsWorkflow.StartWorkflowAsync and IWorkflowFactory.InstantiateAsync 2021-07-26 19:38:47 +02:00
Sipke Schoorstra 9ec82d9293 Refactor Output handling 2021-06-14 14:10:03 +02:00
Sipke Schoorstra 0c79bac321 Updated some namespaces 2021-06-14 14:10:03 +02:00
Sipke Schoorstra 8a18a85e26 Organize folder structure a bit more 2021-06-14 14:10:03 +02:00
Sipke Schoorstra c5facf0ff5 Organize folder structure a bit 2021-06-14 14:10:03 +02:00
Sipke Schoorstra 3d623b94e1 Improve bookmarking API and add Event Received activity 2021-05-31 10:01:33 +02:00
Sipke Schoorstra 899551463e Refactor workflow collection and execution 2021-05-16 21:05:34 +02:00
Sipke Schoorstra 400a862f96 Cleanup: remove unused namespaces 2021-05-13 11:31:38 +02:00
Sipke Schoorstra cb94f4dde5 Update packages 2021-05-10 22:19:29 +02:00
Sipke Schoorstra 1febb9a211 Handle DateTime parsing for UTC strings 2021-05-05 13:13:05 +02:00
Craig Fowler 951904a643 WIP #777 - Add test coverage to repro issue
The test coverage here actually proves that for Liquid expressions,
the issue has already been fixed as part of other work.  Specifically
it was fixed in 2a22a328c4 in the
class StringExtensions.cs
2021-04-26 21:13:14 +02:00
Sipke Schoorstra d9094575fd Remove unused namespaces 2021-04-16 12:48:06 +02:00
Sipke Schoorstra ae46e0e143 Update packages and accommodate for breaking changes 2021-04-07 14:48:30 +02:00
Sipke Schoorstra ce957b95e7 Cleanup 2021-04-07 13:13:13 +02:00
Craig Fowler 8413cb0e55
Merge pull request #834 from craigfowler/composable-autofixture-attributes
Add composable autofixture attributes
2021-04-02 21:04:18 +01:00
Sipke Schoorstra a6d05cfce0 Remove StringValuesModel
Deserialization causes problems when a value is a single string
2021-04-02 16:52:31 +02:00
Craig Fowler 2e3aef2740 Merge remote-tracking branch 'elsa-core/feature/elsa-2.0' into 751-postgres-yessql-exception 2021-04-02 13:46:13 +01:00
Craig Fowler 7044e69231 Refactor one test to use new Autofixture resolution attribute
This change means that a service provider may use both the Frozen
specimen builder and also the 'with autofixture resolution' behaviour.
That means that some unwanted extra logic in the test may now be
removed, with the test objects also coming from Autofixture.
2021-04-02 13:29:46 +01:00
Craig Fowler 282c90f80f Further fixup & refactoring of Autofixture attribs
This now also includes reworking the attribute which activates
Autofixture-style resolution upon an IServiceProvider.
This has now been renamed to WithAutofixtureResolutionAttribute.

The new/reworked attribute is composable with other Autofixture
attributes.
2021-04-02 13:28:27 +01:00
Sipke Schoorstra 881f0acb7a Fix tests 2021-04-02 12:43:14 +02:00
Sipke Schoorstra 23e3d1fd81 Fix JavaScriptExpressionsIntegrationTests 2021-04-02 12:43:14 +02:00
Sipke Schoorstra 38be994e31 Break up WorkflowRunner into smaller types and extracted reusable trigger logic 2021-04-02 12:43:14 +02:00
Sipke Schoorstra 5796cf2893 Fix warnings and formatting 2021-04-02 12:43:14 +02:00