Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observability of workflow lifetime #208

Closed
kpko opened this issue Dec 9, 2018 · 5 comments
Closed

Observability of workflow lifetime #208

kpko opened this issue Dec 9, 2018 · 5 comments

Comments

@kpko
Copy link

kpko commented Dec 9, 2018

Hi,

first of all, thank you for your relentless work on the library and keeping up with issues and pull requests. 👍

I've already commented on #162, but this is really a separate issue, so for the sake of order I would like to describe the other feature request I mentioned in the comment.

I'm currently working on a project that would benefit from a workflow engine like WorkflowCore. Our users should have the possibility to design workflows using a graphical designer and watch the progress while executing them similar to Microsofts Flow user interface, either executing a long-running workflow over time or a shorter workflow that runs synchronously in a single HTTP call.

To integrate WorkflowCore we would need a method to subscribe to workflow lifetime events like WorkflowStarted, WorkflowCompleted, StepStarted, StepCompleted, StepFailed to show the workflow progress in our UI.

In #162 @Kahbazi provided a pull request that added an event bus to the workflow host. Something like this would solve this issue but I don't know the internals of the library well enough to evaluate the implementation.

In #18 there was a similar request where you recommended the ExecutionPointer table. I would argue for a solution that is independent of the storage as we're using MongoDB in our project and I think high intensity polling wouldn't be that great.

What are your thoughts on this? If you want to pursue the implementation of an event bus to observe running workflow instances, I would love to help.

@danielgerlag
Copy link
Owner

See PR #215
Let me know your initial thoughts, still a work in progress

@kpko
Copy link
Author

kpko commented Dec 17, 2018

Hi Daniel,

this looks great. I can't wait to dig into the pull request throughout the next days. Is there any chance we can include events regarding workflow steps like StepStarted, StepCompleted and StepError?

As soon as this PR is merged I will look into a RabbitMQ-based EventBus to support multi-node clusters.

@danielgerlag
Copy link
Owner

There is an event for StepError, and adding StepStarted and StepCompleted is trivial... I was just hesitant because this will generate a lot of events... perhaps it should be configurable?
Also, I will need to make the calling of whatever implementation of Publish to be async, as this could have the effect on slowing everything down.

@kpko
Copy link
Author

kpko commented Dec 20, 2018

That being configurable sounds great.

Could we decouple the publishing of the events from producing them? I'm thinking of a queue that gets consumed in a separate thread, grabs events and publishes them.

@kpko
Copy link
Author

kpko commented Dec 31, 2018

Daniel resolved this with the release of 1.6.9 - I'm thrilled to start 2019 with this :) Thanks again!

@kpko kpko closed this as completed Dec 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants