Hi All,
I am using Spring Boot 2.2.6.RELEASE with flowable version 6.5.0. My main objective for using this version is to use Kafka as we have an event driven architecture.
This is the process that I am using to understand how I can work with event registry.
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2020 nexiles GmbH. All rights reserved.
-->
<definitions
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:flowable="http://flowable.org/bpmn"
targetNamespace="Examples">
<process id="eventTest" name="Process to test events">
<startEvent id="theStart" >
<extensionElements>
<flowable:eventType xmlns:flowable="http://flowable.org/bpmn">carparkEnter</flowable:eventType>
<flowable:eventOutParameter xmlns:flowable="http://flowable.org/bpmn"
source="vehicleNumber"
sourceType="string"
target="vehicleNumber"/>
<flowable:eventOutParameter xmlns:flowable="http://flowable.org/bpmn"
source="carpark"
sourceType="string"
target="carpark"/>
</extensionElements>
</startEvent>
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theTask" />
<serviceTask id="theTask" name="event test task" flowable:delegateExpression="${testTask}" flowable:async="true"
/>
<sequenceFlow id="flow2" sourceRef="theTask" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
The xml has been placed under resources/processes.
This is my .event file
{
"key": "carparkEnter",
"name": "Carpark Enter",
"inboundChannelKeys": [
"carparkenterChannel"
],
"correlationParameters": [],
"payload": [
{
"name": "vehicleNumber",
"type": "string"
},
{
"name": "carpark",
"type": "string"
}
]
}
And this is my .channel file
{
"key": "carparkenterChannel",
"name": "Carpark Enter channel",
"description": "Carpark Enter Channel",
"channelType": "inbound",
"type": "kafka",
"deserializerType": "json",
"channelEventKeyDetection": {
"fixedValue": "carparkEnterEvent"
},
"topics": ["LPRS_CARPARK_ENTER_JSON"]
}
The event and channel file are placed under resources/eventregistry folder
My application.properties file has the following entries
Enable and configure Kafka
flowable.task.app.kafka-enabled=true
spring.kafka.consumer.group-id=marvel-heimdall-carpark-enter
spring.kafka.consumer.auto-offset-reset=earliest
spring.kafka.listener.missing-topics-fatal=false
spring.kafka.bootstrap-servers=${BOOTSTRAP_SERVER}
When I start my spring boot application and produce a json in the topic, I dont see my process getting started. Do I need to write any other configuration?
I have the following dependency in pom.xml
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-process</artifactId>
<version>${flowable.version}</version>
</dependency>
Please help and thanks in advance!