diff --git a/beedk-activiti-ext-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/beedk-activiti-ext-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
index 9d51087..a93d30f 100644
--- a/beedk-activiti-ext-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/beedk-activiti-ext-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -6,15 +6,6 @@
[A-Za-z0-9]+
-
- quay.io
-
-
- local
-
-
- [1.0.0,2.0.0)
-
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/.gitignore b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/.gitignore
index 0a33814..4781aa3 100644
--- a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/.gitignore
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/.gitignore
@@ -1,5 +1,5 @@
# Maven
-/target
+target/
pom.xml.versionsBackup
# Eclipse
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/pom.xml b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/pom.xml
index 3f1b6be..33dd703 100644
--- a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/pom.xml
@@ -12,26 +12,43 @@
UTF-8
- 8
- 8
+ 11
+ 11
+ 11
- 7.11.0
- 5.3.29
+
+
+ 8.8.0
+ 6.2.14
+
+
+
-
- org.activiti
- activiti-engine
- ${activiti.version}
- provided
-
+
org.springframework
spring-context
${spring.version}
provided
+
+ org.activiti
+ activiti-engine
+ ${activiti.version}
+ provided
+
+
+ jakarta.annotation
+ jakarta.annotation-api
+ 3.0.0
+ provided
+
@@ -39,7 +56,7 @@
io.repaint.maven
tiles-maven-plugin
- 2.40
+ 2.43
true
@@ -50,27 +67,33 @@
-
+
- rad
+ wsl
-
- rad
-
+
+ windows
+
- 2.4.6
-
- -Dproperty-to-set=value
+
+
+ 120000
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
+
+
+ activiti-public-releases
+ https://artifacts.alfresco.com/nexus/repository/activiti-releases
+
+
+
+ activiti-enterprise-releases
+ https://artifacts.alfresco.com/nexus/content/repositories/activiti-enterprise-releases
+
\ No newline at end of file
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/rad.ps1 b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/rad.ps1
index 01d9964..edfea11 100644
--- a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/rad.ps1
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/rad.ps1
@@ -1,69 +1,71 @@
+$script:MAVEN_CMD="mvn"
+$script:CONTAINERD_CMD="docker"
function discoverArtifactId {
- $script:ARTIFACT_ID=(mvn -q -Dexpression=project"."artifactId -DforceStdout help:evaluate)
+ $script:ARTIFACT_ID=(Invoke-Expression "${MAVEN_CMD} -q -Dexpression=project"."artifactId -DforceStdout help:evaluate")
}
function rebuild {
echo "Rebuilding project ..."
- mvn process-test-classes
+ Invoke-Expression "${MAVEN_CMD} process-test-classes"
}
-function start_ {
- echo "Rebuilding project and starting Docker containers to support rapid application development ..."
- mvn -Drad process-test-classes
+function start_containers {
+ echo "Rebuilding project and starting containers to support rapid application development ..."
+ Invoke-Expression "${MAVEN_CMD} -Drad process-test-classes"
}
-function start_log {
- echo "Rebuilding project and starting Docker containers to support rapid application development ..."
- mvn -Drad "-Ddocker.showLogs" process-test-classes
+function start_containers_verbose {
+ echo "Rebuilding project and starting containers to support rapid application development ..."
+ Invoke-Expression "${MAVEN_CMD} -Drad -Ddocker'.'showLogs process-test-classes"
}
-function stop_ {
+function stop_containers {
discoverArtifactId
echo "Stopping Docker containers that supported rapid application development ..."
- docker container ls --filter name="^/${ARTIFACT_ID}"
+ Invoke-Expression "${CONTAINERD_CMD} container ls --filter name=${ARTIFACT_ID}-*"
echo "Stopping containers ..."
- docker container stop (docker container ls -q --filter name="^/${ARTIFACT_ID}")
+ Invoke-Expression "${CONTAINERD_CMD} container stop (Invoke-Expression '${CONTAINERD_CMD} container ls -q --filter name=${ARTIFACT_ID}-*')"
echo "Removing containers ..."
- docker container rm (docker container ls -aq --filter name="^/${ARTIFACT_ID}")
+ Invoke-Expression "${CONTAINERD_CMD} container rm (Invoke-Expression '${CONTAINERD_CMD} container ls -aq --filter name=${ARTIFACT_ID}-*')"
}
-function tail_logs {
+function tail_container {
param (
$container
)
discoverArtifactId
- docker container logs -f (docker container ls -q --filter name="^/${ARTIFACT_ID}-${container}$")
+ Invoke-Expression "${CONTAINERD_CMD} container logs -f (Invoke-Expression '${CONTAINERD_CMD} container ls -q --filter name=${ARTIFACT_ID}-${container}')"
}
-function list {
+function list_containers {
discoverArtifactId
- docker container ls --filter name="^/${ARTIFACT_ID}"
+ Invoke-Expression "${CONTAINERD_CMD} container ls --filter name=${ARTIFACT_ID}-*"
}
switch ($args[0]) {
"start" {
- start_
+ start_containers
}
"start_log" {
- start_log
+ start_containers_verbose
}
"stop" {
- stop_
+ stop_containers
}
"restart" {
- stop_
- start_
+ stop_containers
+ start_containers
}
"rebuild" {
rebuild
}
"tail" {
- tail_logs $args[1]
+ tail_container $args[1]
}
"containers" {
- list
+ list_containers
}
default {
echo "Usage: .\rad.ps1 [ start | start_log | stop | restart | rebuild | tail {container} | containers ]"
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/rad.sh b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/rad.sh
index eb8c2bc..bf85e02 100644
--- a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/rad.sh
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/rad.sh
@@ -1,66 +1,69 @@
#!/bin/sh
+MAVEN_CMD=mvn
+CONTAINERD_CMD=docker
+
discoverArtifactId() {
- local ARTIFACT_ID=`mvn -q -Dexpression=project.artifactId -DforceStdout help:evaluate`
+ local ARTIFACT_ID=`${MAVEN_CMD} -q -Dexpression=project.artifactId -DforceStdout help:evaluate`
}
rebuild() {
echo "Rebuilding project ..."
- mvn process-test-classes
+ ${MAVEN_CMD} process-test-classes
}
-start() {
- echo "Rebuilding project and starting Docker containers to support rapid application development ..."
- mvn -Drad process-test-classes
+start_containers() {
+ echo "Rebuilding project and starting containers to support rapid application development ..."
+ ${MAVEN_CMD} -Drad process-test-classes
}
-start_log() {
- echo "Rebuilding project and starting Docker containers to support rapid application development ..."
- mvn -Drad -Ddocker.showLogs process-test-classes
+start_containers_verbose() {
+ echo "Rebuilding project and starting containers to support rapid application development ..."
+ ${MAVEN_CMD} -Drad -Ddocker.showLogs process-test-classes
}
-stop() {
+stop_containers() {
discoverArtifactId
echo "Stopping Docker containers that supported rapid application development ..."
- docker container ls --filter name="^/${ARTIFACT_ID}"
+ ${CONTAINERD_CMD} container ls --filter name=${ARTIFACT_ID}-*
echo "Stopping containers ..."
- docker container stop `docker container ls -q --filter name="^/${ARTIFACT_ID}"`
+ ${CONTAINERD_CMD} container stop `${CONTAINERD_CMD} container ls -q --filter name=${ARTIFACT_ID}-*`
echo "Removing containers ..."
- docker container rm `docker container ls -aq --filter name="^/${ARTIFACT_ID}"`
+ ${CONTAINERD_CMD} container rm `${CONTAINERD_CMD} container ls -aq --filter name=${ARTIFACT_ID}-*`
}
-tail_logs() {
+tail_container() {
discoverArtifactId
- docker container logs -f `docker container ls -q --filter name="^/${ARTIFACT_ID}-$1$"`
+ ${CONTAINERD_CMD} container logs -f `${CONTAINERD_CMD} container ls -q --filter name=${ARTIFACT_ID}-$1`
}
-list() {
+list_containers() {
discoverArtifactId
- docker container ls --filter name="^/${ARTIFACT_ID}"
+ ${CONTAINERD_CMD} container ls --filter name=${ARTIFACT_ID}-*
}
case "$1" in
start)
- start
+ start_containers
;;
start_log)
- start_log
+ start_containers_verbose
;;
stop)
- stop
+ stop_containers
;;
restart)
- stop
- start
+ stop_containers
+ start_containers
;;
rebuild)
rebuild
;;
tail)
- tail_logs $2
+ tail_container $2
;;
containers)
- list
+ list_containers
;;
*)
echo "Usage: ./rad.sh [ start | start_log | stop | restart | rebuild | tail {container} | containers ]"
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleEventListener.java b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleEventListener.java
new file mode 100644
index 0000000..f4bfbe6
--- /dev/null
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleEventListener.java
@@ -0,0 +1,38 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
+ */
+package ${package};
+
+import org.activiti.engine.delegate.event.ActivitiEvent;
+import org.activiti.engine.delegate.event.ActivitiEventListener;
+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 Event Listener.
+ */
+@Component
+public class ExampleEventListener implements ActivitiEventListener {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleEventListener.class);
+
+ @Override
+ public void onEvent(ActivitiEvent event) {
+ LOGGER.trace("onEvent({})", event.getType());
+
+ // TODO do some stuff
+ }
+
+}
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExecutionListener.java b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExecutionListener.java
index 959e673..0787f52 100644
--- a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExecutionListener.java
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExecutionListener.java
@@ -24,21 +24,21 @@ 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:
*
- *
+ *
*/
@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() + "')");
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleExecutionListener.class);
+
+ @Override
+ public void notify(DelegateExecution execution) {
+ LOGGER.trace("execute({})", execution.getId());
// TODO do some stuff
}
- public void exampleMethod(String param) throws Exception {
+ public void exampleMethod(DelegateExecution execution, String param) {
// another example
}
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleScriptObject.java b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleScriptObject.java
new file mode 100644
index 0000000..e819f2a
--- /dev/null
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleScriptObject.java
@@ -0,0 +1,41 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
+ */
+package ${package};
+
+import org.activiti.engine.delegate.DelegateExecution;
+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 script object.
+ * A scripting object can be used in any expression or Script Task.
+ *
+ * You can reference it in your BPMN expression with:
+ * ${exampleObject.exampleMethod('example parameter')}
+ *
+ * You can reference it in your Script Task with:
+ * exampleObject.exampleMethod('example parameter');
+ */
+@Component("exampleObject")
+public class ExampleServiceTask {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
+
+ public void exampleMethod(String param) throws Exception {
+ // another example
+ }
+
+}
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleServiceTask.java b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleServiceTask.java
index 679e143..19f49db 100644
--- a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleServiceTask.java
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleServiceTask.java
@@ -24,21 +24,21 @@ 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:
*
- *
+ *
*/
@Component("exampleServiceTask")
public class ExampleServiceTask implements JavaDelegate {
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleServiceTask.class);
+ @Override
public void execute(DelegateExecution execution) throws Exception {
- if (this.logger.isTraceEnabled())
- this.logger.trace("execute('" + execution.getId() + "')");
+ LOGGER.trace("execute({})", execution.getId());
// TODO do some stuff
}
- public void exampleMethod(String param) throws Exception {
+ public void exampleMethod(DelegateExecution execution, String param) throws Exception {
// another example
}
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleTaskListener.java b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleTaskListener.java
new file mode 100644
index 0000000..948113d
--- /dev/null
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleTaskListener.java
@@ -0,0 +1,45 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
+ */
+package ${package};
+
+import org.activiti.engine.delegate.DelegateTask;
+import org.activiti.engine.delegate.TaskListener;
+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 Task Listener.
+ * You can reference it in your BPMN with:
+ *
+ *
+ */
+@Component("exampleTaskListener")
+public class ExampleTaskListener implements TaskListener {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleTaskListener.class);
+
+ @Override
+ public void notify(DelegateTask task) {
+ LOGGER.trace("execute({})", task.getId());
+
+ // TODO do some stuff
+ }
+
+ public void exampleMethod(DelegateTask task, String param) {
+ // another example
+ }
+
+}
diff --git a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/com/activiti/extension/conf/__shortname__SpringComponentScanner.java b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/com/activiti/extension/conf/__shortname__SpringComponentScanner.java
index d6becac..4031a59 100644
--- a/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/com/activiti/extension/conf/__shortname__SpringComponentScanner.java
+++ b/beedk-activiti-ext-archetype/src/main/resources/archetype-resources/src/main/java/com/activiti/extension/conf/__shortname__SpringComponentScanner.java
@@ -16,9 +16,18 @@ package com.activiti.extension.conf;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator;
+/**
+ * A means for injecting packages to scan for the Spring context.
+ */
@Configuration
-@ComponentScan(basePackages = {"${package}"})
+@ComponentScan(
+ basePackages = {
+ "${package}"
+ },
+ nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class
+)
public class ${shortname}SpringComponentScanner {
}
diff --git a/beedk-aps-ext-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/beedk-aps-ext-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
index 9d51087..a93d30f 100644
--- a/beedk-aps-ext-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/beedk-aps-ext-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -6,15 +6,6 @@
[A-Za-z0-9]+
-
- quay.io
-
-
- local
-
-
- [1.0.0,2.0.0)
-
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/.gitignore b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/.gitignore
index 0a33814..4781aa3 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/.gitignore
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/.gitignore
@@ -1,5 +1,5 @@
# Maven
-/target
+target/
pom.xml.versionsBackup
# Eclipse
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/pom.xml b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/pom.xml
index a8103fc..5bd7191 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/pom.xml
@@ -16,7 +16,21 @@
11
11
- 2.4.6
+
+ 26.1.0
+
+
+
+
+
@@ -27,6 +41,7 @@
classes
provided
+
com.activiti
aspose-transformation
@@ -44,7 +59,7 @@
io.repaint.maven
tiles-maven-plugin
- 2.40
+ 2.43
true
@@ -55,29 +70,32 @@
-
+
- rad
+ wsl
-
- rad
-
+
+ windows
+
-
- -Dproperty-to-set=value
+
+
+ 120000
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
+
- activiti-releases
+ activiti-public-releases
+ https://artifacts.alfresco.com/nexus/repository/activiti-releases
+
+
+
+ activiti-enterprise-releases
https://artifacts.alfresco.com/nexus/content/repositories/activiti-enterprise-releases
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/rad.ps1 b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/rad.ps1
index 01d9964..edfea11 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/rad.ps1
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/rad.ps1
@@ -1,69 +1,71 @@
+$script:MAVEN_CMD="mvn"
+$script:CONTAINERD_CMD="docker"
function discoverArtifactId {
- $script:ARTIFACT_ID=(mvn -q -Dexpression=project"."artifactId -DforceStdout help:evaluate)
+ $script:ARTIFACT_ID=(Invoke-Expression "${MAVEN_CMD} -q -Dexpression=project"."artifactId -DforceStdout help:evaluate")
}
function rebuild {
echo "Rebuilding project ..."
- mvn process-test-classes
+ Invoke-Expression "${MAVEN_CMD} process-test-classes"
}
-function start_ {
- echo "Rebuilding project and starting Docker containers to support rapid application development ..."
- mvn -Drad process-test-classes
+function start_containers {
+ echo "Rebuilding project and starting containers to support rapid application development ..."
+ Invoke-Expression "${MAVEN_CMD} -Drad process-test-classes"
}
-function start_log {
- echo "Rebuilding project and starting Docker containers to support rapid application development ..."
- mvn -Drad "-Ddocker.showLogs" process-test-classes
+function start_containers_verbose {
+ echo "Rebuilding project and starting containers to support rapid application development ..."
+ Invoke-Expression "${MAVEN_CMD} -Drad -Ddocker'.'showLogs process-test-classes"
}
-function stop_ {
+function stop_containers {
discoverArtifactId
echo "Stopping Docker containers that supported rapid application development ..."
- docker container ls --filter name="^/${ARTIFACT_ID}"
+ Invoke-Expression "${CONTAINERD_CMD} container ls --filter name=${ARTIFACT_ID}-*"
echo "Stopping containers ..."
- docker container stop (docker container ls -q --filter name="^/${ARTIFACT_ID}")
+ Invoke-Expression "${CONTAINERD_CMD} container stop (Invoke-Expression '${CONTAINERD_CMD} container ls -q --filter name=${ARTIFACT_ID}-*')"
echo "Removing containers ..."
- docker container rm (docker container ls -aq --filter name="^/${ARTIFACT_ID}")
+ Invoke-Expression "${CONTAINERD_CMD} container rm (Invoke-Expression '${CONTAINERD_CMD} container ls -aq --filter name=${ARTIFACT_ID}-*')"
}
-function tail_logs {
+function tail_container {
param (
$container
)
discoverArtifactId
- docker container logs -f (docker container ls -q --filter name="^/${ARTIFACT_ID}-${container}$")
+ Invoke-Expression "${CONTAINERD_CMD} container logs -f (Invoke-Expression '${CONTAINERD_CMD} container ls -q --filter name=${ARTIFACT_ID}-${container}')"
}
-function list {
+function list_containers {
discoverArtifactId
- docker container ls --filter name="^/${ARTIFACT_ID}"
+ Invoke-Expression "${CONTAINERD_CMD} container ls --filter name=${ARTIFACT_ID}-*"
}
switch ($args[0]) {
"start" {
- start_
+ start_containers
}
"start_log" {
- start_log
+ start_containers_verbose
}
"stop" {
- stop_
+ stop_containers
}
"restart" {
- stop_
- start_
+ stop_containers
+ start_containers
}
"rebuild" {
rebuild
}
"tail" {
- tail_logs $args[1]
+ tail_container $args[1]
}
"containers" {
- list
+ list_containers
}
default {
echo "Usage: .\rad.ps1 [ start | start_log | stop | restart | rebuild | tail {container} | containers ]"
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/rad.sh b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/rad.sh
index eb8c2bc..bf85e02 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/rad.sh
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/rad.sh
@@ -1,66 +1,69 @@
#!/bin/sh
+MAVEN_CMD=mvn
+CONTAINERD_CMD=docker
+
discoverArtifactId() {
- local ARTIFACT_ID=`mvn -q -Dexpression=project.artifactId -DforceStdout help:evaluate`
+ local ARTIFACT_ID=`${MAVEN_CMD} -q -Dexpression=project.artifactId -DforceStdout help:evaluate`
}
rebuild() {
echo "Rebuilding project ..."
- mvn process-test-classes
+ ${MAVEN_CMD} process-test-classes
}
-start() {
- echo "Rebuilding project and starting Docker containers to support rapid application development ..."
- mvn -Drad process-test-classes
+start_containers() {
+ echo "Rebuilding project and starting containers to support rapid application development ..."
+ ${MAVEN_CMD} -Drad process-test-classes
}
-start_log() {
- echo "Rebuilding project and starting Docker containers to support rapid application development ..."
- mvn -Drad -Ddocker.showLogs process-test-classes
+start_containers_verbose() {
+ echo "Rebuilding project and starting containers to support rapid application development ..."
+ ${MAVEN_CMD} -Drad -Ddocker.showLogs process-test-classes
}
-stop() {
+stop_containers() {
discoverArtifactId
echo "Stopping Docker containers that supported rapid application development ..."
- docker container ls --filter name="^/${ARTIFACT_ID}"
+ ${CONTAINERD_CMD} container ls --filter name=${ARTIFACT_ID}-*
echo "Stopping containers ..."
- docker container stop `docker container ls -q --filter name="^/${ARTIFACT_ID}"`
+ ${CONTAINERD_CMD} container stop `${CONTAINERD_CMD} container ls -q --filter name=${ARTIFACT_ID}-*`
echo "Removing containers ..."
- docker container rm `docker container ls -aq --filter name="^/${ARTIFACT_ID}"`
+ ${CONTAINERD_CMD} container rm `${CONTAINERD_CMD} container ls -aq --filter name=${ARTIFACT_ID}-*`
}
-tail_logs() {
+tail_container() {
discoverArtifactId
- docker container logs -f `docker container ls -q --filter name="^/${ARTIFACT_ID}-$1$"`
+ ${CONTAINERD_CMD} container logs -f `${CONTAINERD_CMD} container ls -q --filter name=${ARTIFACT_ID}-$1`
}
-list() {
+list_containers() {
discoverArtifactId
- docker container ls --filter name="^/${ARTIFACT_ID}"
+ ${CONTAINERD_CMD} container ls --filter name=${ARTIFACT_ID}-*
}
case "$1" in
start)
- start
+ start_containers
;;
start_log)
- start_log
+ start_containers_verbose
;;
stop)
- stop
+ stop_containers
;;
restart)
- stop
- start
+ stop_containers
+ start_containers
;;
rebuild)
rebuild
;;
tail)
- tail_logs $2
+ tail_container $2
;;
containers)
- list
+ list_containers
;;
*)
echo "Usage: ./rad.sh [ start | start_log | stop | restart | rebuild | tail {container} | containers ]"
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/Bootstrappable b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/Bootstrappable.java
similarity index 62%
rename from beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/Bootstrappable
rename to beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/Bootstrappable.java
index 624c507..b569e66 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/Bootstrappable
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/Bootstrappable.java
@@ -1,5 +1,8 @@
package ${package};
+/**
+ * An interface to bootstrap APS resources.
+ */
public interface Bootstrappable {
void onBootstrap();
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/BootstrappingService.java b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/BootstrappingService.java
index ff0dd82..c0a8bc2 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/BootstrappingService.java
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/BootstrappingService.java
@@ -10,10 +10,16 @@ import org.springframework.stereotype.Component;
import com.activiti.api.boot.BootstrapConfigurer;
+/**
+ * This service is an example. The functionality provided by this example
+ * service is implemented in the `multiext-activiti-app-ext` extension.
+ *
+ * @link https://git.inteligr8.com/inteligr8/multiext-activiti-app-ext
+ */
@Component
public class BootstrappingService implements BootstrapConfigurer {
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
+ private static final Logger LOGGER = LoggerFactory.getLogger(BootstrappingService.class);
@Autowired(required = false)
private List bootstrappables;
@@ -22,7 +28,7 @@ public class BootstrappingService implements BootstrapConfigurer {
public void applicationContextInitialized(ApplicationContext applicationContext) {
if (this.bootstrappables != null) {
for (Bootstrappable bootstrappable : this.bootstrappables) {
- this.logger.debug("Bootstrapping: " + bootstrappable.getClass());
+ LOGGER.debug("Bootstrapping: " + bootstrappable.getClass());
bootstrappable.onBootstrap();
}
}
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleEventListener.java b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleEventListener.java
new file mode 100644
index 0000000..f4bfbe6
--- /dev/null
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleEventListener.java
@@ -0,0 +1,38 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
+ */
+package ${package};
+
+import org.activiti.engine.delegate.event.ActivitiEvent;
+import org.activiti.engine.delegate.event.ActivitiEventListener;
+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 Event Listener.
+ */
+@Component
+public class ExampleEventListener implements ActivitiEventListener {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleEventListener.class);
+
+ @Override
+ public void onEvent(ActivitiEvent event) {
+ LOGGER.trace("onEvent({})", event.getType());
+
+ // TODO do some stuff
+ }
+
+}
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExecutionListener.java b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExecutionListener.java
index adf0503..19b0084 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExecutionListener.java
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExecutionListener.java
@@ -24,21 +24,21 @@ 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:
*
- *
+ *
*/
@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() + "')");
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleExecutionListener.class);
+
+ @Override
+ public void notify(DelegateExecution execution) {
+ LOGGER.trace("execute({})", execution.getId());
// TODO do some stuff
}
- public void exampleMethod(String param) throws Exception {
+ public void exampleMethod(DelegateExecution execution, String param) {
// another example
}
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExtension.java b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExtension.java
index 9f84f3f..32f1fcb 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExtension.java
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleExtension.java
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
@Component
public class ExampleExtension implements Bootstrappable {
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleExtension.class);
@Autowired
private ProcessEngine services;
@@ -23,11 +23,11 @@ public class ExampleExtension implements Bootstrappable {
@Override
public void onBootstrap() {
- this.logger.trace("onBootstrap()");
+ LOGGER.trace("onBootstrap()");
// TODO do some stuff
- this.logger.info("Model Share Extension initialized");
+ LOGGER.info("Model Share Extension initialized");
}
}
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleScriptObject.java b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleScriptObject.java
new file mode 100644
index 0000000..e819f2a
--- /dev/null
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleScriptObject.java
@@ -0,0 +1,41 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
+ */
+package ${package};
+
+import org.activiti.engine.delegate.DelegateExecution;
+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 script object.
+ * A scripting object can be used in any expression or Script Task.
+ *
+ * You can reference it in your BPMN expression with:
+ * ${exampleObject.exampleMethod('example parameter')}
+ *
+ * You can reference it in your Script Task with:
+ * exampleObject.exampleMethod('example parameter');
+ */
+@Component("exampleObject")
+public class ExampleServiceTask {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
+
+ public void exampleMethod(String param) throws Exception {
+ // another example
+ }
+
+}
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleServiceTask.java b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleServiceTask.java
index 20451ca..b7b73db 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleServiceTask.java
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleServiceTask.java
@@ -24,21 +24,21 @@ 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:
*
- *
+ *
*/
@Component("exampleServiceTask")
public class ExampleServiceTask implements JavaDelegate {
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleServiceTask.class);
+ @Override
public void execute(DelegateExecution execution) throws Exception {
- if (this.logger.isTraceEnabled())
- this.logger.trace("execute('" + execution.getId() + "')");
+ LOGGER.trace("execute({})", execution.getId());
// TODO do some stuff
}
- public void exampleMethod(String param) throws Exception {
+ public void exampleMethod(DelegateExecution execution, String param) throws Exception {
// another example
}
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleTaskListener.java b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleTaskListener.java
new file mode 100644
index 0000000..948113d
--- /dev/null
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/ExampleTaskListener.java
@@ -0,0 +1,45 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
+ */
+package ${package};
+
+import org.activiti.engine.delegate.DelegateTask;
+import org.activiti.engine.delegate.TaskListener;
+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 Task Listener.
+ * You can reference it in your BPMN with:
+ *
+ *
+ */
+@Component("exampleTaskListener")
+public class ExampleTaskListener implements TaskListener {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(ExampleTaskListener.class);
+
+ @Override
+ public void notify(DelegateTask task) {
+ LOGGER.trace("execute({})", task.getId());
+
+ // TODO do some stuff
+ }
+
+ public void exampleMethod(DelegateTask task, String param) {
+ // another example
+ }
+
+}
diff --git a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/com/activiti/extension/conf/__shortname__SpringComponentScanner.java b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/com/activiti/extension/conf/__shortname__SpringComponentScanner.java
index 43a1d43..702b982 100644
--- a/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/com/activiti/extension/conf/__shortname__SpringComponentScanner.java
+++ b/beedk-aps-ext-archetype/src/main/resources/archetype-resources/src/main/java/com/activiti/extension/conf/__shortname__SpringComponentScanner.java
@@ -16,9 +16,18 @@ package com.activiti.extension.conf;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator;
+/**
+ * A means for injecting packages to scan for the Spring context.
+ */
@Configuration
-@ComponentScan(basePackages = {"${package}"})
+@ComponentScan(
+ basePackages = {
+ "${package}"
+ },
+ nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class
+)
public class ${shortname}SpringComponentScanner {
}