Commit graph

930 commits

Author SHA1 Message Date
Craig Fowler e340a37d93 Resolve #486 - Signal input is emitted as output
It actually turns out that no change is required to the SignalReceived
activity in order to achieve this.  As these unit tests prove & document,
that is already the current behaviour.
2021-02-27 20:00:54 +01:00
Craig Fowler 2620905828 Bump version for NuGet preview7
This is not so much about formally launching a
package, it will complete the testing of #664.

Part of that ticket can only be tested by pushing
a tagged commit to the 2.0 branch.
2021-02-27 16:02:53 +00:00
Craig Fowler 76588089a2 Follow-up #665 - Fix version number
This means that SonarCloud will display the correct version
number for each analysis now.
2021-02-27 15:32:55 +00:00
Craig Fowler e9d00e6b21 Follow-up to #665 - Put 'pack' step into after_test
The before_package step doesn't seem to be run, despite being
documented at https://www.appveyor.com/docs/appveyor-yml/

I've moved this step to after_test, which will work just fine.
It's just frustrating that really it's got nothing to do with testing.
2021-02-27 15:00:40 +00:00
Craig Fowler 917444c8c9 Resolve #665 - Fix project name 2021-02-27 14:38:42 +00:00
Craig Fowler a5c84f2b91 Merge branch 'feature/665-SonarCloud' into feature/elsa-2.0 2021-02-27 14:36:28 +00:00
Craig Fowler 622ff1ad5f WIP #665 - Add changes to YML in order to trigger SonarScanner
The main things going on here in the YML are:
* Adding some env vars for SonarScanner
* Adding the SonarScanner package as a build tool
* Adding before-build/after-test steps to setup/teardown SonarScanner
* Separating the "pack" step from the "build" step
  * Pack moved to before-package which occurs after tests pass
  * See https://www.appveyor.com/docs/build-configuration/#build-pipeline
* Tests run with logging & code-coverage detection
* Test results are added as AppVeyor artifacts
2021-02-27 14:33:58 +00:00
Craig Fowler df83b9a1de WIP #665 - Beginnings of SonarCloud integration
Adds an XUnit test logger to each test csproj
file (will be used by test script).

Also add a skeleton SonarCloud analysis config file with a couple
of settings for starters: Don't analyse exception classes or samples
for coverage.
2021-02-27 14:33:45 +00:00
Craig Fowler 8d4339f4b0 Revert "Merge branch 'feature/665-SonarCloud-integration' into feature/elsa-2.0"
This reverts commit 3dc1b79b3b, reversing
changes made to 1dbafd8ba2.

The previous merge of work on #665 broke the build so this commit
reverts it back out.
2021-02-27 13:58:06 +00:00
Craig Fowler 3dc1b79b3b Merge branch 'feature/665-SonarCloud-integration' into feature/elsa-2.0 2021-02-27 13:45:59 +00:00
Craig Fowler a1a812a159 WIP #665 - Add changes to YML in order to trigger SonarScanner
The main things going on here in the YML are:
* Adding some env vars for SonarScanner
* Adding the SonarScanner package as a build tool
* Adding before-build/after-test steps to setup/teardown SonarScanner
* Separating the "pack" step from the "build" step
  * Pack moved to before-package which occurs after tests pass
  * See https://www.appveyor.com/docs/build-configuration/#build-pipeline
* Tests run with logging & code-coverage detection
* Test results are added as AppVeyor artifacts
2021-02-27 12:44:22 +00:00
Craig Fowler 8deb1a1f56 WIP #665 - Beginnings of SonarCloud integration
Adds an XUnit test logger to each test csproj
file (will be used by test script).

Also add a skeleton SonarCloud analysis config file with a couple
of settings for starters: Don't analyse exception classes or samples
for coverage.
2021-02-27 12:41:55 +00:00
Sipke Schoorstra 1dbafd8ba2
Update README.md 2021-02-26 17:16:27 +01:00
Sipke Schoorstra 30c8b7d1c6 Add preview banner 2021-02-26 17:16:17 +01:00
Sipke Schoorstra d2d402f167 Update readme with new banner
# Conflicts:
#	README.md
#	design/github-social-preview-banner-for-elsa.psd
2021-02-26 17:14:16 +01:00
Sipke Schoorstra 0935e6bbc6 Add 512x512 png version of logo 2021-02-26 11:32:08 +01:00
Jens Willmer 5ea9afb87e Time since option 2021-02-26 11:29:55 +01:00
Jens Willmer ab842d9193 Fixed code highlighting and auto complete 2021-02-26 11:28:55 +01:00
Sipke Schoorstra f6dad09c7b
Update README.md
Add Discord shield
2021-02-26 10:44:31 +01:00
Craig Fowler ddcb3878f8 WIP #664 - De-duplicate in-use parts of YML
This is a bit of naughty scope-creep on that issue.
I noticed that there's some further parts of the YML which
are duplicated between the two v2 sections of the YML.

