Exception Body in ExecutionError
Hi Daniel,
first of all thanks for that great peace of work. Really really helpful!
I just wanted to ask if it would be possible to extend the ExecutionError model with one column containing the complete exception body and not only the ex.Message.
Despite that, i asked myself, if it would make sense to inject some kind of action processor / provider. That way the tasks could be submitted to one execution thread (one thread that all my other repository actions use) in a controlled manner.
Otherwise, in my understating, the tasks get submitted to the System Thread Pool and needs safety handling.
Does that make sense?
Regards
Sorry for the delayed response...
You can have the IoC container inject dependencies into each step by simply registering the step and any dependencies in the ServiceCollection... if you register them as Transient then a fresh instance will be created for each execution of each step and you won't need to worry about thread safety of the services that a particular step depends on... I will try post an example of this on the weekend.
With regard to adding fields to the ExecutionError object, if you want to submit a PR for that, I will gladly merge it in but it's not a priority in terms of my current work queue.
If you could provide an example for the injection that would be great. I have a general idea but I'm not sure if I have to inherit a certain class.. I think i'm going to work on the Column in the next days.
Sorry for the delayed response, does this help?
https://github.com/danielgerlag/workflow-core/tree/master/src/samples/WorkflowCore.Sample15
Ah that looks pretty simple. I can use a new service to expose a certain consumer thread and the steps, still running in the threadpool would then just post actions in this consumer thread. I'm going to test that, the design of the engine is indeed really flexible.
Thank you for your detailed explanation!