Skip to content

Commit

Permalink
Parodos POC
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed May 13, 2024
1 parent 4751498 commit b7fd0df
Show file tree
Hide file tree
Showing 8 changed files with 445 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# serverless-workflow-subflow-events

This example illustrate how to trigger workflows manually with additional parameters calculated by an initial workflow.
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); 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.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.kie.kogito.examples</groupId>
<artifactId>serverless-workflow-examples-parent</artifactId>
<version>999-SNAPSHOT</version>
<relativePath>../serverless-workflow-examples-parent/pom.xml</relativePath>
</parent>

<artifactId>serverless-workflow-subflows-event</artifactId>
<version>1.0-SNAPSHOT</version>

<name>Kogito Example :: Serverless Workflow Subflows Event :: Quarkus</name>
<description>Kogito Serverless Workflow Subflows Event - Quarkus</description>

<properties>
<quarkus-plugin.version>3.8.4</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>3.8.4</quarkus.platform.version>
<kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
<kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
<kogito.bom.version>999-SNAPSHOT</kogito.bom.version>
<version.org.kie.kogito>999-SNAPSHOT</version.org.kie.kogito>
<maven.compiler.release>17</maven.compiler.release>
<version.compiler.plugin>3.8.1</version.compiler.plugin>
<version.surefire.plugin>3.0.0-M7</version.surefire.plugin>
<version.failsafe.plugin>${version.surefire.plugin}</version.failsafe.plugin>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>${kogito.bom.group-id}</groupId>
<artifactId>${kogito.bom.artifact-id}</artifactId>
<version>${kogito.bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.compiler.plugin}</version>
<configuration>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.surefire.plugin}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.failsafe.plugin}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>container</id>
<activation>
<property>
<name>container</name>
</property>
</activation>
<properties>
<quarkus.profile>container</quarkus.profile>
</properties>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-jib</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); 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.
#

mp.messaging.incoming.executeA.connector=quarkus-http
mp.messaging.incoming.executeA.path=/executeA

mp.messaging.incoming.executeB.connector=quarkus-http
mp.messaging.incoming.executeB.path=/executeB

# profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer
%container.quarkus.container-image.build=true
%container.quarkus.container-image.push=false
%container.quarkus.container-image.group=${USER}
%container.quarkus.container-image.registry=dev.local
%container.quarkus.container-image.tag=1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"id": "master",
"version": "1.0",
"specVersion": "0.8",
"name": "master",
"start": "setup",
"events": [
{
"name": "executeA",
"source": "",
"type": "executeA"
},
{
"name": "executeB",
"source": "",
"type": "executeB"
}
],
"states": [
{
"name": "setup",
"type" : "operation",
"actions": [{
"name": "setup",
"subFlowRef" : "setup"
}],
"transition": "waitForEvents"
},
{
"name": "waitForEvents",
"type": "event",
"onEvents": [
{
"eventRefs": [
"executeA"
],
"actions": [
{
"name": "workflowA",
"subFlowRef": "workflowA"
}
]
},
{
"eventRefs": [
"executeB"
],
"actions": [
{
"name": "workflowB",
"subFlowRef": "workflowB"
}
]
}
],
"exclusive": false,
"end" : true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "setup",
"version": "1.0",
"specVersion": "0.8",
"name": "setup",
"start": "doIt",
"states": [
{
"name": "doIt",
"type": "inject",
"data" : {
"param1": "This is param1",
"param2": "This is param2"
},
"end": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"id": "workflowA",
"version": "1.0",
"specVersion": "0.8",
"name": "workflowB",
"start": "doIt",
"states": [
{
"name": "doIt",
"type": "inject",
"data" : {
"param3": "This is workflow A"
},
"end": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"id": "workflowB",
"version": "1.0",
"specVersion": "0.8",
"name": "workflowB",
"start": "doIt",
"states": [
{
"name": "doIt",
"type": "inject",
"data" : {
"param3": "This is workflow B"
},
"end": true
}
]
}
Loading

0 comments on commit b7fd0df

Please sign in to comment.