fixed activiti archetype
This commit is contained in:
parent
df89b65373
commit
d80c6b9400
@ -1,31 +1,31 @@
|
||||
package ${package};
|
||||
|
||||
import org.activiti.engine.delegate.DelegateExecution;
|
||||
import org.activiti.engine.delegate.ExecutionListener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* This class is an example of how you can implement an Activiti Execution Listener.
|
||||
* You can reference it in your BPMN with:
|
||||
* <activiti:executionListener delegateExpression="${exampleExecutionListener}" event="start" />
|
||||
* <activiti:executionListener expression="${exampleExecutionListener.exampleMethod('example parameter')}" event="end" />
|
||||
*/
|
||||
@Component("exampleExecutionListener")
|
||||
public class ExampleExecutionListener implements ExecutionListener {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void notify(DelegateExecution execution) throws Exception {
|
||||
if (this.logger.isTraceEnabled())
|
||||
this.logger.trace("execute('" + execution.getId() + "')");
|
||||
|
||||
// TODO do some stuff
|
||||
}
|
||||
|
||||
public void exampleMethod(String param) throws Exception {
|
||||
// another example
|
||||
}
|
||||
|
||||
}
|
||||
package ${package};
|
||||
|
||||
import org.activiti.engine.delegate.DelegateExecution;
|
||||
import org.activiti.engine.delegate.ExecutionListener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* This class is an example of how you can implement an Activiti Execution Listener.
|
||||
* You can reference it in your BPMN with:
|
||||
* <activiti:executionListener delegateExpression="${exampleExecutionListener}" event="start" />
|
||||
* <activiti:executionListener expression="${exampleExecutionListener.exampleMethod('example parameter')}" event="end" />
|
||||
*/
|
||||
@Component("exampleExecutionListener")
|
||||
public class ExampleExecutionListener implements ExecutionListener {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void notify(DelegateExecution execution) throws Exception {
|
||||
if (this.logger.isTraceEnabled())
|
||||
this.logger.trace("execute('" + execution.getId() + "')");
|
||||
|
||||
// TODO do some stuff
|
||||
}
|
||||
|
||||
public void exampleMethod(String param) throws Exception {
|
||||
// another example
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,31 +1,31 @@
|
||||
package ${package};
|
||||
|
||||
import org.activiti.engine.delegate.DelegateExecution;
|
||||
import org.activiti.engine.delegate.JavaDelegate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* This class is an example of how you can implement an Activiti Service Task.
|
||||
* You can reference it in your BPMN with:
|
||||
* <serviceTask id="serviceTask" activiti:delegateExpression="${exampleServiceTask}" />
|
||||
* <serviceTask id="serviceTask" activiti:expression="${exampleServiceTask.exampleMethod('example parameter')}" />
|
||||
*/
|
||||
@Component("exampleServiceTask")
|
||||
public class ExampleServiceTask implements JavaDelegate {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void execute(DelegateExecution execution) throws Exception {
|
||||
if (this.logger.isTraceEnabled())
|
||||
this.logger.trace("execute('" + execution.getId() + "')");
|
||||
|
||||
// TODO do some stuff
|
||||
}
|
||||
|
||||
public void exampleMethod(String param) throws Exception {
|
||||
// another example
|
||||
}
|
||||
|
||||
}
|
||||
package ${package};
|
||||
|
||||
import org.activiti.engine.delegate.DelegateExecution;
|
||||
import org.activiti.engine.delegate.JavaDelegate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* This class is an example of how you can implement an Activiti Service Task.
|
||||
* You can reference it in your BPMN with:
|
||||
* <serviceTask id="serviceTask" activiti:delegateExpression="${exampleServiceTask}" />
|
||||
* <serviceTask id="serviceTask" activiti:expression="${exampleServiceTask.exampleMethod('example parameter')}" />
|
||||
*/
|
||||
@Component("exampleServiceTask")
|
||||
public class ExampleServiceTask implements JavaDelegate {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void execute(DelegateExecution execution) throws Exception {
|
||||
if (this.logger.isTraceEnabled())
|
||||
this.logger.trace("execute('" + execution.getId() + "')");
|
||||
|
||||
// TODO do some stuff
|
||||
}
|
||||
|
||||
public void exampleMethod(String param) throws Exception {
|
||||
// another example
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.activiti.extension.conf;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = {"${package}"})
|
||||
public class ${shortname}SpringComponentScanner {
|
||||
|
||||
}
|
||||
package com.activiti.extension.conf;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = {"${package}"})
|
||||
public class ${shortname}SpringComponentScanner {
|
||||
|
||||
}
|
||||
|
@ -1,46 +1,46 @@
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${shortname}</name>
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${shortname}</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.release.source>11</maven.release.source>
|
||||
<alfresco.sdk.version>5.0.0</alfresco.sdk.version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.release.source>11</maven.release.source>
|
||||
<alfresco.sdk.version>5.0.0</alfresco.sdk.version>
|
||||
|
||||
<!-- for RAD environment -->
|
||||
<edition>community</edition>
|
||||
<alfresco.platform.version>6.2.0-ga</alfresco.platform.version>
|
||||
|
||||
<!-- for Docker deployment -->
|
||||
<docker.image.registry>${dockerRegistryHost}</docker.image.registry>
|
||||
<docker.image.name>${dockerImagePrefix}/${project.artifactId}</docker.image.name>
|
||||
<docker.image.tag>${project.version}</docker.image.tag>
|
||||
</properties>
|
||||
<!-- for RAD environment -->
|
||||
<edition>community</edition>
|
||||
<alfresco.platform.version>6.2.0-ga</alfresco.platform.version>
|
||||
|
||||
<!-- for Docker deployment -->
|
||||
<docker.image.registry>${dockerRegistryHost}</docker.image.registry>
|
||||
<docker.image.name>${dockerImagePrefix}/${project.artifactId}</docker.image.name>
|
||||
<docker.image.tag>${project.version}</docker.image.tag>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Optional; use for REST API access -->
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-java-rest-api-spring-boot-starter</artifactId>
|
||||
<version>${alfresco.sdk.version}</version>
|
||||
</dependency>
|
||||
<!-- Optional; use for Event API access -->
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-java-event-api-spring-boot-starter</artifactId>
|
||||
<version>${alfresco.sdk.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependencies>
|
||||
<!-- Optional; use for REST API access -->
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-java-rest-api-spring-boot-starter</artifactId>
|
||||
<version>${alfresco.sdk.version}</version>
|
||||
</dependency>
|
||||
<!-- Optional; use for Event API access -->
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-java-event-api-spring-boot-starter</artifactId>
|
||||
<version>${alfresco.sdk.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
@ -49,31 +49,31 @@
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-acs-platform-artifact-rad-tile -->
|
||||
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-acs-platform-artifact-rad-tile -->
|
||||
<tile>com.inteligr8.ootbee:beedk-acs-platform-artifact-rad-tile:${beedkVersion}</tile>
|
||||
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-springboot-docker-tile -->
|
||||
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-springboot-docker-tile -->
|
||||
<tile>com.inteligr8.ootbee:beedk-springboot-docker-tile:${beedkVersion}</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>inteligr8-releases</id>
|
||||
<url>http://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>alfresco-public</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>inteligr8-releases</id>
|
||||
<url>http://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>alfresco-public</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>inteligr8-releases</id>
|
||||
<url>http://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>inteligr8-releases</id>
|
||||
<url>http://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
@ -1,26 +1,26 @@
|
||||
|
||||
FROM docker.inteligr8.com/inteligr8/ubuntu-jdk:20.04-11
|
||||
|
||||
# Set default user information
|
||||
ARG JAR_FILE=target/${env.project_artifactId}-${env.project_version}.jar
|
||||
ARG APPGROUPNAME=alfresco
|
||||
ARG APPGROUPID=1000
|
||||
ARG APPUSERNAME=atengine
|
||||
ARG APPUSERID=33001
|
||||
|
||||
ENV JAVA_OPTS="-Xmx128m"
|
||||
ENV JAR_PATH=/usr/local/bin/${env.project_artifactId}-${env.project_version}.jar
|
||||
|
||||
COPY ${JAR_FILE} ${JAR_PATH}
|
||||
|
||||
# Install your engine's dependencies here
|
||||
#RUN apt update && \
|
||||
# apt -y install {dependency names in APT repository}
|
||||
|
||||
RUN groupadd -g ${APPGROUPID} ${APPGROUPNAME} && \
|
||||
useradd -u ${APPUSERID} -G ${APPGROUPNAME} ${APPUSERNAME} && \
|
||||
chown ${APPUSERNAME}:${APPGROUPNAME} ${JAR_PATH}
|
||||
|
||||
USER ${APPUSERNAME}
|
||||
|
||||
ENTRYPOINT java ${JAVA_OPTS} -jar ${JAR_PATH}
|
||||
|
||||
FROM docker.inteligr8.com/inteligr8/ubuntu-jdk:20.04-11
|
||||
|
||||
# Set default user information
|
||||
ARG JAR_FILE=target/${env.project_artifactId}-${env.project_version}.jar
|
||||
ARG APPGROUPNAME=alfresco
|
||||
ARG APPGROUPID=1000
|
||||
ARG APPUSERNAME=atengine
|
||||
ARG APPUSERID=33001
|
||||
|
||||
ENV JAVA_OPTS="-Xmx128m"
|
||||
ENV JAR_PATH=/usr/local/bin/${env.project_artifactId}-${env.project_version}.jar
|
||||
|
||||
COPY ${JAR_FILE} ${JAR_PATH}
|
||||
|
||||
# Install your engine's dependencies here
|
||||
#RUN apt update && \
|
||||
# apt -y install {dependency names in APT repository}
|
||||
|
||||
RUN groupadd -g ${APPGROUPID} ${APPGROUPNAME} && \
|
||||
useradd -u ${APPUSERID} -G ${APPGROUPNAME} ${APPUSERNAME} && \
|
||||
chown ${APPUSERNAME}:${APPGROUPNAME} ${JAR_PATH}
|
||||
|
||||
USER ${APPUSERNAME}
|
||||
|
||||
ENTRYPOINT java ${JAVA_OPTS} -jar ${JAR_PATH}
|
||||
|
Loading…
x
Reference in New Issue
Block a user