Commit graph

80 commits

Author SHA1 Message Date
Sipke Schoorstra ebd6375f7f Implement workflow inbox cleanup service 2023-08-13 12:31:58 +02:00
Sipke Schoorstra af34276d60
Delete ActivityExecutionRecords when deleting workflow instances (#4324)
* Delete ActivityExecutionRecords when deleting workflow instances

* Enable Hangfire for testing, code formatting
2023-08-12 22:22:40 +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 95cefe631f
Bookmarks & Activity Instances (#4301)
* Add ActivityInstanceId to bookmark model

* Fix Telnyx activity resumption

* Fix missing activity instance ID forwarding to workflow inbox
2023-08-09 13:02:20 +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 c9ca4a121d
Workflow Inbox (#4292)
* Initial implementation of workflow inbox, submission and delivery

* Implement persistence providers

* Update EF Core migrations

* Rename Services to Stores in Dapper module

* Use default serializer for primitive arrays

* Update MongoDB provider to map BookmarkId to be primary key

* Implement MongoDB provider for activity execution logs

* Use EF Core by default

* Fix private JSON constructor logic
2023-08-06 17:03:36 +02:00
Sipke Schoorstra 0c8bbb935c Implement real time workflow update broadcasting using SignalR 2023-07-25 15:12:27 +02:00
Sipke Schoorstra a2a2b60d05 Update ActivityExecutionRecord model 2023-07-23 21:05:31 +02:00
Sipke Schoorstra e5e34c821b Add ActivityExecutionRecord entity, persistence and endpoints 2023-07-22 21:05:33 +02:00
Sipke Schoorstra d473f2354b Add ActivityName to execution log, remove FaultedAt instance timestamp 2023-07-21 17:52:52 +02:00
Sipke Schoorstra 72f4461ca3 Implement cascading deletion 2023-07-20 00:05:43 +02:00
Sipke Schoorstra 6ae59f06d6 Include activity version with execution log 2023-07-18 11:20:00 +02:00
Sipke Schoorstra 4d9ef959d4 Add paging support for skip + take format 2023-07-10 16:10:00 +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 8c701aa0a7 Implement activity execution log record sequence ordering
This ensures events are always stored in sequence, even if their timestamps are the same.
2023-07-09 12:36:33 +02:00
Sipke Schoorstra 0eea344406 Add ToolVersion field to workflow definition 2023-07-06 15:48:28 +02:00
Sipke Schoorstra ab4f28bc02 Add unique name query to workflow definition store 2023-06-30 20:56:37 +02:00
Sipke Schoorstra eabe853fe7 Add workflow definition count endpoint + unique name validation 2023-06-29 22:08:10 +02:00
Sipke Schoorstra a1ce26a35c Explicitly ignore WorkflowState type from EF Core 2023-06-28 23:24:30 +02:00
gurkanguran bc2b4e8fde
Mongodb implementation (#4127)
* Implemented MongoDb

* Use main entity models in mongodb

* Fixed object serialization issue

* Fixed issues caused by duplicate collection names

* Optimized count query

* Fixed the issues after merge

* Revert "Fixed the issues after merge"

This reverts commit 5568af60cfc107b8ee68fd4c89fbb02946f8a6a3.

* Use expression helper to solve mongodb query issue

* Handle null values during deserialization

* Moved MongoDb project to persistence folder

* Did some refactor and added type serializer for variable fix

* Modularize mongodb indices creation

* Fixed the build

* Implement variable serializer

* Update SQLite migrations

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2023-06-28 22:44:51 +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
Borja Fernández - Smartway Studio ff9310b0b4
Change StringData from nvarchar(2000) to NCLOB in oracle (#4159)
* Change StringData from nvarchar(2000) to NCLOB in oracle

* Update DbContext.cs
2023-06-23 18:39:28 +02:00
herblinernexxbizz 3aa05d1fed
V3 search workflows definitions and instances (#4123)
* search workflowdefinition

* filter workflowinstance

* also add version options

* initiate search field

* add search to workflowinstance

* extend search with description and definitionversionid

* make everything work for workflow definition and instance search
2023-06-12 10:44:33 +02:00
Sipke Schoorstra 6c1cca372c
Dapper persistence provider (#4109)
* Implement Dapper stores
2023-06-06 20:49:14 +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 923229bf91 Fix null reference exception in EF core provider 2023-05-28 16:40:48 +02:00
Sipke Schoorstra 63124bd9b5 Fix typo 2023-05-28 16:40:34 +02:00
Sipke Schoorstra 8d8a8679f7 Ad XML comments 2023-05-28 16:40:10 +02:00
Akash Jadhav cd187f93c1
Schema Name editable in V3 (#4072)
* add ElsaDbContextOptions

* set Schema from elsaDbContextOptions

* file rename

* add options as arg to DbContextOptionsBuilderExtensions

* add options to module extensions in Elsa.EntityFrameworkCore.MySql

* add options to module extensions in Elsa.EntityFrameworkCore.PostgreSql

* add options to module extensions in Elsa.EntityFrameworkCore.Sqlite

* add options to module extensions in Elsa.EntityFrameworkCore.SqlServer

* add validations

* update doc strings
2023-05-28 11:56:49 +02:00
Sipke Schoorstra 6f455f7e70
Update DSL implementation and integration (#4073) 2023-05-28 11:54:12 +02:00
herblinernexxbizz b9ac0e478e
add ordering to workflowdefinitions (#4040)
* add ordering to workflowdefinitions

* do default ordering ans sorting right
2023-05-15 11:36:59 +02:00
Sipke Schoorstra 47ed8e3571
Cleanup IActivity interface (#4010)
* Update activity names and descriptions

* Rename JS functions

* Make endpoint class internal

* Pre-create workflow instance ID when dispatching workflows
2023-05-08 22:38:59 +02:00
Sipke Schoorstra 307962c0f5 Revert "Simplify IActivity (#3991)"
This reverts commit ae9f4104c6.
2023-05-03 10:24:36 +02:00
Sipke Schoorstra ae9f4104c6
Simplify IActivity (#3991)
* Cleanup IActivity interface and update activity ctors

* Increase XML comment coverage
2023-05-02 20:05:36 +02:00
Sipke Schoorstra 6a0556cd2c Update RoleStore
No need for serialization (which in fact breaks this store) since we already use custom converters for the Permissions field
2023-04-28 15:40:35 +02:00
Sipke Schoorstra 10c721786a
Workflow Context Updates (#3933)
* Incremental work on context activity

* Add extensions to get and set context params

* Update polymorphic converter to handle objects serialized to primitives

* Add convenience factory methods for SetWorkflowContextParameter activity

* Add API endpoint to list available provider types

* Implement workflow context provider selection property panel

* Update context provider picker to be based on selected providers

* Make SendEmail support different types of input for To, Cc and Bcc fields

* Fix EF Core WorkflowDefinitionStore to use polymorphic serialization for metadata

* Add JS support for getting workflow contexts

* Add Installed Features endpoint

* Update polymorphic object converter to skip start array

* Update activity execution middleware to handle background execution

* Fix sample program to include activity middleware for contexts

* Comments and cleanup
2023-04-19 21:28:58 +02:00
Daxton Horspool 030e23f81f
#3890 Fixed Workflow Definition and Instance Browser Pagination (#3930)
* Fix WF Definition and Instance EF Impl.

Both Workflow Definition and Workflow Instance Browsers weren't paging correctly due to a missing Paginate IQueryable extension. Matched implementation detail for the Workflow Instance EF provider

* Workflow Instance browser persistence

Lookup settings are persisted in local storage for the workflow instance browser. Can be switched to session storage very easily, doesn't persist the search textbox value for now

* Workflow Definition browser persistence

Also added reset button for Workflow Instance settings, obviously resets everything to defaults and then persists
2023-04-19 10:28:14 +02:00
Sipke Schoorstra 943df3d274 Cleanup and refactoring WorkflowContext APIs 2023-04-18 00:00:46 +02:00
Sipke Schoorstra c8d87cd763
Simplify Proto.Actor bookmarks and triggers (#3917)
* Refactor HTTP route table population

* Update workflow definition EF store to use abstract IWorkflowInstanceStore

This decoupling is necessary, because the application might not be using EF Core, but e.g. Elasticsearch

* Move workflow state persistence to the default workflow runtime feature

* Update JS handler to provide access to variables during trigger indexing

* Configure Proto.Actor runtime with different workflow pipeline

* Add sample using Proto.Actor runtime

* Replace BookmarkGrain with DB based persistence
2023-04-17 15:23:05 +02:00
Sipke Schoorstra c3ed7e7865
Improve JSON serializationfor workflow state (#3913)
* Incremental work on WorkflowStateSerializer

* Update Flow HTTP Request activity to default to Done outcome

* Fix reference handling

* Fix polymorphic object converter

* Add comments

* Add support for registering type alias during DI setup via options

* Fix trigger and bookmark payload persistence

* Update sample model

* Add support for custom dictionary types

* Split general serializer options provider into focused serializer services

* Formatting

* Update migrations
2023-04-17 00:11:58 +02:00
Sipke Schoorstra 7a09944732
Refactor scheduling and background activity execution (#3884)
* Refactor background activity execution

* Refactor scheduler

* Remove Jobs module

* Add XML comments
2023-04-09 23:35:32 +02:00
Sipke Schoorstra a11a7c0a12 Cleanup 2023-04-02 19:19:12 +02:00
Sipke Schoorstra 30c4e5b1e7
Implement API key authentication (#3834)
* Implement API key storage

* Implement API key validation

* Implement EF Core providers
2023-03-26 23:53:17 +02:00
Sipke Schoorstra 32db4a75fd Remove oracle code for entities not part of the current DB context
Fixes #3804
2023-03-20 21:52:11 +01: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 d45f6f2f85 Fix delete workflow definition version 2023-03-12 20:59:11 +01:00
Sipke Schoorstra 297d6eaa65 Fix loss of input + variables 2023-03-08 19:39:56 +01:00