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

feat(converter): transform bpmn model into algorithms model #20

Merged

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Apr 29, 2020

Depends on #22: to get the AsciiExporter

This PR let you load a BPMN file, pass data through the algorithm and export the result to an ASCII or SVG file.
The BPMN output export will be manage in another PR as it requires extra conversion from internal model to BPMN.

Notice that this is the initial support for BPMN load, there is no management of lane or laneset. This should only work with process without such elements.

Here is the SVG render when loading the A.2.0.bpmn file from BPMN-MIWG

BPMN render SVG export

Covers #13

@tbouffard tbouffard force-pushed the feat/gh-13-transform_bpmn_model_into_algorithms_model branch 4 times, most recently from c971707 to c59575c Compare May 1, 2020 09:21
@tbouffard tbouffard marked this pull request as ready for review May 1, 2020 09:43
@tbouffard tbouffard requested review from baptistemesta and oanesini and removed request for baptistemesta May 1, 2020 09:43
@tbouffard tbouffard changed the title WIP feat(converter): transform bpmn model into algorithms model feat(converter): transform bpmn model into algorithms model May 1, 2020
Copy link
Contributor

@baptistemesta baptistemesta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍
This tool start to do things!!!! :shipit:


bpmnElements.getSequenceFlows().stream()
.map(seqFlow -> new Edge(getId(seqFlow.getSourceRef()), getId(seqFlow.getTargetRef())))
.forEach(diagram::edge);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 easy to understand

@Test
public void main_generates_svg_output_file() throws Exception {
String outputPath = outputPath("A.2.0_with_diagram.bpmn.svg");
generateToSvg(inputPath("A.2.0.bpmn.xml"), outputPath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ IMO splitting logic of the App in 2 would help to make theses test more readable:

  • Having on one part logic to parse options of the app and read the file given
  • Having in another class logic to take the content of the BPMN and outputting the layout.

We should do that at some point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the App class is a mess, it is a little bit better in #25
i didn't want to work on it for now, but for sure, there is a lot to improve here 😺

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just putting my though here for the next steps :). But yep! this can be merged as soon as the other is merged.

@baptistemesta baptistemesta force-pushed the feat/gh-13-transform_bpmn_model_into_algorithms_model branch from c59575c to a4bfc9c Compare May 1, 2020 13:42
@baptistemesta
Copy link
Contributor

I took the liberty to rebase it on master!

@baptistemesta baptistemesta merged commit ccd0e92 into master May 1, 2020
@baptistemesta baptistemesta deleted the feat/gh-13-transform_bpmn_model_into_algorithms_model branch May 1, 2020 13:45
@tbouffard tbouffard added the enhancement New feature or request label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants