added beedk-activiti-ext-archetype
This commit is contained in:
parent
52d8f70130
commit
9815726895
9
beedk-activiti-ext-archetype/.gitignore
vendored
Normal file
9
beedk-activiti-ext-archetype/.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
# Maven
|
||||
/target
|
||||
pom.xml.versionsBackup
|
||||
|
||||
# Eclipse
|
||||
.settings
|
||||
.project
|
||||
.classpath
|
||||
|
52
beedk-activiti-ext-archetype/pom.xml
Normal file
52
beedk-activiti-ext-archetype/pom.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<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>com.inteligr8.ootbee</groupId>
|
||||
<artifactId>beedk-activiti-ext-archetype</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>maven-archetype</packaging>
|
||||
|
||||
<name>Order of the Bee Development Kit: Project Scaffolding for an Activiti Extension</name>
|
||||
<scm>
|
||||
<url>https://bitbucket.org/inteligr8/ootbee-beedk</url>
|
||||
</scm>
|
||||
<organization>
|
||||
<name>Order of the Bee</name>
|
||||
<url>https://orderofthebee.net</url>
|
||||
</organization>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Brian Long</name>
|
||||
<email>brian@inteligr8.com</email>
|
||||
<organization>Inteligr8</organization>
|
||||
<organizationUrl>https://www.inteligr8.com</organizationUrl>
|
||||
<url>https://twitter.com/brianmlong</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>3.1.1</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.20</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>com.inteligr8:maven-public-deploy-tile:[1.0.0,2.0.0)</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,48 @@
|
||||
<archetype-descriptor name="${project.artifactId}"
|
||||
xmlns="https://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="https://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0 https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd">
|
||||
<requiredProperties>
|
||||
<requiredProperty key="shortname">
|
||||
<validationRegex>[A-Za-z0-9]+</validationRegex>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="dockerRegistryHost">
|
||||
<defaultValue>quay.io</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="dockerImagePrefix">
|
||||
<defaultValue>local</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="beedkVersion">
|
||||
<defaultValue>[1.0.0,2.0.0)</defaultValue>
|
||||
</requiredProperty>
|
||||
</requiredProperties>
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" packaged="true">
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true">
|
||||
<directory>src</directory>
|
||||
<excludes>
|
||||
<exclude>main/java/*.java</exclude>
|
||||
<exclude>test/java/*.java</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false">
|
||||
<directory></directory>
|
||||
<includes>
|
||||
<include>.gitignore</include>
|
||||
<include>rad.*</include>
|
||||
<include>*.md</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
8
beedk-activiti-ext-archetype/src/main/resources/archetype-resources/.gitignore
vendored
Normal file
8
beedk-activiti-ext-archetype/src/main/resources/archetype-resources/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Maven
|
||||
/target
|
||||
pom.xml.versionsBackup
|
||||
|
||||
# Eclipse
|
||||
.settings
|
||||
.project
|
||||
.classpath
|
@ -0,0 +1,43 @@
|
||||
<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} Activiti Extension</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
|
||||
<activiti.version>5.23.0</activiti.version>
|
||||
<spring.version>4.3.20.RELEASE</spring.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-engine</artifactId>
|
||||
<version>${activiti.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>alfresco-public</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
@ -0,0 +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
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +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
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +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 {
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user