elsa-workflows / elsa-workflows/elsa-core

Watch Directory fires cast exception when retrying after error

Open
#3,744 3 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Repro steps:
1. create a simple workflow like this
1. Watch-Directory (every trigger is good, eg on file created)
2. Wait fo 20 secs
3. Finish
2. run the workflow
3. stop the process during the "Wait" step

When the service starts again, we'll receive the following exception

![image](https://user-images.githubusercontent.com/6443266/221924804-17a27fe1-6cce-492e-900f-7962e284ce76.png)

Checking the code I think the problem is here:

![image](https://user-images.githubusercontent.com/6443266/221925853-45fe67ba-4eb0-4563-8ded-e4cbc3776459.png)

probably it should be better with this:

![image](https://user-images.githubusercontent.com/6443266/221926078-7ba2501f-9600-4afb-ab32-93b675d64b1a.png)

If the fix is correct, I could open a quick PR.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.