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

Display scheduled flows as such #301

Closed
ChristianLangmann opened this issue Nov 1, 2022 · 4 comments · Fixed by #304
Closed

Display scheduled flows as such #301

ChristianLangmann opened this issue Nov 1, 2022 · 4 comments · Fixed by #304
Labels
bug Something isn't working
Milestone

Comments

@ChristianLangmann
Copy link
Contributor

Scheduled flows are not displayed with a source, so they look like they are never called.
A scheduler can be either displayed as a source (though without path or config), or a flow could be marked (with an icon or a different color)

@manikmagar
Copy link
Owner

manikmagar commented Nov 1, 2022

Thanks for catching this. I think scheduler should be treated just like http:listener. The generated diagram should look similar to how a single flow with http:listener would look.

If the scheduler can be registered as a source in known-components, that can make it work without any code change. Scheduler belongs to the default mule namespace and those are not identified as such. I think letting known components identify components from the mule namespace can allow adding scheduler to the file.

@manikmagar manikmagar added the bug Something isn't working label Nov 1, 2022
@ChristianLangmann
Copy link
Contributor Author

Yes, thought about it. Problem could be that then probably all flows are triggered by the identical scheduler, because the scheduler doesn't have a sensible path. We could use the name, frequency or the doc:id, but the name/freq is often not unique, and the there is no point in printing doc:id as the path. Therefore I thought about handling scheduler as something different than a "normal" source.

@manikmagar
Copy link
Owner

Yes, Schedulers do not have any config or path. Doc id/name should not be used for anything except documenting. In general, the source graphical representations should stay consistent for all source elements. In general, schedulers with cron expression (with property placeholder) is a best/preferred practice. I think we could use the cron expression value as a path value. If any implementation doesn't use cron, then the diagram can at least help uncover that and move to cron for better representation in the diagram.

What do you have in mind for "something different than a "normal" source"?

manikmagar added a commit that referenced this issue Nov 6, 2022
Allow configuring core components in known components csv file and identifying corresponding components. Fixes #301 by rendering schedulers from mule core components.
manikmagar added a commit that referenced this issue Nov 6, 2022
Allow configuring core components in known components csv file and identifying corresponding components. Fixes #301 by rendering schedulers from mule core components.
@manikmagar
Copy link
Owner

manikmagar commented Nov 6, 2022

PR #304 adds the support for mule core components. Here is a rendered diagram for scheduler flows.

image

Scheduler element does not have any path-eligible attribute at the element level. Using scheduling-strategy -> cron -> expression will get enabled with #296 Allow Complex Path feature.

<scheduler doc:name="Scheduler" doc:id="8a2088ba-a947-438c-97e5-b124f4386b18" >
	<scheduling-strategy >
		<cron expression="${cron.expresion}" />
	</scheduling-strategy>
</scheduler>

@manikmagar manikmagar added this to the 0.10.0 milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants