OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.23k stars 2.34k forks source link

On workflow module optimisation #16107

Open hyzx86 opened 1 month ago

hyzx86 commented 1 month ago

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

To date, we have collected a number of questions and suggestions for the workflow module Below I've summarised and collated these encounters, and we've tried to consolidate them into one PR as much as possible, as separating them into different PRs may require multiple changes to the multi-table structure, and may also require the introduction of many destructive updates

Workflow support for versioning, including audit information

Other enhancements

Workflow Type

Workflow Instance

If there are any other suggestions, please add them.

Describe the solution you'd like

I am currently trying to implement these changes in PR https://github.com/OrchardCMS/OrchardCore/pull/16043

giannik commented 1 month ago

@hyzx86 also a description field for the workflow type definition would be usefull (along with display name).

hyzx86 commented 1 month ago

@hyzx86 also a description field for the workflow type definition would be usefull (along with display name).

Yes, I agree, it could be used to keep some change logs or business notes or something like that.

giannik commented 1 month ago

@hyzx86 also a description field for the workflow type definition would be usefull (along with display name).

Yes, I agree, it could be used to keep some change logs or business notes or something like that.

Basically from list of workflows to see and remember what it does and the outcomes so you dont have to look into the designer to recall what its doing.

hyzx86 commented 1 month ago

Basically from list of workflows to see and remember what it does and the outcomes so you dont have to look into the designer to recall what its doing.

That would be DisplayName. 😁

giannik commented 1 month ago

the display name would : Display name : Front end Contact form submission The desription would be :

handles submissions from form http://mysite.com. Sends emails to moderator and integrates with crm bla bla....

Display name is something short and description expands more.

hyzx86 commented 1 month ago

Hi @Piedone ,In addition to using x6 as a process designer, we may need a json driven form designer for dynamic form generation, I would recommend amis. Do we have any limitations or rules regarding the introduction of external packages?

giannik commented 1 month ago

@hyzx86 personally i would not change anything else apart from replacing js plumb with x6 . changing the activity UI forms to depend on a javascript library is not something i would prefer.

hyzx86 commented 1 month ago

@hyzx86 personally i would not change anything else apart from replacing js plumb with x6 . changing the activity UI forms to depend on a javascript library is not something i would prefer.

This is not that simple. First of all, our current workflow node editing is based on form submissions, and we want to refactor it to SPA, so we first need to change the way each node is saved from a per-submission to the server to a client-side staging. In addition, I'd like to enhance the workflow node editing to support multiple methods, like elsa-core workflow, make the Activity Node support plain text, liquid expressions, and js expressions. My plan is to abstract the process node definitions in c# code, generate a json structure, and then have the front-end components build the required UI. We can use amis or any other front-end component to generate the edit form.

giannik commented 1 month ago

......., and we want to refactor it to SPA, .....

why have you come to a conclusion that we need to refactor it to a SPA ?

hyzx86 commented 1 month ago

why have you come to a conclusion that we need to refactor it to a SPA ?

This is a change based on workflow versioning, as currently every time a workflow node is saved the entire workflow type is directly submitted and saved to the database

giannik commented 1 month ago

and why is that a problem ? just save the entire workflow json and do a diff evalutaion of the changes . content item versioning works the same.

hyzx86 commented 1 month ago

Whenever we click on the Save button of a workflow node, a new version of the workflow type is generated, if when you need to create a workflow definition with 20 nodes, then at least 20 versions will be generated

Piedone commented 1 month ago

Hi @Piedone ,In addition to using x6 as a process designer, we may need a json driven form designer for dynamic form generation, I would recommend amis. Do we have any limitations or rules regarding the introduction of external packages?

I don't think we have anything formalized, but I'd say they need to have a license compatible with OC's, actively developed, have a sufficiently high quality, and with everything available in English (as well).

github-actions[bot] commented 1 month ago

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.