www-jrtorres042-github-enterprise-org
/
git_microsoft-powershell_achived-credential_shield.io-tracker_covid-19_live-bpm-platform-diff-1
Public template
forked from camunda/camunda-bpm-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(run): add invoice example option
* adds integration code for the invoice example * adds CLI option to enable the invoice example related to CAM-13394
- Loading branch information
Showing
16 changed files
with
339 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.camunda.bpm.run</groupId> | ||
<artifactId>camunda-bpm-run-modules</artifactId> | ||
<version>7.16.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>camunda-bpm-run-modules-example-invoice</artifactId> | ||
<name>Camunda Platform - Run - Module Example Invoice</name> | ||
|
||
<properties> | ||
<!-- generate a bom of compile time dependencies for the license book. | ||
Note: Every compile time dependency will end up in the license book. Please | ||
declare only dependencies that are actually needed --> | ||
<skip-third-party-bom>false</skip-third-party-bom> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.camunda.bpm.springboot</groupId> | ||
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.camunda.bpm.example</groupId> | ||
<artifactId>camunda-example-invoice</artifactId> | ||
<version>${project.version}</version> | ||
<classifier>classes</classifier> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<!-- override version to use fileMappers --> | ||
<version>3.2.0</version> | ||
<executions> | ||
<execution> | ||
<id>unpack-invoice</id> | ||
<phase>process-resources</phase> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.camunda.bpm.example</groupId> | ||
<artifactId>camunda-example-invoice</artifactId> | ||
<version>${project.version}</version> | ||
<type>war</type> | ||
<outputDirectory>${project.build.directory}/classes</outputDirectory> | ||
<excludes> | ||
assets/**,META-INF/**,*.html,WEB-INF/*.xml,WEB-INF | ||
</excludes> | ||
<fileMappers> | ||
<org.codehaus.plexus.components.io.filemappers.RegExpFileMapper> | ||
<pattern>^\QWEB-INF/classes/\E</pattern> | ||
<replacement>./</replacement> | ||
</org.codehaus.plexus.components.io.filemappers.RegExpFileMapper> | ||
</fileMappers> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
64 changes: 64 additions & 0 deletions
64
...ro/run/modules/example/src/main/java/org/camunda/bpm/run/example/invoice/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
* under one or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information regarding copyright | ||
* ownership. Camunda licenses this file to you under the Apache License, | ||
* Version 2.0; you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.camunda.bpm.run.example.invoice; | ||
|
||
import javax.annotation.PostConstruct; | ||
|
||
import org.camunda.bpm.engine.ProcessEngine; | ||
import org.camunda.bpm.example.invoice.InvoiceProcessApplication; | ||
import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; | ||
import org.camunda.bpm.spring.boot.starter.event.PostDeployEvent; | ||
import org.camunda.bpm.spring.boot.starter.property.CamundaBpmProperties; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.event.EventListener; | ||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@ConditionalOnProperty(name = "enabled", havingValue = "true", prefix = CamundaBpmProperties.PREFIX + ".run.example") | ||
@Configuration | ||
@EnableProcessApplication("invoiceProcessApplicationSpringBoot") | ||
public class Application implements WebMvcConfigurer { | ||
|
||
private static final Logger LOG = LoggerFactory.getLogger(Application.class); | ||
|
||
@Autowired | ||
protected ProcessEngine processEngine; | ||
|
||
protected InvoiceProcessApplication invoicePa = new InvoiceProcessApplication(); | ||
|
||
@PostConstruct | ||
public void deployInvoice() { | ||
LOG.info("Invoice example started, creating deployment"); | ||
invoicePa.createDeployment("invoiceProcessApplicationSpringBoot", processEngine, invoicePa.getClass().getClassLoader()); | ||
} | ||
|
||
@EventListener | ||
public void onPostDeploy(PostDeployEvent event) { | ||
LOG.info("Starting invoice example instance"); | ||
invoicePa.startFirstProcess(event.getProcessEngine()); | ||
} | ||
|
||
@Override | ||
public void addResourceHandlers(ResourceHandlerRegistry registry) { | ||
registry.addResourceHandler("/forms/**").addResourceLocations("classpath:/forms/"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.