It seems that the intent is mainly about deploying to MyGet on
every build (in the appropriate branch) but only deploying to NuGet
if building from a tag.  Also, the actual build steps between these two
seem to be out of sync.

I've switched to a more concise way of achieving this same result,
which allows me to de-duplicate the two build configs so they're using
the same build process.

The only other real thing I did there was sneak in the autocrlf git
setting.  It's just a good idea on Windows to avoid being caught out.
2021-02-25 20:20:59 +01:00
Craig Fowler 39a64a3b00 Trivial - fix URL for README badge
It was irking me that when I clicked on the badge to get
to the latest CI build, I'd get an error that the project didn't exist.
Fixes the URL to AppVeyor to see the latest build.

This also fixes the status image to the v2 branch.  Once v2 is in master
that querystring param fixing it to a branch should be ditched.
2021-02-25 20:20:59 +01:00
Craig Fowler c2c831b625 WIP #664 - Remove redundant build config
Also clarify the comments for the two remaining ones.
2021-02-25 20:20:59 +01:00
Sipke Schoorstra be718db55d Update WorkflowPersistenceBehavior in client package 2021-02-25 15:57:30 +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 5584ccfc90 Add sample project demonstrating invoking workflows from controllers 2021-02-25 13:33:14 +01:00
Craig Fowler f34409696d
Should resolve #653 - Reinstate tests in CI process for v2 branch (#658)
* WIP #653 - Delete two tests

These two couldn't easily be fixed, in both cases they were
integration tests which involved passing through many classes.
It wasn't immediately clear what needed to be done to fix them.

As noted in the issue description, removing them was an
acceptable fix.

* WIP #653 - Fix a failing test

I split this test into two.  Per the discussion at:
  https://github.com/xunit/xunit/issues/350
XUnit seems quite opinonated about not having assertion messages.
Thus, without changing assertion library (which deserves discussion
before I just do it), the logical next best thing is to split into two
single-assert tests, so it's clear which assertion failed on a test
failure.

Also, I moved the AutoMoqData attribute to the shared test lib, so
that it can be used anywhere.  That allowed me to eliminate the
constructor for this test class, except for initialising the base class.

* Provisionally resolve #653 - reinstate tests in CI

This should complete the issue although we need to see a
passing CI build with this code change before we can say
it's done.

* Provisionally resolves #653 - Add test script
2021-02-25 09:24:00 +01:00
Sipke Schoorstra 3bf5237328 Fix solution file 2021-02-24 14:50:29 +01:00
Sipke Schoorstra dac7295969 Merge branch 'feature/unwind-any' into feature/elsa-2.0 2021-02-24 14:44:18 +01:00
Sipke Schoorstra 9f4f1ab055 Fix solution file 2021-02-24 14:37:28 +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
Sipke Schoorstra df72728cc1 Merge branch 'feature/elsa-2.0' into feature/unwind-any 2021-02-24 14:29:37 +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 e181e6b927 Add demo project for auto-connected activities 2021-02-24 14:15:10 +01:00
Sipke Schoorstra e0ac05f5f4 Update OutcomeResult to try a default connection via implicit "Done" outcome 2021-02-24 14:14:45 +01:00
Sipke Schoorstra b2d6859331 Undo dictionary serialization processing 2021-02-22 16:27:43 +01:00
Sipke Schoorstra 7aa299553b Formatting 2021-02-21 11:00:35 +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 49108a9544 Add missing bindings project 2021-02-20 15:42:49 +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 88f950a70a Fix solution file 2021-02-17 21:52:46 +01:00
Sipke Schoorstra a8fe51d15e Update samples 2021-02-17 21:47:28 +01:00
Sipke Schoorstra 7e33f7d23a Update samples 2021-02-17 21:43:56 +01:00
Sipke Schoorstra ce7222af28 Small MongoDB provider improvements 2021-02-17 21:43:42 +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