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

Use ELSA-Core workflow #13652

Open
MikeAlhayek opened this issue May 4, 2023 · 27 comments
Open

Use ELSA-Core workflow #13652

MikeAlhayek opened this issue May 4, 2023 · 27 comments
Milestone

Comments

@MikeAlhayek
Copy link
Member

Is your feature request related to a problem? Please describe.

ELSA-Core provides an improved UI for workflow. The implementation is very similar to OrchardCore so the change should not be dramatic.

https://github.com/elsa-workflows/elsa-core

@MikeAlhayek
Copy link
Member Author

@sfmskywalker maybe you would be interested in creating this PR?

@jtkech
Copy link
Member

jtkech commented May 4, 2023

The implementation is very similar to OrchardCore so the change should not be dramatic.

We would have to take care about what we have introduced like, as I remember, distributed locking and recursion checking.

@hyzx86

This comment was marked as outdated.

@sfmskywalker
Copy link
Member

@MikeAlhayek You mean a PR for updating the Orchard Core's workflow designer with that of Elsa? Or replace its engine as well?

In any case, I am working on a small Orchard module that integrates Elsa 3. It works, but there are some challenges that I need to go through still:

  1. Colliding Monaco
  2. Elsa 3 uses FastEndpoints - how does it behave in a multi-tenant environment? I am considering moving the Elsa 3 endpoint implementations to mediator-like handlers, and then have the OC module expose its own set of API controllers and invoke these handlers (to maximize code reuse).
  3. CSS bleed - I need to add some CSS rules to prevent OC / Bootstrap styles from bleeding into the designer, which makes it looks not so attractive at the moment.
  4. The OC module, ideally, provides the same set of activities currently found in the OC Workflows module as well as other modules that take a dependency on the OC Workflows module. The downside here of course is that when users use the Elsa OC module, it might add many other modules as dependencies. But these arre just package dependencie; feature-wise, I would group them into separate startup classes.

Challenge number 4 would dissappear if the OC Workflows module would be updated to leverage the Elsa packages of course. Perhaps this might be an option once the Elsa OC module proves effective.

@MikeAlhayek
Copy link
Member Author

@sfmskywalker we had a discussion about improving workflow in OC with @sebastienros. He mentioned ELSA. I like the UI used by ELSA as it provide better guidance during the design. I don't know all the differences between ELSA 3 and OC workflow. It's my understanding that the foundation/services are the same.
I think we would replace the OC package with ELSA as long as it does not break everything we already have implemented from activities and tasks.

Here are some things we can improve in OC
It would be nice to have a starting point on the UI so it's more use friendly. The first node would exists asking the user to add first event to design the workflow.

image

Also, I think it would be nice if we can have some sort of activity dependencies like activity X would be applicable unless activity B happened. For example, you can't apply Form Validation task, before for submitting for task.

Having to stay on the same page when designing a workflow is nicer from a user perspective.

@sebastienros may have more feedback on weather we should depend on ELSA package or just design OC UI to match what ELSA is doing. But I think if the core components/services are the same, I would think using ELSA package may not be a bad idea.

@sfmskywalker
Copy link
Member

It's my understanding that the foundation/services are the same.

In spirit, they are similar, but a lot has happened in the past 4 years or so ;)

as long as it does not break everything we already have implemented from activities and tasks.

It would break all existing workflow definitions and instances out there, unfortunately.
V2 and V2 workflow definition schema are not 1-1 when compared to OC's workflow schema.

It would be nice to have a starting point on the UI so it's more use friendly. The first node would exists asking the user to add first event to design the workflow.

This is true. Elsa 3 doesn't have this anymore, but I'd like to add it back, even if only as a configurable option.

Also, I think it would be nice if we can have some sort of activity dependencies like activity X would be applicable unless activity B happened. For example, you can't apply Form Validation task, before for submitting for task.

That's a very neat idea, although I wonder about its feasibility. In Elsa, for example, you could have the "Form Validation" activity a few steps ahead of the "Form Submitted" event. And perhaps the user decided to have its own version of a "Form Submitted" event, and wants to use a dynamic expression in the "Form Validation" activity to validate.
I might have misunderstood you, of course, and if not, I might simply be wrong.

Having to stay on the same page when designing a workflow is nicer from a user perspective.

💯

But I think if the core components/services are the same, I would think using ELSA package may not be a bad idea.

I'm afraid it would be a complete and total breaking change. Therefore, the best course of action might be to add it as a new module, allowing users the choice which one to use. And possibly, we can find a way to increase code reuse from existing OC activities as much as possibly.

One idea could be to have the existing activities start implementing Elsa interfaces. Another idea might be to have an Elsa Activity Provider that discovers the OC activities, return activity descriptors that delegate to the OC activity's functionality.

I'm working on a small PoC to explore this in more detail, here: https://github.com/elsa-workflows/elsa-orchard-core/tree/v3

@MikeAlhayek
Copy link
Member Author

@sfmskywalker I think creating a module with a new UI would be good to have the option to choose which interface to use.

But, I think if ELSA 3 is actively being developed and maintained, it may make sense to use their component even if it comes with breaking changes. The benefit here would be that we can still provide powerful workflow in OC with Elsa community's support. You may want to join our triage call in about 50 mins and talk about it. I am sure @sebastienros will provide better feedback of the path of the project.

