Skip to content

Commit 70fe180

Browse files
elguardianSaumya Singh
authored andcommitted
[NO_ISSUE] Fixing examples to use the embedded job service (apache#2126)
* [NO_ISSUE] Fixing examples to use the embedded job service * fix readme.md * fix notifications
1 parent ce19d28 commit 70fe180

File tree

9 files changed

+141
-170
lines changed

9 files changed

+141
-170
lines changed

kogito-quarkus-examples/process-instance-migration-quarkus/pom.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@
9797
<groupId>org.kie</groupId>
9898
<artifactId>kie-addons-quarkus-process-management</artifactId>
9999
</dependency>
100-
<dependency>
101-
<groupId>org.kie</groupId>
102-
<artifactId>kogito-addons-quarkus-jobs-management</artifactId>
103-
</dependency>
104100
<dependency>
105101
<groupId>org.kie</groupId>
106102
<artifactId>kie-addons-quarkus-process-svg</artifactId>
@@ -133,11 +129,11 @@
133129
<!-- Jobs Service -->
134130
<dependency>
135131
<groupId>org.kie</groupId>
136-
<artifactId>kogito-addons-quarkus-jobs</artifactId>
132+
<artifactId>kogito-addons-quarkus-embedded-jobs</artifactId>
137133
</dependency>
138134
<dependency>
139-
<groupId>org.kie.kogito</groupId>
140-
<artifactId>jobs-service-postgresql-common</artifactId>
135+
<groupId>org.kie</groupId>
136+
<artifactId>kogito-addons-quarkus-embedded-jobs-jpa</artifactId>
141137
</dependency>
142138

143139
<!-- Data Audit -->

kogito-quarkus-examples/process-timer-quarkus/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ After that you can redo the timer queries described above.
144144

145145
### Kogito Jobs Service configuration into the application
146146

147-
To be able to use Kogito Job Service as timer service , an additional dependency is needed into the `pom.xml` file:
147+
To be able to use Kogito Job Service as embedded , an additional dependency is needed into the `pom.xml` file:
148148

149149
```xml
150-
<dependency>
151-
<groupId>org.kie</groupId>
152-
<artifactId>kogito-addons-quarkus-jobs-management</artifactId>
153-
</dependency>
150+
<dependency>
151+
<groupId>org.kie</groupId>
152+
<artifactId>kogito-addons-quarkus-embedded-jobs</artifactId>
153+
</dependency>
154154
```
155155

156156
Then, to allow to use Job Service as timer service there is a need to specify some properties in the `src/main/application.properties` file:

kogito-quarkus-examples/process-timer-quarkus/pom.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,10 @@
7676
<groupId>io.quarkus</groupId>
7777
<artifactId>quarkus-smallrye-openapi</artifactId>
7878
</dependency>
79-
<!-- Comment to disable jobs service integration -->
8079
<dependency>
8180
<groupId>org.kie</groupId>
82-
<artifactId>kogito-addons-quarkus-jobs-management</artifactId>
81+
<artifactId>kogito-addons-quarkus-embedded-jobs</artifactId>
8382
</dependency>
84-
<!-- uncomment this to enable persistence for kogito -->
85-
<!--
86-
<dependency>
87-
<groupId>org.kie</groupId>
88-
<artifactId>kie-addons-quarkus-persistence-infinispan</artifactId>
89-
</dependency>
90-
-->
9183
<dependency>
9284
<groupId>io.quarkus</groupId>
9385
<artifactId>quarkus-smallrye-health</artifactId>
@@ -119,10 +111,7 @@
119111
</property>
120112
</activation>
121113
<dependencies>
122-
<dependency>
123-
<groupId>org.kie</groupId>
124-
<artifactId>kogito-addons-quarkus-jobs-service-embedded</artifactId>
125-
</dependency>
114+
126115
</dependencies>
127116
</profile>
128117
</profiles>

kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml

Lines changed: 109 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -19,120 +19,119 @@
1919
under the License.
2020
2121
-->
22-
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
23-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
24-
<modelVersion>4.0.0</modelVersion>
25-
<parent>
26-
<groupId>org.kie.kogito.examples</groupId>
27-
<artifactId>kogito-quarkus-examples</artifactId>
28-
<version>999-SNAPSHOT</version>
29-
</parent>
30-
<artifactId>process-usertasks-custom-lifecycle-quarkus</artifactId>
31-
<name>Kogito Example :: Process Usertasks With Custom Lifecycle</name>
32-
<description>Kogito user tasks orchestration with custom life cycle - Quarkus</description>
33-
<properties>
34-
<quarkus-plugin.version>3.20.1</quarkus-plugin.version>
35-
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
36-
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
37-
<quarkus.platform.version>3.20.1</quarkus.platform.version>
38-
<kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
39-
<kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
40-
<kogito.bom.version>999-SNAPSHOT</kogito.bom.version>
41-
<version.org.kie.kogito>999-SNAPSHOT</version.org.kie.kogito>
42-
</properties>
43-
<dependencyManagement>
44-
<dependencies>
22+
<project
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
24+
xmlns="http://maven.apache.org/POM/4.0.0"
25+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
26+
<modelVersion>4.0.0</modelVersion>
27+
<parent>
28+
<groupId>org.kie.kogito.examples</groupId>
29+
<artifactId>kogito-quarkus-examples</artifactId>
30+
<version>999-SNAPSHOT</version>
31+
</parent>
32+
<artifactId>process-usertasks-custom-lifecycle-quarkus</artifactId>
33+
<name>Kogito Example :: Process Usertasks With Custom Lifecycle</name>
34+
<description>Kogito user tasks orchestration with custom life cycle - Quarkus</description>
35+
<properties>
36+
<quarkus-plugin.version>3.20.1</quarkus-plugin.version>
37+
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
38+
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
39+
<quarkus.platform.version>3.20.1</quarkus.platform.version>
40+
<kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
41+
<kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
42+
<kogito.bom.version>999-SNAPSHOT</kogito.bom.version>
43+
<version.org.kie.kogito>999-SNAPSHOT</version.org.kie.kogito>
44+
</properties>
45+
<dependencyManagement>
46+
<dependencies>
47+
<dependency>
48+
<groupId>${quarkus.platform.group-id}</groupId>
49+
<artifactId>${quarkus.platform.artifact-id}</artifactId>
50+
<version>${quarkus.platform.version}</version>
51+
<type>pom</type>
52+
<scope>import</scope>
53+
</dependency>
54+
<dependency>
55+
<groupId>${kogito.bom.group-id}</groupId>
56+
<artifactId>${kogito.bom.artifact-id}</artifactId>
57+
<version>${kogito.bom.version}</version>
58+
<type>pom</type>
59+
<scope>import</scope>
60+
</dependency>
61+
</dependencies>
62+
</dependencyManagement>
63+
<dependencies>
4564
<dependency>
46-
<groupId>${quarkus.platform.group-id}</groupId>
47-
<artifactId>${quarkus.platform.artifact-id}</artifactId>
48-
<version>${quarkus.platform.version}</version>
49-
<type>pom</type>
50-
<scope>import</scope>
65+
<groupId>io.quarkus</groupId>
66+
<artifactId>quarkus-resteasy</artifactId>
5167
</dependency>
5268
<dependency>
53-
<groupId>${kogito.bom.group-id}</groupId>
54-
<artifactId>${kogito.bom.artifact-id}</artifactId>
55-
<version>${kogito.bom.version}</version>
56-
<type>pom</type>
57-
<scope>import</scope>
69+
<groupId>io.quarkus</groupId>
70+
<artifactId>quarkus-resteasy-jackson</artifactId>
5871
</dependency>
59-
</dependencies>
60-
</dependencyManagement>
61-
<dependencies>
62-
<dependency>
63-
<groupId>io.quarkus</groupId>
64-
<artifactId>quarkus-resteasy</artifactId>
65-
</dependency>
66-
<dependency>
67-
<groupId>io.quarkus</groupId>
68-
<artifactId>quarkus-resteasy-jackson</artifactId>
69-
</dependency>
70-
<dependency>
71-
<groupId>org.jbpm</groupId>
72-
<artifactId>jbpm-with-drools-quarkus</artifactId>
73-
</dependency>
74-
<dependency>
75-
<groupId>org.kie.kogito</groupId>
76-
<artifactId>process-workitems</artifactId>
77-
</dependency>
78-
<dependency>
79-
<groupId>org.jbpm</groupId>
80-
<artifactId>jbpm-addons-quarkus-task-management</artifactId>
81-
</dependency>
82-
<dependency>
83-
<groupId>io.quarkus</groupId>
84-
<artifactId>quarkus-smallrye-openapi</artifactId>
85-
</dependency>
86-
<dependency>
87-
<groupId>io.quarkus</groupId>
88-
<artifactId>quarkus-smallrye-health</artifactId>
89-
</dependency>
90-
<dependency>
91-
<groupId>io.quarkus</groupId>
92-
<artifactId>quarkus-junit5</artifactId>
93-
<scope>test</scope>
94-
</dependency>
95-
<dependency>
96-
<groupId>io.rest-assured</groupId>
97-
<artifactId>rest-assured</artifactId>
98-
<scope>test</scope>
99-
</dependency>
100-
</dependencies>
101-
<profiles>
102-
<profile>
103-
<id>notification</id>
104-
<dependencies>
10572
<dependency>
106-
<groupId>org.jbpm</groupId>
107-
<artifactId>jbpm-addons-quarkus-mail</artifactId>
108-
</dependency>
109-
<dependency>
110-
<groupId>org.jbpm</groupId>
111-
<artifactId>jbpm-addons-quarkus-task-notification</artifactId>
112-
</dependency>
113-
<dependency>
114-
<groupId>io.quarkus</groupId>
115-
<artifactId>quarkus-messaging-kafka</artifactId>
116-
</dependency>
117-
</dependencies>
118-
</profile>
119-
</profiles>
120-
<build>
121-
<finalName>${project.artifactId}</finalName>
122-
<plugins>
123-
<plugin>
124-
<groupId>${quarkus.platform.group-id}</groupId>
125-
<artifactId>quarkus-maven-plugin</artifactId>
126-
<version>${quarkus-plugin.version}</version>
127-
<executions>
128-
<execution>
129-
<goals>
130-
<goal>build</goal>
131-
</goals>
132-
</execution>
133-
</executions>
134-
</plugin>
135-
</plugins>
136-
</build>
73+
<groupId>org.kie</groupId>
74+
<artifactId>kogito-addons-quarkus-embedded-jobs</artifactId>
75+
</dependency>
76+
<dependency>
77+
<groupId>org.jbpm</groupId>
78+
<artifactId>jbpm-with-drools-quarkus</artifactId>
79+
</dependency>
80+
<dependency>
81+
<groupId>org.kie.kogito</groupId>
82+
<artifactId>process-workitems</artifactId>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.jbpm</groupId>
86+
<artifactId>jbpm-addons-quarkus-task-management</artifactId>
87+
</dependency>
88+
<dependency>
89+
<groupId>io.quarkus</groupId>
90+
<artifactId>quarkus-smallrye-openapi</artifactId>
91+
</dependency>
92+
<dependency>
93+
<groupId>io.quarkus</groupId>
94+
<artifactId>quarkus-messaging-kafka</artifactId>
95+
</dependency>
96+
<dependency>
97+
<groupId>org.jbpm</groupId>
98+
<artifactId>jbpm-addons-quarkus-mail</artifactId>
99+
</dependency>
100+
<dependency>
101+
<groupId>org.jbpm</groupId>
102+
<artifactId>jbpm-addons-quarkus-task-notification</artifactId>
103+
</dependency>
104+
<dependency>
105+
<groupId>io.quarkus</groupId>
106+
<artifactId>quarkus-smallrye-health</artifactId>
107+
</dependency>
108+
<dependency>
109+
<groupId>io.quarkus</groupId>
110+
<artifactId>quarkus-junit5</artifactId>
111+
<scope>test</scope>
112+
</dependency>
113+
<dependency>
114+
<groupId>io.rest-assured</groupId>
115+
<artifactId>rest-assured</artifactId>
116+
<scope>test</scope>
117+
</dependency>
118+
</dependencies>
119+
<build>
120+
<finalName>${project.artifactId}</finalName>
121+
<plugins>
122+
<plugin>
123+
<groupId>${quarkus.platform.group-id}</groupId>
124+
<artifactId>quarkus-maven-plugin</artifactId>
125+
<version>${quarkus-plugin.version}</version>
126+
<executions>
127+
<execution>
128+
<goals>
129+
<goal>build</goal>
130+
</goals>
131+
</execution>
132+
</executions>
133+
</plugin>
134+
</plugins>
135+
</build>
137136

138137
</project>

kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
#
1919

2020
# Quarkus
21-
quarkus.http.test-port=0
21+
quarkus.http.test-port=0

kogito-quarkus-examples/process-usertasks-timer-quarkus/pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
</dependency>
9999
<dependency>
100100
<groupId>org.kie</groupId>
101-
<artifactId>kogito-addons-quarkus-jobs-management</artifactId>
101+
<artifactId>kogito-addons-quarkus-embedded-jobs</artifactId>
102102
</dependency>
103103

104104
<dependency>
@@ -160,6 +160,14 @@
160160
<skipTests>true</skipTests>
161161
</properties>
162162
<dependencies>
163+
<dependency>
164+
<groupId>org.jbpm</groupId>
165+
<artifactId>jbpm-addons-quarkus-usertask-storage-jpa</artifactId>
166+
</dependency>
167+
<dependency>
168+
<groupId>org.kie</groupId>
169+
<artifactId>kogito-addons-quarkus-embedded-jobs-jpa</artifactId>
170+
</dependency>
163171
<dependency>
164172
<groupId>org.kie</groupId>
165173
<artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>

kogito-springboot-examples/process-timer-springboot/README.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -242,30 +242,6 @@ First one is used to direct the Kogito runtime to let it know where is the Kogit
242242
to match the location of the Kogito Job Service when starting it - see below.
243243
Second one is used by Kogito Job Service to callback when the timer expires and needs to be pointing to the service host and port
244244

245-
### Start Kogito Job Service
246-
247-
You need to download the job service and start it locally
248-
249-
You can download it from [Select Latest Version]
250-
https://repo.maven.apache.org/maven2/org/kie/kogito/jobs-service/
251-
252-
```sh
253-
java -Dquarkus.http.port=8085 -jar jobs-service-common/target/jobs-service-common-{version}-runner.jar
254-
```
255-
256-
* After Starting Kogito Job Service you should see a similar Log as follows
257-
258-
<p align="center"><img src="docs/images/kogitoWebServiceLog.png"></p>
259-
260-
In case you'd like to run the job service with enabled persistence then start
261-
Infinispan server before and then run the job service with following command
262-
263-
Download Infinispan Server from
264-
https://infinispan.org/download/
265-
266-
Start Infinispan Server
267-
[Infinispan Directory]/bin/sh server.sh
268-
269245
```sh
270246
java -Dquarkus.http.port=8085 -jar jobs-service-infinispan/target/jobs-service-infinispan-{version}-runner.jar
271247
```

kogito-springboot-examples/process-timer-springboot/pom.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@
8080
<artifactId>jbpm-spring-boot-starter</artifactId>
8181
</dependency>
8282

83-
<!-- Comment to disable jobs service integration -->
84-
<dependency>
85-
<groupId>org.kie</groupId>
86-
<artifactId>kogito-addons-springboot-jobs-management</artifactId>
87-
</dependency>
83+
<dependency>
84+
<groupId>org.kie</groupId>
85+
<artifactId>kogito-addons-springboot-embedded-jobs</artifactId>
86+
</dependency>
8887

8988
<dependency>
9089
<groupId>org.kie</groupId>

0 commit comments

Comments
 (0)