Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… provides the default template file
  • Loading branch information
kwiens12357 committed Feb 4, 2022
1 parent f651fbb commit 9d6612b
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 35 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
<groupId>info.novatec</groupId>
<artifactId>camunda-bpmn-documentation-generator</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<templateFile>${project.build.directory}/classes/templates/own.ftl</templateFile>
</configuration>
<!-- optionaly -->
<executions>
<execution>
Expand Down
53 changes: 33 additions & 20 deletions src/main/resources/bpmn/BpmnMappingFileName.bpmn
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_010i794" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
<bpmn:process id="BPMNMappingProcessNameProcess" name="BPMN Mapping Process Name" isExecutable="true" camunda:versionTag="1.0.0">
<bpmn:documentation>BPMN Mapping Process Documentation

The purpose of this process is for testing the minimal mapping requirements.
In the first approach, the following attributes should be mapped:

- File Name
- Process ID
- Process Name
- Version Tag
- Documentation</bpmn:documentation>
<bpmn:startEvent id="BPMNMappingRequiredStartEvent" name="BPMN Mapping Required" />
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1nptqcm" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
<bpmn:process id="Process_0910g2h" name="SuperProzess" isExecutable="true" camunda:versionTag="1.0">
<bpmn:documentation>Hier steht eine Dokumentation</bpmn:documentation>
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_0mp6cca</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:task id="Activity_0veozgy" name="Task1">
<bpmn:incoming>Flow_0mp6cca</bpmn:incoming>
<bpmn:outgoing>Flow_0yb16gj</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="Flow_0mp6cca" sourceRef="StartEvent_1" targetRef="Activity_0veozgy" />
<bpmn:endEvent id="Event_193bg2b">
<bpmn:incoming>Flow_0yb16gj</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0yb16gj" sourceRef="Activity_0veozgy" targetRef="Event_193bg2b" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="BPMNMappingProcessNameProcess">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="BPMNMappingRequiredStartEvent">
<dc:Bounds x="179" y="79" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="160" y="122" width="78" height="27" />
</bpmndi:BPMNLabel>
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0910g2h">
<bpmndi:BPMNEdge id="Flow_0mp6cca_di" bpmnElement="Flow_0mp6cca">
<di:waypoint x="215" y="117" />
<di:waypoint x="270" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0yb16gj_di" bpmnElement="Flow_0yb16gj">
<di:waypoint x="370" y="117" />
<di:waypoint x="432" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0veozgy_di" bpmnElement="Activity_0veozgy">
<dc:Bounds x="270" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_193bg2b_di" bpmnElement="Event_193bg2b">
<dc:Bounds x="432" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
</bpmn:definitions>
15 changes: 0 additions & 15 deletions src/main/resources/templates/basic.ftl

This file was deleted.

18 changes: 18 additions & 0 deletions src/main/resources/templates/own.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<html>
<head>
<title>Own-Template</title>
</head>
<body>
This is an own template for the Freemarker integration. <br>
It should contain the id and name of a bpmn object.

<ul>
<li>ID: ${bpmn.id}</li>
<li>Name: ${bpmn.name}</li>
<li>Version: ${bpmn.version}</li>
<li>Documentation: ${bpmn.documentation}</li>
<img src="../${bpmn.image}">
</ul>

</body>
</html>
32 changes: 32 additions & 0 deletions src/main/resources/templates/process.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html>
<style>
table, th, td {
border: 1px solid black;
}
</style>
<head>
<title>${bpmn.name}</title>
</head>
<body>
<h1>${bpmn.name}</h1>
<p>${bpmn.documentation}</p>
<p>${bpmn.image}</p>

<table>
<thead>
<th>ID</th>
<th>Name</th>
<th>Version</th>
<th>Documentation</th>
</thead>
<#list bpmn.elements as item>
<tr>
<td>${item.id}</td>
<td>${item.name}</td>
<td>${item.version}</td>
<td>${item.documentation}</td>
</tr>
</#list>
</table>
</body>
</html>

0 comments on commit 9d6612b

Please sign in to comment.