@sfmskywalker
Copy link
Member

Sure, I'd be happy to attend today's call and discus this further. See you in a few minutes.

@agriffard
Copy link
Member

Sure, I'd be happy to attend today's call and discus this further. See you in a few minutes.

No triage meeting today.

@sfmskywalker
Copy link
Member

Alright, some other time then.

@MikeAlhayek
Copy link
Member Author

Sorry that the meeting today was cancelled. Hopefully you can join our next meeting Tuesday 12PM PST or Thursday 10AM PST.

@sfmskywalker
Copy link
Member

No worries! I’ll try and join the call next Tuesday.

@hyzx86
Copy link
Contributor

hyzx86 commented May 18, 2023

Having to stay on the same page when designing a workflow is nicer from a user perspective.

A JSON-based low-code front-end framework is recommended and should be useful for node configuration forms for the workflow module.

I've used it for several pages in OC and it works well with the OC style

Repository :
https://github.com/baidu/amis

Document address (currently only in Chinese, it is recommended to use browser translation):
https://baidu.github.io/amis/zh-CN/docs/index

Page editor demo:
https://aisuda.github.io/amis-editor-demo/#/edit/0

image

@hyzx86
Copy link
Contributor

hyzx86 commented May 18, 2023

Sorry that the meeting today was cancelled. Hopefully you can join our next meeting Tuesday 12PM PST or Thursday 10AM PST.

Hi @MikeAlhayek
Will there be a replay of the meeting?

@MikeAlhayek
Copy link
Member Author

I am sure it'll be published soon. @Piedone do we know when we he previous meeting will be published?

@Piedone
Copy link
Member

Piedone commented May 18, 2023

@domonkosgabor?

@domonkosgabor
Copy link
Contributor

@MikeAlhayek After @sebastienros sends it to me. :D

@hyzx86
Copy link
Contributor

hyzx86 commented May 28, 2023

Thanks for sharing
https://www.youtube.com/watch?v=bHN118JfaKk

@MikeAlhayek
Copy link
Member Author

@sfmskywalker I just want to share some minor suggestions on the ELSA UI (which is bountiful already)

  1. Make modal dialogs scrollable so they don't overflow out of the screen.
  2. Make the list of activities buttons smaller to reduce the length. Maybe even reduce the margin-bottom on the buttons.
  3. In the Information section (bottom right), there is extra margin-bottom that you could remove to eliminate wasted real estate.
  4. In the workflow journal, maybe first column should be the event/activity name instead the time.

@sebastienros sebastienros added this to the backlog milestone Jun 8, 2023
@jeanbaptistedalle
Copy link

Hi everyone, my company and I built our solution on OrchardCore and we are very enthusiastic about Elsa Framework, especially since we saw the demo made during Orchard Harvest 2023. We wish to know what is the current status of this milestone, if someone already works on it and if it's the case, who, to collaborate with him/her ? If that's not already launched, how we can contribute to add modules for Elsa Workflow ? That will be our first contribution on OrchardCore so we wanted to do it right ! I found the repo https://github.com/elsa-workflows/elsa-orchard-core on elsa-workflow but not very sure if something newer was already developed.

@sfmskywalker
Copy link
Member

sfmskywalker commented Aug 10, 2023

@MikeAlhayek Thank you for the great feedback! A lot has changed since you sent that message. More specifically, the entire dashboard has been redone with a Material Design library called MudBlazor. I would love to hear your feedback on that whenever you get a chance to try it out. The repo for Elsa Studio can be found here.

@sfmskywalker
Copy link
Member

@jeanbaptistedalle As the author of Elsa Workflows, it makes me very happy to hear that you like it!

The Orchard Core integration module is currently of "proof of concept" quality.
What remains to be done for it to be MVP is:

  • Integrate with OC security. Right now, you would have to configure the workflow server to accept anonymous requests.
  • Although not strictly necessary, we should implement Elsa persistence providers using the YesSQL library, just like other real OC modules.
  • Replace the stencil bits with the reusable elsa-studio-wasm NPM library, which contains reusable custom elements that wrap the Blazor components from Elsa Studio.
  • Expose more components and attributes from the aforementioned npm package such as the workflow instance viewer.

I am probably missing a few details, but I think these are the most crucial ones.

Please feel free to let me know if you want to hop on a call and talk through these things in more detail if you want!

@hyzx86
Copy link
Contributor

hyzx86 commented Sep 6, 2023

@sfmskywalker
I found that Antv includes an xflow repository that has integrated some workflow interactions

https://xflow.antv.vision/zh-CN/docs/tutorial/solutions/flow
image

@sfmskywalker
Copy link
Member

@hyzx86 Awesome, thanks for pointing me to this!

@MikeAlhayek
Copy link
Member Author

@sfmskywalker is there any traction on this? Last time I saw your demo and it was pretty close. If you don't mind, can you please share the current status. Are you still actively working on this?

@sfmskywalker
Copy link
Member

Hi @MikeAlhayek , no work has been done since then, but it is still on my todo list.

@MikeAlhayek
Copy link
Member Author

MikeAlhayek commented Apr 19, 2024

Hopefully your next call to ToDo.Dequeue() returns this task... at least before the 2024 Conference :) Thanks for the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants