Skip to content

Commit

Permalink
feat(generator): support inbound deduplication; boolean props; enhanc…
Browse files Browse the repository at this point in the history
…ed conditions
  • Loading branch information
chillleader committed Apr 12, 2024
1 parent 973a548 commit 0ac6914
Show file tree
Hide file tree
Showing 35 changed files with 789 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id" : "io.camunda.connectors.inbound.RabbitMQ.Boundary.v1",
"description" : "Receive a message from RabbitMQ",
"documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/rabbitmq/?rabbitmq=inbound",
"version" : 6,
"version" : 7,
"category" : {
"id" : "connectors",
"name" : "Connectors"
Expand All @@ -29,6 +29,10 @@
}, {
"id" : "correlation",
"label" : "Correlation"
}, {
"id" : "deduplication",
"label" : "Deduplication",
"tooltip" : "Deduplication allows you to configure multiple inbound connector elements to reuse the same backend (consumer/thread/endpoint) by sharing the same deduplication ID."
}, {
"id" : "output",
"label" : "Output mapping"
Expand Down Expand Up @@ -291,6 +295,62 @@
"type" : "bpmn:Message#property"
},
"type" : "Hidden"
}, {
"id" : "deduplicationModeManualFlag",
"label" : "Manual mode",
"description" : "By default, similar connectors receive the same deduplication ID. Customize by activating manual mode",
"value" : false,
"group" : "deduplication",
"binding" : {
"name" : "deduplicationModeManualFlag",
"type" : "zeebe:property"
},
"type" : "Boolean"
}, {
"id" : "deduplicationModeManual",
"value" : "MANUAL",
"group" : "deduplication",
"binding" : {
"name" : "deduplicationMode",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : true,
"type" : "simple"
},
"type" : "Hidden"
}, {
"id" : "deduplicationModeAuto",
"value" : "AUTO",
"group" : "deduplication",
"binding" : {
"name" : "deduplicationMode",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : false,
"type" : "simple"
},
"type" : "Hidden"
}, {
"id" : "deduplicationId",
"label" : "Deduplication ID",
"constraints" : {
"notEmpty" : true
},
"group" : "deduplication",
"binding" : {
"name" : "deduplicationId",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : true,
"type" : "simple"
},
"type" : "String"
}, {
"id" : "resultVariable",
"label" : "Result variable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id" : "io.camunda.connectors.inbound.RabbitMQ.Intermediate.v1",
"description" : "Receive a message from RabbitMQ",
"documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/rabbitmq/?rabbitmq=inbound",
"version" : 6,
"version" : 7,
"category" : {
"id" : "connectors",
"name" : "Connectors"
Expand All @@ -29,6 +29,10 @@
}, {
"id" : "correlation",
"label" : "Correlation"
}, {
"id" : "deduplication",
"label" : "Deduplication",
"tooltip" : "Deduplication allows you to configure multiple inbound connector elements to reuse the same backend (consumer/thread/endpoint) by sharing the same deduplication ID."
}, {
"id" : "output",
"label" : "Output mapping"
Expand Down Expand Up @@ -291,6 +295,62 @@
"type" : "bpmn:Message#property"
},
"type" : "Hidden"
}, {
"id" : "deduplicationModeManualFlag",
"label" : "Manual mode",
"description" : "By default, similar connectors receive the same deduplication ID. Customize by activating manual mode",
"value" : false,
"group" : "deduplication",
"binding" : {
"name" : "deduplicationModeManualFlag",
"type" : "zeebe:property"
},
"type" : "Boolean"
}, {
"id" : "deduplicationModeManual",
"value" : "MANUAL",
"group" : "deduplication",
"binding" : {
"name" : "deduplicationMode",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : true,
"type" : "simple"
},
"type" : "Hidden"
}, {
"id" : "deduplicationModeAuto",
"value" : "AUTO",
"group" : "deduplication",
"binding" : {
"name" : "deduplicationMode",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : false,
"type" : "simple"
},
"type" : "Hidden"
}, {
"id" : "deduplicationId",
"label" : "Deduplication ID",
"constraints" : {
"notEmpty" : true
},
"group" : "deduplication",
"binding" : {
"name" : "deduplicationId",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : true,
"type" : "simple"
},
"type" : "String"
}, {
"id" : "resultVariable",
"label" : "Result variable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id" : "io.camunda.connectors.inbound.RabbitMQ.MessageStart.v1",
"description" : "Receive a message from RabbitMQ",
"documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/rabbitmq/?rabbitmq=inbound",
"version" : 6,
"version" : 7,
"category" : {
"id" : "connectors",
"name" : "Connectors"
Expand All @@ -29,6 +29,10 @@
}, {
"id" : "correlation",
"label" : "Correlation"
}, {
"id" : "deduplication",
"label" : "Deduplication",
"tooltip" : "Deduplication allows you to configure multiple inbound connector elements to reuse the same backend (consumer/thread/endpoint) by sharing the same deduplication ID."
}, {
"id" : "output",
"label" : "Output mapping"
Expand Down Expand Up @@ -319,6 +323,62 @@
"type" : "bpmn:Message#property"
},
"type" : "Hidden"
}, {
"id" : "deduplicationModeManualFlag",
"label" : "Manual mode",
"description" : "By default, similar connectors receive the same deduplication ID. Customize by activating manual mode",
"value" : false,
"group" : "deduplication",
"binding" : {
"name" : "deduplicationModeManualFlag",
"type" : "zeebe:property"
},
"type" : "Boolean"
}, {
"id" : "deduplicationModeManual",
"value" : "MANUAL",
"group" : "deduplication",
"binding" : {
"name" : "deduplicationMode",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : true,
"type" : "simple"
},
"type" : "Hidden"
}, {
"id" : "deduplicationModeAuto",
"value" : "AUTO",
"group" : "deduplication",
"binding" : {
"name" : "deduplicationMode",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : false,
"type" : "simple"
},
"type" : "Hidden"
}, {
"id" : "deduplicationId",
"label" : "Deduplication ID",
"constraints" : {
"notEmpty" : true
},
"group" : "deduplication",
"binding" : {
"name" : "deduplicationId",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : true,
"type" : "simple"
},
"type" : "String"
}, {
"id" : "resultVariable",
"label" : "Result variable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id" : "io.camunda.connectors.inbound.RabbitMQ.StartEvent.v1",
"description" : "Receive a message from RabbitMQ",
"documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/rabbitmq/?rabbitmq=inbound",
"version" : 6,
"version" : 7,
"category" : {
"id" : "connectors",
"name" : "Connectors"
Expand All @@ -25,6 +25,10 @@
}, {
"id" : "activation",
"label" : "Activation"
}, {
"id" : "deduplication",
"label" : "Deduplication",
"tooltip" : "Deduplication allows you to configure multiple inbound connector elements to reuse the same backend (consumer/thread/endpoint) by sharing the same deduplication ID."
}, {
"id" : "output",
"label" : "Output mapping"
Expand Down Expand Up @@ -236,6 +240,62 @@
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "deduplicationModeManualFlag",
"label" : "Manual mode",
"description" : "By default, similar connectors receive the same deduplication ID. Customize by activating manual mode",
"value" : false,
"group" : "deduplication",
"binding" : {
"name" : "deduplicationModeManualFlag",
"type" : "zeebe:property"
},
"type" : "Boolean"
}, {
"id" : "deduplicationModeManual",
"value" : "MANUAL",
"group" : "deduplication",
"binding" : {
"name" : "deduplicationMode",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : true,
"type" : "simple"
},
"type" : "Hidden"
}, {
"id" : "deduplicationModeAuto",
"value" : "AUTO",
"group" : "deduplication",
"binding" : {
"name" : "deduplicationMode",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : false,
"type" : "simple"
},
"type" : "Hidden"
}, {
"id" : "deduplicationId",
"label" : "Deduplication ID",
"constraints" : {
"notEmpty" : true
},
"group" : "deduplication",
"binding" : {
"name" : "deduplicationId",
"type" : "zeebe:property"
},
"condition" : {
"property" : "deduplicationModeManualFlag",
"equals" : true,
"type" : "simple"
},
"type" : "String"
}, {
"id" : "resultVariable",
"label" : "Result variable",
Expand Down
3 changes: 3 additions & 0 deletions connectors/rabbitmq/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
<templateFileName>rabbitmq-inbound-connector-boundary.json</templateFileName>
</file>
</files>
<features>
<INBOUND_DEDUPLICATION>true</INBOUND_DEDUPLICATION>
</features>
</connector>
</connectors>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
id = "io.camunda.connectors.inbound.RabbitMQ",
name = "RabbitMQ Connector",
icon = "icon.svg",
version = 6,
version = 7,
inputDataClass = RabbitMqInboundProperties.class,
description = "Receive a message from RabbitMQ",
documentationRef =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.camunda.connector.generator.dsl.BpmnType;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -91,7 +92,8 @@ GeneratorConfiguration generatorConfiguration() {
templateId,
templateName,
null,
bpmnTypes);
bpmnTypes,
Map.of()); // todo: do we need to support feature overrides from the CLI?
}

private BpmnType parseBpmnType(String type) {
Expand Down

0 comments on commit 0ac6914

Please sign in to comment.