From a66a6530b3a80afe6e39076fabdbe5ee9a079c3d Mon Sep 17 00:00:00 2001 From: Igor Petrov Date: Wed, 27 Mar 2024 22:21:34 +0200 Subject: [PATCH] chore(sns): migrate to element template generator --- .../aws-sns-inbound-boundary.json | 357 +++++++-------- .../aws-sns-inbound-intermediate.json | 358 +++++++-------- .../aws-sns-inbound-message-start.json | 419 +++++++++--------- .../aws-sns-inbound-start-event.json | 233 +++++----- connectors/aws/aws-sns/pom.xml | 21 + .../sns/inbound/SnsWebhookExecutable.java | 51 ++- .../model/SnsWebhookConnectorProperties.java | 133 +++--- .../model/SnsWebhookProcessingResult.java | 18 +- .../sns/inbound/SnsWebhookExecutableTest.java | 24 +- 9 files changed, 780 insertions(+), 834 deletions(-) diff --git a/connectors/aws/aws-sns/element-templates/aws-sns-inbound-boundary.json b/connectors/aws/aws-sns/element-templates/aws-sns-inbound-boundary.json index b87d3e6250..2520777a3f 100644 --- a/connectors/aws/aws-sns/element-templates/aws-sns-inbound-boundary.json +++ b/connectors/aws/aws-sns/element-templates/aws-sns-inbound-boundary.json @@ -1,192 +1,175 @@ { - "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", - "name": "SNS HTTPS Boundary Event Connector", - "id": "io.camunda.connectors.inbound.AWSSNS.Boundary.v1", - "description": "Receive events from AWS SNS", - "version": 2, - "documentationRef": "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", - "category": { - "id": "connectors", - "name": "Connectors" + "$schema" : "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "name" : "SNS HTTPS Boundary Event Connector", + "id" : "io.camunda.connectors.inbound.AWSSNS.Boundary.v1", + "description" : "Receive events from AWS SNS", + "documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", + "version" : 4, + "category" : { + "id" : "connectors", + "name" : "Connectors" }, - "appliesTo": [ - "bpmn:BoundaryEvent" - ], - "elementType": { - "value": "bpmn:BoundaryEvent", - "eventDefinition": "bpmn:MessageEventDefinition" + "appliesTo" : [ "bpmn:BoundaryEvent" ], + "elementType" : { + "value" : "bpmn:BoundaryEvent", + "eventDefinition" : "bpmn:MessageEventDefinition" }, - "groups": [ - { - "id": "subscription", - "label": "Subscription Configuration" - }, - { - "id": "activation", - "label": "Activation" - }, - { - "id": "variable-mapping", - "label": "Variable Mapping" - } - ], - "properties": [ - { - "type":"Hidden", - "value":"io.camunda:aws-sns-webhook:1", - "binding":{ - "type":"zeebe:property", - "name":"inbound.type" - } - }, - { - "type": "Hidden", - "generatedValue": { - "type": "uuid" - }, - "binding": { - "type": "bpmn:Message#property", - "name": "name" - } - }, - { - "type":"Hidden", - "value":"SnsHttpsSubscription", - "binding":{ - "type":"zeebe:property", - "name":"inbound.subtype" - } - }, - { - "label":"Subscription ID", - "type":"String", - "group":"subscription", - "binding":{ - "type":"zeebe:property", - "name":"inbound.context" - }, - "description":"The subscription ID is a part of the URL endpoint", - "constraints": { - "notEmpty": true - } - }, - { - "id": "securitySubscriptionAllowedFor", - "label": "Allow to receive messages from topic(s)", - "group": "subscription", - "description": "Control which topic(s) is allowed to start a process", - "value": "any", - "type": "Dropdown", - "choices": [ - { - "name": "Any", - "value": "any" - }, - { - "name": "Specific topic(s)", - "value": "specific" - } - ], - "binding": { - "type": "zeebe:property", - "name": "inbound.securitySubscriptionAllowedFor" - } - }, - { - "label": "Topic ARN(s)", - "description": "Topics that allow to publish messages", - "type": "String", - "group": "subscription", - "feel": "optional", - "binding": { - "type": "zeebe:property", - "name": "inbound.topicsAllowList" - }, - "constraints": { - "notEmpty": true - }, - "condition": { - "property": "securitySubscriptionAllowedFor", - "equals": "specific" - } - }, - { - "label": "Correlation key (process)", - "type": "String", - "group": "activation", - "feel": "required", - "description": "Sets up the correlation key from process variables", - "binding": { - "type": "bpmn:Message#zeebe:subscription#property", - "name": "correlationKey" - }, - "constraints": { - "notEmpty": true - } - }, - { - "label": "Correlation key (payload)", - "type": "String", - "group": "activation", - "feel": "required", - "binding": { - "type": "zeebe:property", - "name": "correlationKeyExpression" - }, - "description": "Extracts the correlation key from the incoming message payload", - "constraints": { - "notEmpty": true - } - }, - { - "label": "Message ID expression", - "feel": "required", - "type": "String", - "optional": true, - "group": "activation", - "binding": { - "type": "zeebe:property", - "name": "messageIdExpression" - }, - "description": "Expression to extract unique identifier of a message" - }, - { - "label": "Condition", - "type": "String", - "group": "activation", - "feel": "required", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "activationCondition" - }, - "description": "Condition under which the connector triggers. Leave empty to catch all events" - }, - { - "label": "Result variable", - "type": "String", - "group": "variable-mapping", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "resultVariable" - }, - "description": "Name of variable to store the result of the Connector in" - }, - { - "label":"Result expression", - "type": "String", - "group": "variable-mapping", - "feel": "required", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "resultExpression" - }, - "description": "Expression to map the inbound payload to process variables" - } - ], - "icon": { - "contents": "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: Sketch 64 (93537) - https://sketch.com --%3E%3Ctitle%3EIcon-Architecture/64/Arch_AWS-Simple-Notification-Service_64%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3ClinearGradient x1='0%25' y1='100%25' x2='100%25' y2='0%25' id='linearGradient-1'%3E%3Cstop stop-color='%23B0084D' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23FF4F8B' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg id='Icon-Architecture/64/Arch_AWS-Simple-Notification-Service_64' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Icon-Architecture-BG/64/Application-Integration' fill='url(%23linearGradient-1)'%3E%3Crect id='Rectangle' x='0' y='0' width='80' height='80'%3E%3C/rect%3E%3C/g%3E%3Cpath d='M17,38 C18.103,38 19,38.897 19,40 C19,41.103 18.103,42 17,42 C15.897,42 15,41.103 15,40 C15,38.897 15.897,38 17,38 L17,38 Z M41,64 C29.314,64 19.289,55.466 17.194,43.98 C18.965,43.894 20.427,42.659 20.857,41 L27,41 L27,39 L20.857,39 C20.427,37.342 18.966,36.107 17.195,36.02 C19.285,24.71 29.511,16 41,16 C45.313,16 49.832,17.622 54.429,20.821 L55.571,19.179 C50.633,15.743 45.73,14 41,14 C28.27,14 16.949,23.865 15.063,36.521 C13.839,37.207 13,38.5 13,40 C13,41.5 13.839,42.793 15.063,43.478 C16.97,56.341 28.056,66 41,66 C46.407,66 51.942,64.157 56.585,60.811 L55.415,59.189 C51.11,62.292 45.991,64 41,64 L41,64 Z M30.101,36.442 C31.955,36.895 34.275,37 36,37 C37.642,37 39.823,36.905 41.629,36.506 L37.105,45.553 C37.036,45.691 37,45.845 37,46 L37,50.453 C36.199,50.964 34.833,51.812 34,51.986 L34,46 C34,45.868 33.974,45.737 33.923,45.615 L30.101,36.442 Z M36,33 C40.025,33 42.174,33.604 42.841,34 C42.174,34.396 40.025,35 36,35 C31.975,35 29.826,34.396 29.159,34 C29.826,33.604 31.975,33 36,33 L36,33 Z M33,54 L34,54 C34.043,54 34.086,53.997 34.128,53.992 C35.352,53.833 36.909,52.887 38.272,52.013 L38.535,51.845 C38.824,51.661 39,51.342 39,51 L39,46.236 L44.559,35.12 C44.833,34.801 45,34.434 45,34 C45,31.39 39.361,31 36,31 C32.639,31 27,31.39 27,34 C27,34.366 27.12,34.684 27.32,34.967 L32,46.2 L32,53 C32,53.552 32.447,54 33,54 L33,54 Z M62,53 C63.103,53 64,53.897 64,55 C64,56.103 63.103,57 62,57 C60.897,57 60,56.103 60,55 C60,53.897 60.897,53 62,53 L62,53 Z M62,23 C63.103,23 64,23.897 64,25 C64,26.103 63.103,27 62,27 C60.897,27 60,26.103 60,25 C60,23.897 60.897,23 62,23 L62,23 Z M64,38 C65.103,38 66,38.897 66,40 C66,41.103 65.103,42 64,42 C62.897,42 62,41.103 62,40 C62,38.897 62.897,38 64,38 L64,38 Z M54,41 L60.143,41 C60.589,42.72 62.142,44 64,44 C66.206,44 68,42.206 68,40 C68,37.794 66.206,36 64,36 C62.142,36 60.589,37.28 60.143,39 L54,39 L54,26 L58.143,26 C58.589,27.72 60.142,29 62,29 C64.206,29 66,27.206 66,25 C66,22.794 64.206,21 62,21 C60.142,21 58.589,22.28 58.143,24 L53,24 C52.447,24 52,24.448 52,25 L52,39 L45,39 L45,41 L52,41 L52,55 C52,55.552 52.447,56 53,56 L58.143,56 C58.589,57.72 60.142,59 62,59 C64.206,59 66,57.206 66,55 C66,52.794 64.206,51 62,51 C60.142,51 58.589,52.28 58.143,54 L54,54 L54,41 Z' id='AWS-Simple-Notification-Service_Icon_64_Squid' fill='%23FFFFFF'%3E%3C/path%3E%3C/g%3E%3C/svg%3E" + "groups" : [ { + "id" : "subscription", + "label" : "Subscription Configuration" + }, { + "id" : "activation", + "label" : "Activation" + }, { + "id" : "correlation", + "label" : "Correlation" + }, { + "id" : "output", + "label" : "Output mapping" + } ], + "properties" : [ { + "value" : "io.camunda:aws-sns-webhook:1", + "binding" : { + "name" : "inbound.type", + "type" : "zeebe:property" + }, + "type" : "Hidden" + }, { + "id" : "inbound.context", + "label" : "Subscription ID", + "description" : "The subscription ID is a part of the URL endpoint", + "optional" : false, + "constraints" : { + "notEmpty" : true + }, + "group" : "subscription", + "binding" : { + "name" : "inbound.context", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "inbound.securitySubscriptionAllowedFor", + "label" : "Allow to receive messages from topic(s)", + "description" : "Control which topic(s) is allowed to start a process", + "optional" : false, + "value" : "any", + "group" : "subscription", + "binding" : { + "name" : "inbound.securitySubscriptionAllowedFor", + "type" : "zeebe:property" + }, + "type" : "Dropdown", + "choices" : [ { + "name" : "Any", + "value" : "any" + }, { + "name" : "Specific topic(s)", + "value" : "specific" + } ] + }, { + "id" : "inbound.topicsAllowList", + "label" : "Topic ARN(s)", + "description" : "Topics that allow to publish messages", + "optional" : true, + "feel" : "optional", + "group" : "subscription", + "binding" : { + "name" : "inbound.topicsAllowList", + "type" : "zeebe:property" + }, + "condition" : { + "property" : "inbound.securitySubscriptionAllowedFor", + "equals" : "specific", + "type" : "simple" + }, + "type" : "String" + }, { + "id" : "activationCondition", + "label" : "Activation condition", + "description" : "Condition under which the Connector triggers. Leave empty to catch all events", + "optional" : true, + "feel" : "required", + "group" : "activation", + "binding" : { + "name" : "activationCondition", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "correlationKeyProcess", + "label" : "Correlation key (process)", + "description" : "Sets up the correlation key from process variables", + "constraints" : { + "notEmpty" : true + }, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "correlationKey", + "type" : "bpmn:Message#zeebe:subscription#property" + }, + "type" : "String" + }, { + "id" : "correlationKeyPayload", + "label" : "Correlation key (payload)", + "description" : "Extracts the correlation key from the incoming message payload", + "constraints" : { + "notEmpty" : true + }, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "correlationKeyExpression", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "messageIdExpression", + "label" : "Message ID expression", + "description" : "Expression to extract unique identifier of a message", + "optional" : true, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "messageIdExpression", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "messageNameUuid", + "generatedValue" : { + "type" : "uuid" + }, + "group" : "correlation", + "binding" : { + "name" : "name", + "type" : "bpmn:Message#property" + }, + "type" : "Hidden" + }, { + "id" : "resultVariable", + "label" : "Result variable", + "description" : "Name of variable to store the response in", + "group" : "output", + "binding" : { + "name" : "resultVariable", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "resultExpression", + "label" : "Result expression", + "description" : "Expression to map the response into process variables", + "feel" : "required", + "group" : "output", + "binding" : { + "name" : "resultExpression", + "type" : "zeeb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TguMTQzLDU0IEw1NCw1NCBMNTQsNDEgWicKICAgICAgICAgICAgICBpZD0nQVdTLVNpbXBsZS1Ob3RpZmljYXRpb24tU2VydmljZV9JY29uXzY0X1NxdWlkJyBmaWxsPScjRkZGRkZGJz48L3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==" } } \ No newline at end of file diff --git a/connectors/aws/aws-sns/element-templates/aws-sns-inbound-intermediate.json b/connectors/aws/aws-sns/element-templates/aws-sns-inbound-intermediate.json index a6c255b8f2..cddbc3c648 100644 --- a/connectors/aws/aws-sns/element-templates/aws-sns-inbound-intermediate.json +++ b/connectors/aws/aws-sns/element-templates/aws-sns-inbound-intermediate.json @@ -1,193 +1,175 @@ { - "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", - "name": "SNS HTTPS Intermediate Catch Event Connector", - "id": "io.camunda.connectors.inbound.AWSSNS.IntermediateCatchEvent.v1", - "description": "Receive events from AWS SNS", - "version": 3, - "documentationRef": "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", - "category": { - "id": "connectors", - "name": "Connectors" + "$schema" : "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "name" : "SNS HTTPS Intermediate Catch Event Connector", + "id" : "io.camunda.connectors.inbound.AWSSNS.IntermediateCatchEvent.v1", + "description" : "Receive events from AWS SNS", + "documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", + "version" : 4, + "category" : { + "id" : "connectors", + "name" : "Connectors" }, - "appliesTo": [ - "bpmn:IntermediateCatchEvent", - "bpmn:IntermediateThrowEvent" - ], - "elementType": { - "value": "bpmn:IntermediateCatchEvent", - "eventDefinition": "bpmn:MessageEventDefinition" + "appliesTo" : [ "bpmn:IntermediateCatchEvent", "bpmn:IntermediateThrowEvent" ], + "elementType" : { + "value" : "bpmn:IntermediateCatchEvent", + "eventDefinition" : "bpmn:MessageEventDefinition" }, - "groups": [ - { - "id": "subscription", - "label": "Subscription Configuration" - }, - { - "id": "activation", - "label": "Activation" - }, - { - "id": "variable-mapping", - "label": "Variable Mapping" - } - ], - "properties": [ - { - "type":"Hidden", - "value":"io.camunda:aws-sns-webhook:1", - "binding":{ - "type":"zeebe:property", - "name":"inbound.type" - } - }, - { - "type": "Hidden", - "generatedValue": { - "type": "uuid" - }, - "binding": { - "type": "bpmn:Message#property", - "name": "name" - } - }, - { - "type":"Hidden", - "value":"SnsHttpsSubscription", - "binding":{ - "type":"zeebe:property", - "name":"inbound.subtype" - } - }, - { - "label":"Subscription ID", - "type":"String", - "group":"subscription", - "binding":{ - "type":"zeebe:property", - "name":"inbound.context" - }, - "description":"The subscription ID is a part of the URL endpoint", - "constraints": { - "notEmpty": true - } - }, - { - "id": "securitySubscriptionAllowedFor", - "label": "Allow to receive messages from topic(s)", - "group": "subscription", - "description": "Control which topic(s) is allowed to start a process", - "value": "any", - "type": "Dropdown", - "choices": [ - { - "name": "Any", - "value": "any" - }, - { - "name": "Specific topic(s)", - "value": "specific" - } - ], - "binding": { - "type": "zeebe:property", - "name": "inbound.securitySubscriptionAllowedFor" - } - }, - { - "label": "Topic ARN(s)", - "description": "Topics that allow to publish messages", - "type": "String", - "group": "subscription", - "feel": "optional", - "binding": { - "type": "zeebe:property", - "name": "inbound.topicsAllowList" - }, - "constraints": { - "notEmpty": true - }, - "condition": { - "property": "securitySubscriptionAllowedFor", - "equals": "specific" - } - }, - { - "label": "Correlation key (process)", - "type": "String", - "group": "activation", - "feel": "required", - "description": "Sets up the correlation key from process variables", - "binding": { - "type": "bpmn:Message#zeebe:subscription#property", - "name": "correlationKey" - }, - "constraints": { - "notEmpty": true - } - }, - { - "label": "Correlation key (payload)", - "type": "String", - "group": "activation", - "feel": "required", - "binding": { - "type": "zeebe:property", - "name": "correlationKeyExpression" - }, - "description": "Extracts the correlation key from the incoming message payload", - "constraints": { - "notEmpty": true - } - }, - { - "label": "Message ID expression", - "feel": "required", - "type": "String", - "optional": true, - "group": "activation", - "binding": { - "type": "zeebe:property", - "name": "messageIdExpression" - }, - "description": "Expression to extract unique identifier of a message" - }, - { - "label": "Condition", - "type": "String", - "group": "activation", - "feel": "required", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "activationCondition" - }, - "description": "Condition under which the connector triggers. Leave empty to catch all events" - }, - { - "label": "Result variable", - "type": "String", - "group": "variable-mapping", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "resultVariable" - }, - "description": "Name of variable to store the result of the Connector in" - }, - { - "label":"Result expression", - "type": "String", - "group": "variable-mapping", - "feel": "required", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "resultExpression" - }, - "description": "Expression to map the inbound payload to process variables" - } - ], - "icon": { - "contents": "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: Sketch 64 (93537) - https://sketch.com --%3E%3Ctitle%3EIcon-Architecture/64/Arch_AWS-Simple-Notification-Service_64%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3ClinearGradient x1='0%25' y1='100%25' x2='100%25' y2='0%25' id='linearGradient-1'%3E%3Cstop stop-color='%23B0084D' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23FF4F8B' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg id='Icon-Architecture/64/Arch_AWS-Simple-Notification-Service_64' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Icon-Architecture-BG/64/Application-Integration' fill='url(%23linearGradient-1)'%3E%3Crect id='Rectangle' x='0' y='0' width='80' height='80'%3E%3C/rect%3E%3C/g%3E%3Cpath d='M17,38 C18.103,38 19,38.897 19,40 C19,41.103 18.103,42 17,42 C15.897,42 15,41.103 15,40 C15,38.897 15.897,38 17,38 L17,38 Z M41,64 C29.314,64 19.289,55.466 17.194,43.98 C18.965,43.894 20.427,42.659 20.857,41 L27,41 L27,39 L20.857,39 C20.427,37.342 18.966,36.107 17.195,36.02 C19.285,24.71 29.511,16 41,16 C45.313,16 49.832,17.622 54.429,20.821 L55.571,19.179 C50.633,15.743 45.73,14 41,14 C28.27,14 16.949,23.865 15.063,36.521 C13.839,37.207 13,38.5 13,40 C13,41.5 13.839,42.793 15.063,43.478 C16.97,56.341 28.056,66 41,66 C46.407,66 51.942,64.157 56.585,60.811 L55.415,59.189 C51.11,62.292 45.991,64 41,64 L41,64 Z M30.101,36.442 C31.955,36.895 34.275,37 36,37 C37.642,37 39.823,36.905 41.629,36.506 L37.105,45.553 C37.036,45.691 37,45.845 37,46 L37,50.453 C36.199,50.964 34.833,51.812 34,51.986 L34,46 C34,45.868 33.974,45.737 33.923,45.615 L30.101,36.442 Z M36,33 C40.025,33 42.174,33.604 42.841,34 C42.174,34.396 40.025,35 36,35 C31.975,35 29.826,34.396 29.159,34 C29.826,33.604 31.975,33 36,33 L36,33 Z M33,54 L34,54 C34.043,54 34.086,53.997 34.128,53.992 C35.352,53.833 36.909,52.887 38.272,52.013 L38.535,51.845 C38.824,51.661 39,51.342 39,51 L39,46.236 L44.559,35.12 C44.833,34.801 45,34.434 45,34 C45,31.39 39.361,31 36,31 C32.639,31 27,31.39 27,34 C27,34.366 27.12,34.684 27.32,34.967 L32,46.2 L32,53 C32,53.552 32.447,54 33,54 L33,54 Z M62,53 C63.103,53 64,53.897 64,55 C64,56.103 63.103,57 62,57 C60.897,57 60,56.103 60,55 C60,53.897 60.897,53 62,53 L62,53 Z M62,23 C63.103,23 64,23.897 64,25 C64,26.103 63.103,27 62,27 C60.897,27 60,26.103 60,25 C60,23.897 60.897,23 62,23 L62,23 Z M64,38 C65.103,38 66,38.897 66,40 C66,41.103 65.103,42 64,42 C62.897,42 62,41.103 62,40 C62,38.897 62.897,38 64,38 L64,38 Z M54,41 L60.143,41 C60.589,42.72 62.142,44 64,44 C66.206,44 68,42.206 68,40 C68,37.794 66.206,36 64,36 C62.142,36 60.589,37.28 60.143,39 L54,39 L54,26 L58.143,26 C58.589,27.72 60.142,29 62,29 C64.206,29 66,27.206 66,25 C66,22.794 64.206,21 62,21 C60.142,21 58.589,22.28 58.143,24 L53,24 C52.447,24 52,24.448 52,25 L52,39 L45,39 L45,41 L52,41 L52,55 C52,55.552 52.447,56 53,56 L58.143,56 C58.589,57.72 60.142,59 62,59 C64.206,59 66,57.206 66,55 C66,52.794 64.206,51 62,51 C60.142,51 58.589,52.28 58.143,54 L54,54 L54,41 Z' id='AWS-Simple-Notification-Service_Icon_64_Squid' fill='%23FFFFFF'%3E%3C/path%3E%3C/g%3E%3C/svg%3E" + "groups" : [ { + "id" : "subscription", + "label" : "Subscription Configuration" + }, { + "id" : "activation", + "label" : "Activation" + }, { + "id" : "correlation", + "label" : "Correlation" + }, { + "id" : "output", + "label" : "Output mapping" + } ], + "properties" : [ { + "value" : "io.camunda:aws-sns-webhook:1", + "binding" : { + "name" : "inbound.type", + "type" : "zeebe:property" + }, + "type" : "Hidden" + }, { + "id" : "inbound.context", + "label" : "Subscription ID", + "description" : "The subscription ID is a part of the URL endpoint", + "optional" : false, + "constraints" : { + "notEmpty" : true + }, + "group" : "subscription", + "binding" : { + "name" : "inbound.context", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "inbound.securitySubscriptionAllowedFor", + "label" : "Allow to receive messages from topic(s)", + "description" : "Control which topic(s) is allowed to start a process", + "optional" : false, + "value" : "any", + "group" : "subscription", + "binding" : { + "name" : "inbound.securitySubscriptionAllowedFor", + "type" : "zeebe:property" + }, + "type" : "Dropdown", + "choices" : [ { + "name" : "Any", + "value" : "any" + }, { + "name" : "Specific topic(s)", + "value" : "specific" + } ] + }, { + "id" : "inbound.topicsAllowList", + "label" : "Topic ARN(s)", + "description" : "Topics that allow to publish messages", + "optional" : true, + "feel" : "optional", + "group" : "subscription", + "binding" : { + "name" : "inbound.topicsAllowList", + "type" : "zeebe:property" + }, + "condition" : { + "property" : "inbound.securitySubscriptionAllowedFor", + "equals" : "specific", + "type" : "simple" + }, + "type" : "String" + }, { + "id" : "activationCondition", + "label" : "Activation condition", + "description" : "Condition under which the Connector triggers. Leave empty to catch all events", + "optional" : true, + "feel" : "required", + "group" : "activation", + "binding" : { + "name" : "activationCondition", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "correlationKeyProcess", + "label" : "Correlation key (process)", + "description" : "Sets up the correlation key from process variables", + "constraints" : { + "notEmpty" : true + }, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "correlationKey", + "type" : "bpmn:Message#zeebe:subscription#property" + }, + "type" : "String" + }, { + "id" : "correlationKeyPayload", + "label" : "Correlation key (payload)", + "description" : "Extracts the correlation key from the incoming message payload", + "constraints" : { + "notEmpty" : true + }, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "correlationKeyExpression", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "messageIdExpression", + "label" : "Message ID expression", + "description" : "Expression to extract unique identifier of a message", + "optional" : true, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "messageIdExpression", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "messageNameUuid", + "generatedValue" : { + "type" : "uuid" + }, + "group" : "correlation", + "binding" : { + "name" : "name", + "type" : "bpmn:Message#property" + }, + "type" : "Hidden" + }, { + "id" : "resultVariable", + "label" : "Result variable", + "description" : "Name of variable to store the response in", + "group" : "output", + "binding" : { + "name" : "resultVariable", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "resultExpression", + "label" : "Result expression", + "description" : "Expression to map the response into process variables", + "feel" : "required", + "group" : "output", + "binding" : { + "name" : "resultExpression", + "type" : "zeebe:property" + }, + "type" : "Text" + } ], + "icon" : { + "contents" : "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTgnIGhlaWdodD0nMTgnIHZpZXdCb3g9JzAgMCA4MCA4MCcgdmVyc2lvbj0nMS4xJyB4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3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==" } } \ No newline at end of file diff --git a/connectors/aws/aws-sns/element-templates/aws-sns-inbound-message-start.json b/connectors/aws/aws-sns/element-templates/aws-sns-inbound-message-start.json index 15ffc93a39..560a5255f8 100644 --- a/connectors/aws/aws-sns/element-templates/aws-sns-inbound-message-start.json +++ b/connectors/aws/aws-sns/element-templates/aws-sns-inbound-message-start.json @@ -1,226 +1,203 @@ { - "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", - "name": "SNS HTTPS Message Start Event Connector Subscription", - "id": "io.camunda.connectors.inbound.AWSSNS.MessageStartEvent.v1", - "description": "Receive events from AWS SNS", - "version": 1, - "documentationRef": "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", - "category": { - "id": "connectors", - "name": "Connectors" + "$schema" : "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "name" : "SNS HTTPS Message Start Event Connector Subscription", + "id" : "io.camunda.connectors.inbound.AWSSNS.MessageStartEvent.v1", + "description" : "Receive events from AWS SNS", + "documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", + "version" : 4, + "category" : { + "id" : "connectors", + "name" : "Connectors" }, - "appliesTo": [ - "bpmn:StartEvent" - ], - "elementType": { - "value": "bpmn:StartEvent", - "eventDefinition": "bpmn:MessageEventDefinition" + "appliesTo" : [ "bpmn:StartEvent" ], + "elementType" : { + "value" : "bpmn:StartEvent", + "eventDefinition" : "bpmn:MessageEventDefinition" }, - "groups": [ - { - "id": "subscription", - "label": "Subscription Configuration" - }, - { - "id": "activation", - "label": "Activation" - }, - { - "id": "correlation", - "label": "Subprocess Correlation" - }, - { - "id": "variable-mapping", - "label": "Variable Mapping" - } - ], - "properties": [ - { - "type":"Hidden", - "value":"io.camunda:aws-sns-webhook:1", - "binding":{ - "type":"zeebe:property", - "name":"inbound.type" - } - }, - { - "type": "Hidden", - "generatedValue": { - "type": "uuid" - }, - "binding": { - "type": "bpmn:Message#property", - "name": "name" - } - }, - { - "type":"Hidden", - "value":"SnsHttpsSubscription", - "binding":{ - "type":"zeebe:property", - "name":"inbound.subtype" - } - }, - { - "label":"Subscription ID", - "type":"String", - "group":"subscription", - "binding":{ - "type":"zeebe:property", - "name":"inbound.context" - }, - "description":"The subscription ID is a part of the URL endpoint", - "constraints": { - "notEmpty": true - } - }, - { - "id": "securitySubscriptionAllowedFor", - "label": "Allow to receive messages from topic(s)", - "group": "subscription", - "description": "Control which topic(s) is allowed to start a process", - "value": "any", - "type": "Dropdown", - "choices": [ - { - "name": "Any", - "value": "any" - }, - { - "name": "Specific topic(s)", - "value": "specific" - } - ], - "binding": { - "type": "zeebe:property", - "name": "inbound.securitySubscriptionAllowedFor" - } - }, - { - "label": "Topic ARN(s)", - "description": "Topics that allow to publish messages", - "type": "String", - "group": "subscription", - "feel": "optional", - "binding": { - "type": "zeebe:property", - "name": "inbound.topicsAllowList" - }, - "constraints": { - "notEmpty": true - }, - "condition": { - "property": "securitySubscriptionAllowedFor", - "equals": "specific" - } - }, - { - "label": "Message ID expression", - "feel": "required", - "type": "String", - "optional": true, - "group": "activation", - "binding": { - "type": "zeebe:property", - "name": "messageIdExpression" - }, - "description": "Expression to extract unique identifier of a message" - }, - { - "label": "Condition", - "type": "String", - "group": "activation", - "feel": "required", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "activationCondition" - }, - "description": "Condition under which the connector triggers. Leave empty to catch all events" - }, - { - "label": "Correlation required", - "description": "Indicates whether correlation is required. This is needed for event-based subprocess message start events", - "id": "correlationRequired", - "group": "correlation", - "type": "Dropdown", - "value": "notRequired", - "choices": [ - { - "name": "Correlation not required", - "value": "notRequired" - }, - { - "name": "Correlation required", - "value": "required" - } - ], - "binding": { - "type": "zeebe:property", - "name": "correlationRequired" - } - }, - { - "label": "Correlation key (process)", - "type": "String", - "group": "correlation", - "feel": "required", - "description": "Sets up the correlation key from process variables", - "binding": { - "type": "bpmn:Message#zeebe:subscription#property", - "name": "correlationKey" - }, - "constraints": { - "notEmpty": true - }, - "condition": { - "property": "correlationRequired", - "equals": "required" - } - }, - { - "label": "Correlation key (payload)", - "type": "String", - "group": "correlation", - "feel": "required", - "binding": { - "type": "zeebe:property", - "name": "correlationKeyExpression" - }, - "description": "Extracts the correlation key from the incoming message payload", - "constraints": { - "notEmpty": true - }, - "condition": { - "property": "correlationRequired", - "equals": "required" - } - }, - { - "label": "Result variable", - "type": "String", - "group": "variable-mapping", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "resultVariable" - }, - "description": "Name of variable to store the result of the Connector in" - }, - { - "label":"Result expression", - "type": "String", - "group": "variable-mapping", - "feel": "required", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "resultExpression" - }, - "description": "Expression to map the inbound payload to process variables" - } - ], - "icon": { - "contents": "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: Sketch 64 (93537) - https://sketch.com --%3E%3Ctitle%3EIcon-Architecture/64/Arch_AWS-Simple-Notification-Service_64%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3ClinearGradient x1='0%25' y1='100%25' x2='100%25' y2='0%25' id='linearGradient-1'%3E%3Cstop stop-color='%23B0084D' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23FF4F8B' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg id='Icon-Architecture/64/Arch_AWS-Simple-Notification-Service_64' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Icon-Architecture-BG/64/Application-Integration' fill='url(%23linearGradient-1)'%3E%3Crect id='Rectangle' x='0' y='0' width='80' height='80'%3E%3C/rect%3E%3C/g%3E%3Cpath d='M17,38 C18.103,38 19,38.897 19,40 C19,41.103 18.103,42 17,42 C15.897,42 15,41.103 15,40 C15,38.897 15.897,38 17,38 L17,38 Z M41,64 C29.314,64 19.289,55.466 17.194,43.98 C18.965,43.894 20.427,42.659 20.857,41 L27,41 L27,39 L20.857,39 C20.427,37.342 18.966,36.107 17.195,36.02 C19.285,24.71 29.511,16 41,16 C45.313,16 49.832,17.622 54.429,20.821 L55.571,19.179 C50.633,15.743 45.73,14 41,14 C28.27,14 16.949,23.865 15.063,36.521 C13.839,37.207 13,38.5 13,40 C13,41.5 13.839,42.793 15.063,43.478 C16.97,56.341 28.056,66 41,66 C46.407,66 51.942,64.157 56.585,60.811 L55.415,59.189 C51.11,62.292 45.991,64 41,64 L41,64 Z M30.101,36.442 C31.955,36.895 34.275,37 36,37 C37.642,37 39.823,36.905 41.629,36.506 L37.105,45.553 C37.036,45.691 37,45.845 37,46 L37,50.453 C36.199,50.964 34.833,51.812 34,51.986 L34,46 C34,45.868 33.974,45.737 33.923,45.615 L30.101,36.442 Z M36,33 C40.025,33 42.174,33.604 42.841,34 C42.174,34.396 40.025,35 36,35 C31.975,35 29.826,34.396 29.159,34 C29.826,33.604 31.975,33 36,33 L36,33 Z M33,54 L34,54 C34.043,54 34.086,53.997 34.128,53.992 C35.352,53.833 36.909,52.887 38.272,52.013 L38.535,51.845 C38.824,51.661 39,51.342 39,51 L39,46.236 L44.559,35.12 C44.833,34.801 45,34.434 45,34 C45,31.39 39.361,31 36,31 C32.639,31 27,31.39 27,34 C27,34.366 27.12,34.684 27.32,34.967 L32,46.2 L32,53 C32,53.552 32.447,54 33,54 L33,54 Z M62,53 C63.103,53 64,53.897 64,55 C64,56.103 63.103,57 62,57 C60.897,57 60,56.103 60,55 C60,53.897 60.897,53 62,53 L62,53 Z M62,23 C63.103,23 64,23.897 64,25 C64,26.103 63.103,27 62,27 C60.897,27 60,26.103 60,25 C60,23.897 60.897,23 62,23 L62,23 Z M64,38 C65.103,38 66,38.897 66,40 C66,41.103 65.103,42 64,42 C62.897,42 62,41.103 62,40 C62,38.897 62.897,38 64,38 L64,38 Z M54,41 L60.143,41 C60.589,42.72 62.142,44 64,44 C66.206,44 68,42.206 68,40 C68,37.794 66.206,36 64,36 C62.142,36 60.589,37.28 60.143,39 L54,39 L54,26 L58.143,26 C58.589,27.72 60.142,29 62,29 C64.206,29 66,27.206 66,25 C66,22.794 64.206,21 62,21 C60.142,21 58.589,22.28 58.143,24 L53,24 C52.447,24 52,24.448 52,25 L52,39 L45,39 L45,41 L52,41 L52,55 C52,55.552 52.447,56 53,56 L58.143,56 C58.589,57.72 60.142,59 62,59 C64.206,59 66,57.206 66,55 C66,52.794 64.206,51 62,51 C60.142,51 58.589,52.28 58.143,54 L54,54 L54,41 Z' id='AWS-Simple-Notification-Service_Icon_64_Squid' fill='%23FFFFFF'%3E%3C/path%3E%3C/g%3E%3C/svg%3E" + "groups" : [ { + "id" : "subscription", + "label" : "Subscription Configuration" + }, { + "id" : "activation", + "label" : "Activation" + }, { + "id" : "correlation", + "label" : "Correlation" + }, { + "id" : "output", + "label" : "Output mapping" + } ], + "properties" : [ { + "value" : "io.camunda:aws-sns-webhook:1", + "binding" : { + "name" : "inbound.type", + "type" : "zeebe:property" + }, + "type" : "Hidden" + }, { + "id" : "inbound.context", + "label" : "Subscription ID", + "description" : "The subscription ID is a part of the URL endpoint", + "optional" : false, + "constraints" : { + "notEmpty" : true + }, + "group" : "subscription", + "binding" : { + "name" : "inbound.context", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "inbound.securitySubscriptionAllowedFor", + "label" : "Allow to receive messages from topic(s)", + "description" : "Control which topic(s) is allowed to start a process", + "optional" : false, + "value" : "any", + "group" : "subscription", + "binding" : { + "name" : "inbound.securitySubscriptionAllowedFor", + "type" : "zeebe:property" + }, + "type" : "Dropdown", + "choices" : [ { + "name" : "Any", + "value" : "any" + }, { + "name" : "Specific topic(s)", + "value" : "specific" + } ] + }, { + "id" : "inbound.topicsAllowList", + "label" : "Topic ARN(s)", + "description" : "Topics that allow to publish messages", + "optional" : true, + "feel" : "optional", + "group" : "subscription", + "binding" : { + "name" : "inbound.topicsAllowList", + "type" : "zeebe:property" + }, + "condition" : { + "property" : "inbound.securitySubscriptionAllowedFor", + "equals" : "specific", + "type" : "simple" + }, + "type" : "String" + }, { + "id" : "activationCondition", + "label" : "Activation condition", + "description" : "Condition under which the Connector triggers. Leave empty to catch all events", + "optional" : true, + "feel" : "required", + "group" : "activation", + "binding" : { + "name" : "activationCondition", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "correlationRequired", + "label" : "Subprocess correlation required", + "description" : "Indicates whether correlation is required. This is needed for event-based subprocess message start events", + "value" : "notRequired", + "group" : "correlation", + "binding" : { + "name" : "correlationRequired", + "type" : "zeebe:property" + }, + "type" : "Dropdown", + "choices" : [ { + "name" : "Correlation not required", + "value" : "notRequired" + }, { + "name" : "Correlation required", + "value" : "required" + } ] + }, { + "id" : "correlationKeyProcess", + "label" : "Correlation key (process)", + "description" : "Sets up the correlation key from process variables", + "constraints" : { + "notEmpty" : true + }, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "correlationKey", + "type" : "bpmn:Message#zeebe:subscription#property" + }, + "condition" : { + "property" : "correlationRequired", + "equals" : "required", + "type" : "simple" + }, + "type" : "String" + }, { + "id" : "correlationKeyPayload", + "label" : "Correlation key (payload)", + "description" : "Extracts the correlation key from the incoming message payload", + "constraints" : { + "notEmpty" : true + }, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "correlationKeyExpression", + "type" : "zeebe:property" + }, + "condition" : { + "property" : "correlationRequired", + "equals" : "required", + "type" : "simple" + }, + "type" : "String" + }, { + "id" : "messageIdExpression", + "label" : "Message ID expression", + "description" : "Expression to extract unique identifier of a message", + "optional" : true, + "feel" : "required", + "group" : "correlation", + "binding" : { + "name" : "messageIdExpression", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "messageNameUuid", + "generatedValue" : { + "type" : "uuid" + }, + "group" : "correlation", + "binding" : { + "name" : "name", + "type" : "bpmn:Message#property" + }, + "type" : "Hidden" + }, { + "id" : "resultVariable", + "label" : "Result variable", + "description" : "Name of variable to store the response in", + "group" : "output", + "binding" : { + "name" : "resultVariable", + "type" : "zeebe:property" + }, + "type" : "String" + }, { + "id" : "resultExpression", + "label" : "Result expression", + "description" : "Expression to map the response into process variables", + "feel" : "required", + "group" : "output", + "binding" : { + "name" : "resultExpression", + "type" : "zeebe:property" + }, + "type" : "Text" + } ], + "icon" : { + "contents" : "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTgnIGhlaWdodD0nMTgnIHZpZXdCb3g9JzAgMCA4MCA4MCcgdmVyc2lvbj0nMS4xJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnCiAgICAgeG1sbnM6eGxpbms9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnPjwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNjQgKDkzNTM3KSAtIGh0dHBzOi8vc2tldGNoLmNvbSAtLT4KICAgIDx0aXRsZT5JY29uLUFyY2hpdGVjdHVyZS82NC9BcmNoX0FXUy1TaW1wbGUtTm90aWZpY2F0aW9uLVNlcnZpY2VfNjQ8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9JzAlJyB5MT0nMTAwJScgeDI9JzEwMCUnIHkyPScwJScgaWQ9J2xpbmVhckdyYWRpZW50LTEnPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPScjQjAwODREJyBvZmZzZXQ9JzAlJz48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9JyNGRjRGOEInIG9mZnNldD0nMTAwJSc+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0nSWNvbi1BcmNoaXRlY3R1cmU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0MSBMNTIsNDEgTDUyLDU1IEM1Miw1NS41NTIgNTIuNDQ3LDU2IDUzLDU2IEw1OC4xNDMsNTYgQzU4LjU4OSw1Ny43MiA2MC4xNDIsNTkgNjIsNTkgQzY0LjIwNiw1OSA2Niw1Ny4yMDYgNjYsNTUgQzY2LDUyLjc5NCA2NC4yMDYsNTEgNjIsNTEgQzYwLjE0Miw1MSA1OC41ODksNTIuMjggNTguMTQzLDU0IEw1NCw1NCBMNTQsNDEgWicKICAgICAgICAgICAgICBpZD0nQVdTLVNpbXBsZS1Ob3RpZmljYXRpb24tU2VydmljZV9JY29uXzY0X1NxdWlkJyBmaWxsPScjRkZGRkZGJz48L3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==" } } \ No newline at end of file diff --git a/connectors/aws/aws-sns/element-templates/aws-sns-inbound-start-event.json b/connectors/aws/aws-sns/element-templates/aws-sns-inbound-start-event.json index d2b1bb4183..21e60cb5ee 100644 --- a/connectors/aws/aws-sns/element-templates/aws-sns-inbound-start-event.json +++ b/connectors/aws/aws-sns/element-templates/aws-sns-inbound-start-event.json @@ -1,141 +1,120 @@ { - "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", - "name": "SNS HTTPS Start Event Connector", - "id": "io.camunda.connectors.inbound.AWSSNS.StartEvent.v1", - "description": "Receive events from AWS SNS", - "version": 2, - "documentationRef": "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", - "category": { - "id": "connectors", - "name": "Connectors" + "$schema" : "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "name" : "SNS HTTPS Start Event Connector", + "id" : "io.camunda.connectors.inbound.AWSSNS.StartEvent.v1", + "description" : "Receive events from AWS SNS", + "documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", + "version" : 4, + "category" : { + "id" : "connectors", + "name" : "Connectors" }, - "appliesTo": [ - "bpmn:StartEvent" - ], - "elementType": { - "value": "bpmn:StartEvent" + "appliesTo" : [ "bpmn:StartEvent" ], + "elementType" : { + "value" : "bpmn:StartEvent" }, - "groups": [ - { - "id": "subscription", - "label": "Subscription configuration" + "groups" : [ { + "id" : "subscription", + "label" : "Subscription Configuration" + }, { + "id" : "activation", + "label" : "Activation" + }, { + "id" : "output", + "label" : "Output mapping" + } ], + "properties" : [ { + "value" : "io.camunda:aws-sns-webhook:1", + "binding" : { + "name" : "inbound.type", + "type" : "zeebe:property" }, - { - "id": "activation", - "label": "Activation" + "type" : "Hidden" + }, { + "id" : "inbound.context", + "label" : "Subscription ID", + "description" : "The subscription ID is a part of the URL endpoint", + "optional" : false, + "constraints" : { + "notEmpty" : true }, - { - "id": "variable-mapping", - "label": "Variable mapping" - } - ], - "properties": [ - { - "type": "Hidden", - "value": "io.camunda:aws-sns-webhook:1", - "binding": { - "type": "zeebe:property", - "name": "inbound.type" - } + "group" : "subscription", + "binding" : { + "name" : "inbound.context", + "type" : "zeebe:property" }, - { - "type": "Hidden", - "value": "SnsHttpsSubscription", - "binding": { - "type": "zeebe:property", - "name": "inbound.subtype" - } + "type" : "String" + }, { + "id" : "inbound.securitySubscriptionAllowedFor", + "label" : "Allow to receive messages from topic(s)", + "description" : "Control which topic(s) is allowed to start a process", + "optional" : false, + "value" : "any", + "group" : "subscription", + "binding" : { + "name" : "inbound.securitySubscriptionAllowedFor", + "type" : "zeebe:property" }, - { - "label": "Subscription ID", - "type": "String", - "group": "subscription", - "binding": { - "type": "zeebe:property", - "name": "inbound.context" - }, - "description": "The subscription ID is a part of the URL endpoint", - "constraints": { - "notEmpty": true - } + "type" : "Dropdown", + "choices" : [ { + "name" : "Any", + "value" : "any" + }, { + "name" : "Specific topic(s)", + "value" : "specific" + } ] + }, { + "id" : "inbound.topicsAllowList", + "label" : "Topic ARN(s)", + "description" : "Topics that allow to publish messages", + "optional" : true, + "feel" : "optional", + "group" : "subscription", + "binding" : { + "name" : "inbound.topicsAllowList", + "type" : "zeebe:property" }, - { - "id": "securitySubscriptionAllowedFor", - "label": "Allow to receive messages from topic(s)", - "group": "subscription", - "description": "Control which topic(s) is allowed to start a process", - "value": "any", - "type": "Dropdown", - "choices": [ - { - "name": "Any", - "value": "any" - }, - { - "name": "Specific topic(s)", - "value": "specific" - } - ], - "binding": { - "type": "zeebe:property", - "name": "inbound.securitySubscriptionAllowedFor" - } + "condition" : { + "property" : "inbound.securitySubscriptionAllowedFor", + "equals" : "specific", + "type" : "simple" }, - { - "label": "Topic ARN(s)", - "description": "Topics that allow to publish messages", - "type": "String", - "group": "subscription", - "feel": "optional", - "binding": { - "type": "zeebe:property", - "name": "inbound.topicsAllowList" - }, - "constraints": { - "notEmpty": true - }, - "condition": { - "property": "securitySubscriptionAllowedFor", - "equals": "specific" - } + "type" : "String" + }, { + "id" : "activationCondition", + "label" : "Activation condition", + "description" : "Condition under which the Connector triggers. Leave empty to catch all events", + "optional" : true, + "feel" : "required", + "group" : "activation", + "binding" : { + "name" : "activationCondition", + "type" : "zeebe:property" }, - { - "label": "Condition", - "type": "String", - "group": "activation", - "feel": "required", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "activationCondition" - }, - "description": "Condition under which the connector triggers. Leave empty to catch all events" + "type" : "String" + }, { + "id" : "resultVariable", + "label" : "Result variable", + "description" : "Name of variable to store the response in", + "group" : "output", + "binding" : { + "name" : "resultVariable", + "type" : "zeebe:property" }, - { - "label": "Result variable", - "type": "String", - "group": "variable-mapping", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "resultVariable" - }, - "description": "Name of variable to store the result of the connector in" + "type" : "String" + }, { + "id" : "resultExpression", + "label" : "Result expression", + "description" : "Expression to map the response into process variables", + "feel" : "required", + "group" : "output", + "binding" : { + "name" : "resultExpression", + "type" : "zeebe:property" }, - { - "label": "Result expression", - "type": "String", - "group": "variable-mapping", - "feel": "required", - "optional": true, - "binding": { - "type": "zeebe:property", - "name": "resultExpression" - }, - "description": "Expression to map the inbound payload to process variables" - } - ], - "icon": { - "contents": "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: Sketch 64 (93537) - https://sketch.com --%3E%3Ctitle%3EIcon-Architecture/64/Arch_AWS-Simple-Notification-Service_64%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3ClinearGradient x1='0%25' y1='100%25' x2='100%25' y2='0%25' id='linearGradient-1'%3E%3Cstop stop-color='%23B0084D' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23FF4F8B' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg id='Icon-Architecture/64/Arch_AWS-Simple-Notification-Service_64' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Icon-Architecture-BG/64/Application-Integration' fill='url(%23linearGradient-1)'%3E%3Crect id='Rectangle' x='0' y='0' width='80' height='80'%3E%3C/rect%3E%3C/g%3E%3Cpath d='M17,38 C18.103,38 19,38.897 19,40 C19,41.103 18.103,42 17,42 C15.897,42 15,41.103 15,40 C15,38.897 15.897,38 17,38 L17,38 Z M41,64 C29.314,64 19.289,55.466 17.194,43.98 C18.965,43.894 20.427,42.659 20.857,41 L27,41 L27,39 L20.857,39 C20.427,37.342 18.966,36.107 17.195,36.02 C19.285,24.71 29.511,16 41,16 C45.313,16 49.832,17.622 54.429,20.821 L55.571,19.179 C50.633,15.743 45.73,14 41,14 C28.27,14 16.949,23.865 15.063,36.521 C13.839,37.207 13,38.5 13,40 C13,41.5 13.839,42.793 15.063,43.478 C16.97,56.341 28.056,66 41,66 C46.407,66 51.942,64.157 56.585,60.811 L55.415,59.189 C51.11,62.292 45.991,64 41,64 L41,64 Z M30.101,36.442 C31.955,36.895 34.275,37 36,37 C37.642,37 39.823,36.905 41.629,36.506 L37.105,45.553 C37.036,45.691 37,45.845 37,46 L37,50.453 C36.199,50.964 34.833,51.812 34,51.986 L34,46 C34,45.868 33.974,45.737 33.923,45.615 L30.101,36.442 Z M36,33 C40.025,33 42.174,33.604 42.841,34 C42.174,34.396 40.025,35 36,35 C31.975,35 29.826,34.396 29.159,34 C29.826,33.604 31.975,33 36,33 L36,33 Z M33,54 L34,54 C34.043,54 34.086,53.997 34.128,53.992 C35.352,53.833 36.909,52.887 38.272,52.013 L38.535,51.845 C38.824,51.661 39,51.342 39,51 L39,46.236 L44.559,35.12 C44.833,34.801 45,34.434 45,34 C45,31.39 39.361,31 36,31 C32.639,31 27,31.39 27,34 C27,34.366 27.12,34.684 27.32,34.967 L32,46.2 L32,53 C32,53.552 32.447,54 33,54 L33,54 Z M62,53 C63.103,53 64,53.897 64,55 C64,56.103 63.103,57 62,57 C60.897,57 60,56.103 60,55 C60,53.897 60.897,53 62,53 L62,53 Z M62,23 C63.103,23 64,23.897 64,25 C64,26.103 63.103,27 62,27 C60.897,27 60,26.103 60,25 C60,23.897 60.897,23 62,23 L62,23 Z M64,38 C65.103,38 66,38.897 66,40 C66,41.103 65.103,42 64,42 C62.897,42 62,41.103 62,40 C62,38.897 62.897,38 64,38 L64,38 Z M54,41 L60.143,41 C60.589,42.72 62.142,44 64,44 C66.206,44 68,42.206 68,40 C68,37.794 66.206,36 64,36 C62.142,36 60.589,37.28 60.143,39 L54,39 L54,26 L58.143,26 C58.589,27.72 60.142,29 62,29 C64.206,29 66,27.206 66,25 C66,22.794 64.206,21 62,21 C60.142,21 58.589,22.28 58.143,24 L53,24 C52.447,24 52,24.448 52,25 L52,39 L45,39 L45,41 L52,41 L52,55 C52,55.552 52.447,56 53,56 L58.143,56 C58.589,57.72 60.142,59 62,59 C64.206,59 66,57.206 66,55 C66,52.794 64.206,51 62,51 C60.142,51 58.589,52.28 58.143,54 L54,54 L54,41 Z' id='AWS-Simple-Notification-Service_Icon_64_Squid' fill='%23FFFFFF'%3E%3C/path%3E%3C/g%3E%3C/svg%3E" + "type" : "Text" + } ], + "icon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QsNDEgWicKICAgICAgICAgICAgICBpZD0nQVdTLVNpbXBsZS1Ob3RpZmljYXRpb24tU2VydmljZV9JY29uXzY0X1NxdWlkJyBmaWxsPScjRkZGRkZGJz48L3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==" } } \ No newline at end of file diff --git a/connectors/aws/aws-sns/pom.xml b/connectors/aws/aws-sns/pom.xml index b3af4da401..fa658f5902 100644 --- a/connectors/aws/aws-sns/pom.xml +++ b/connectors/aws/aws-sns/pom.xml @@ -66,6 +66,27 @@ except in compliance with the proprietary license. + + io.camunda.connector.sns.inbound.SnsWebhookExecutable + + + io.camunda.connectors.inbound.AWSSNS.StartEvent.v1 + aws-sns-inbound-start-event.json + + + io.camunda.connectors.inbound.AWSSNS.MessageStartEvent.v1 + aws-sns-inbound-message-start.json + + + io.camunda.connectors.inbound.AWSSNS.IntermediateCatchEvent.v1 + aws-sns-inbound-intermediate.json + + + io.camunda.connectors.inbound.AWSSNS.Boundary.v1 + aws-sns-inbound-boundary.json + + + io.camunda.connector:connector-aws-base diff --git a/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/SnsWebhookExecutable.java b/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/SnsWebhookExecutable.java index 36176a3be6..44d0364531 100644 --- a/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/SnsWebhookExecutable.java +++ b/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/SnsWebhookExecutable.java @@ -18,7 +18,12 @@ import io.camunda.connector.api.inbound.webhook.WebhookProcessingPayload; import io.camunda.connector.api.inbound.webhook.WebhookResult; import io.camunda.connector.aws.ObjectMapperSupplier; +import io.camunda.connector.generator.dsl.BpmnType; +import io.camunda.connector.generator.java.annotation.ElementTemplate; +import io.camunda.connector.generator.java.annotation.ElementTemplate.ConnectorElementType; +import io.camunda.connector.generator.java.annotation.ElementTemplate.PropertyGroup; import io.camunda.connector.sns.inbound.model.SnsWebhookConnectorProperties; +import io.camunda.connector.sns.inbound.model.SnsWebhookConnectorProperties.SnsWebhookConnectorPropertiesWrapper; import io.camunda.connector.sns.inbound.model.SnsWebhookProcessingResult; import io.camunda.connector.sns.inbound.model.SubscriptionAllowListFlag; import io.camunda.connector.sns.suppliers.SnsClientSupplier; @@ -26,14 +31,42 @@ import java.io.IOException; import java.util.Map; import java.util.Optional; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; @InboundConnector(name = "AWS SNS Inbound", type = "io.camunda:aws-sns-webhook:1") +@ElementTemplate( + id = "io.camunda.connectors.AWSSNS.inbound.v1", + name = "SNS HTTPS Connectorr", + icon = "icon.svg", + version = 4, + inputDataClass = SnsWebhookConnectorPropertiesWrapper.class, + description = "Receive events from AWS SNS", + documentationRef = + "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/amazon-sns/?amazonsns=inbound", + propertyGroups = {@PropertyGroup(id = "subscription", label = "Subscription Configuration")}, + elementTypes = { + @ConnectorElementType( + appliesTo = BpmnType.START_EVENT, + elementType = BpmnType.START_EVENT, + templateIdOverride = "io.camunda.connectors.inbound.AWSSNS.StartEvent.v1", + templateNameOverride = "SNS HTTPS Start Event Connector"), + @ConnectorElementType( + appliesTo = BpmnType.START_EVENT, + elementType = BpmnType.MESSAGE_START_EVENT, + templateIdOverride = "io.camunda.connectors.inbound.AWSSNS.MessageStartEvent.v1", + templateNameOverride = "SNS HTTPS Message Start Event Connector Subscription"), + @ConnectorElementType( + appliesTo = {BpmnType.INTERMEDIATE_THROW_EVENT, BpmnType.INTERMEDIATE_CATCH_EVENT}, + elementType = BpmnType.INTERMEDIATE_CATCH_EVENT, + templateIdOverride = "io.camunda.connectors.inbound.AWSSNS.IntermediateCatchEvent.v1", + templateNameOverride = "SNS HTTPS Intermediate Catch Event Connector"), + @ConnectorElementType( + appliesTo = BpmnType.BOUNDARY_EVENT, + elementType = BpmnType.BOUNDARY_EVENT, + templateIdOverride = "io.camunda.connectors.inbound.AWSSNS.Boundary.v1", + templateNameOverride = "SNS HTTPS Boundary Event Connector") + }) public class SnsWebhookExecutable implements WebhookConnectorExecutable { - private static final Logger LOGGER = LoggerFactory.getLogger(SnsWebhookExecutable.class); - protected static final String TOPIC_ARN_HEADER = "x-amz-sns-topic-arn"; private final ObjectMapper objectMapper; @@ -92,13 +125,13 @@ private SnsWebhookProcessingResult handleNotification( private void checkMessageAllowListed(WebhookProcessingPayload webhookProcessingPayload) throws Exception { - if (SubscriptionAllowListFlag.specific.equals(props.getSubscriptionAllowListFlag()) + if (SubscriptionAllowListFlag.specific.equals(props.securitySubscriptionAllowedFor()) && !props - .getSubscriptionAllowList() + .topicsAllowListParsed() .contains(webhookProcessingPayload.headers().get(TOPIC_ARN_HEADER))) { throw new Exception( "Request didn't match allow list. Allow list: " - + props.getSubscriptionAllowList() + + props.topicsAllowListParsed() + ". Request coming from " + webhookProcessingPayload.headers().get(TOPIC_ARN_HEADER)); } @@ -109,7 +142,9 @@ public void activate(InboundConnectorContext context) throws Exception { if (context == null) { throw new Exception("Inbound connector context cannot be null"); } - props = new SnsWebhookConnectorProperties(context.getProperties()); + props = + new SnsWebhookConnectorProperties( + context.bindProperties(SnsWebhookConnectorPropertiesWrapper.class)); } // Topic ARN header has a format arn:aws:sns:region-xyz:000011112222:TopicName, and diff --git a/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/model/SnsWebhookConnectorProperties.java b/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/model/SnsWebhookConnectorProperties.java index f1f7acae25..0a1d9a1215 100644 --- a/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/model/SnsWebhookConnectorProperties.java +++ b/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/model/SnsWebhookConnectorProperties.java @@ -6,93 +6,64 @@ */ package io.camunda.connector.sns.inbound.model; +import io.camunda.connector.generator.dsl.Property.FeelMode; +import io.camunda.connector.generator.java.annotation.TemplateProperty; +import io.camunda.connector.generator.java.annotation.TemplateProperty.DropdownPropertyChoice; +import io.camunda.connector.generator.java.annotation.TemplateProperty.PropertyCondition; +import io.camunda.connector.generator.java.annotation.TemplateProperty.PropertyType; +import jakarta.validation.constraints.NotBlank; import java.util.Arrays; -import java.util.Collections; import java.util.List; -import java.util.Map; -import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; -public class SnsWebhookConnectorProperties { +public record SnsWebhookConnectorProperties( + @TemplateProperty( + id = "context", + label = "Subscription ID", + group = "subscription", + description = "The subscription ID is a part of the URL endpoint", + feel = FeelMode.disabled) + @NotBlank + String context, + @TemplateProperty( + id = "securitySubscriptionAllowedFor", + label = "Allow to receive messages from topic(s)", + group = "subscription", + description = "Control which topic(s) is allowed to start a process", + defaultValue = "any", + type = PropertyType.Dropdown, + choices = { + @DropdownPropertyChoice(label = "Any", value = "any"), + @DropdownPropertyChoice(label = "Specific topic(s)", value = "specific") + }) + SubscriptionAllowListFlag securitySubscriptionAllowedFor, + @TemplateProperty( + id = "topicsAllowList", + label = "Topic ARN(s)", + group = "subscription", + description = "Topics that allow to publish messages", + optional = true, + condition = + @PropertyCondition( + property = "inbound.securitySubscriptionAllowedFor", + equals = "specific"), + feel = FeelMode.optional) + String topicsAllowList, + @TemplateProperty(ignore = true) List topicsAllowListParsed) { - private final Map genericProperties; - private String context; - private SubscriptionAllowListFlag subscriptionAllowListFlag; - private List subscriptionAllowList; - - public SnsWebhookConnectorProperties(Map properties) { - this.genericProperties = (Map) properties.get("inbound"); - this.context = genericProperties.get("context"); - // If no value somehow passed, force it to specific. - // In this case, BPMN process might fail but at the same time, we enforce security. - this.subscriptionAllowListFlag = - SubscriptionAllowListFlag.valueOf( - genericProperties.getOrDefault( - "securitySubscriptionAllowedFor", SubscriptionAllowListFlag.specific.name())); - this.subscriptionAllowList = - Arrays.stream(genericProperties.getOrDefault("topicsAllowList", "").trim().split(",")) - .collect(Collectors.toList()); - } - - public Map getGenericProperties() { - return genericProperties; - } - - public String getContext() { - return context; - } - - public SubscriptionAllowListFlag getSubscriptionAllowListFlag() { - return Optional.ofNullable(subscriptionAllowListFlag) - .orElse(SubscriptionAllowListFlag.specific); - } - - public List getSubscriptionAllowList() { - return Optional.ofNullable(subscriptionAllowList).orElse(Collections.emptyList()); - } - - public void setContext(String context) { - this.context = context; - } - - public void setSubscriptionAllowListFlag(SubscriptionAllowListFlag subscriptionAllowListFlag) { - this.subscriptionAllowListFlag = subscriptionAllowListFlag; - } - - public void setSubscriptionAllowList(List subscriptionAllowList) { - this.subscriptionAllowList = subscriptionAllowList; + public SnsWebhookConnectorProperties(SnsWebhookConnectorPropertiesWrapper wrapper) { + this( + wrapper.inbound().context(), + wrapper.inbound().securitySubscriptionAllowedFor(), + wrapper.inbound().topicsAllowList(), + Arrays.stream( + Optional.ofNullable(wrapper.inbound().topicsAllowList()) + .orElse("") + .trim() + .split(",")) + .collect(Collectors.toList())); } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - SnsWebhookConnectorProperties that = (SnsWebhookConnectorProperties) o; - return Objects.equals(genericProperties, that.genericProperties) - && Objects.equals(context, that.context) - && subscriptionAllowListFlag == that.subscriptionAllowListFlag - && Objects.equals(subscriptionAllowList, that.subscriptionAllowList); - } - - @Override - public int hashCode() { - return Objects.hash( - genericProperties, context, subscriptionAllowListFlag, subscriptionAllowList); - } - - @Override - public String toString() { - return "SnsWebhookConnectorProperties{" - + "genericProperties=" - + genericProperties - + ", context='" - + context - + '\'' - + ", subscriptionAllowListFlag=" - + subscriptionAllowListFlag - + ", subscriptionAllowList=" - + subscriptionAllowList - + '}'; - } + public record SnsWebhookConnectorPropertiesWrapper(SnsWebhookConnectorProperties inbound) {} } diff --git a/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/model/SnsWebhookProcessingResult.java b/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/model/SnsWebhookProcessingResult.java index d40d36c324..e1a08402d1 100644 --- a/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/model/SnsWebhookProcessingResult.java +++ b/connectors/aws/aws-sns/src/main/java/io/camunda/connector/sns/inbound/model/SnsWebhookProcessingResult.java @@ -12,22 +12,8 @@ import java.util.Map; import java.util.Optional; -public class SnsWebhookProcessingResult implements WebhookResult { - - private MappedHttpRequest request; - private Map connectorData; - - public SnsWebhookProcessingResult() {} - - public SnsWebhookProcessingResult(MappedHttpRequest request, Map connectorData) { - this.request = request; - this.connectorData = connectorData; - } - - @Override - public MappedHttpRequest request() { - return request; - } +public record SnsWebhookProcessingResult( + MappedHttpRequest request, Map connectorData) implements WebhookResult { @Override public Map connectorData() { diff --git a/connectors/aws/aws-sns/src/test/java/io/camunda/connector/sns/inbound/SnsWebhookExecutableTest.java b/connectors/aws/aws-sns/src/test/java/io/camunda/connector/sns/inbound/SnsWebhookExecutableTest.java index 45dc5bb51f..5b34e62a87 100644 --- a/connectors/aws/aws-sns/src/test/java/io/camunda/connector/sns/inbound/SnsWebhookExecutableTest.java +++ b/connectors/aws/aws-sns/src/test/java/io/camunda/connector/sns/inbound/SnsWebhookExecutableTest.java @@ -19,7 +19,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import io.camunda.connector.api.inbound.InboundConnectorContext; import io.camunda.connector.api.inbound.webhook.WebhookProcessingPayload; +import io.camunda.connector.aws.ObjectMapperSupplier; import io.camunda.connector.sns.suppliers.SnsClientSupplier; +import io.camunda.connector.test.inbound.InboundConnectorContextBuilder; +import io.camunda.connector.validation.impl.DefaultValidationProvider; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; @@ -100,7 +103,7 @@ void triggerWebhook_SubscriptionAnyTopicAllowed_HappyCase() throws Exception { "context", "snstest", "securitySubscriptionAllowedFor", "any")); - when(ctx.getProperties()).thenReturn(actualBPMNProperties); + ctx = createConnectorContext(actualBPMNProperties); // Configure payload final var headers = new HashMap<>(snsRequestHeaders); @@ -134,7 +137,7 @@ void triggerWebhook_SubscriptionAllowlistSingleTopic_HappyCase() throws Exceptio "securitySubscriptionAllowedFor", "specific", "topicsAllowList", "arn:aws:sns:eu-central-1:111222333444:SNSWebhook")); - when(ctx.getProperties()).thenReturn(actualBPMNProperties); + ctx = createConnectorContext(actualBPMNProperties); // Configure payload final var headers = new HashMap<>(snsRequestHeaders); @@ -171,7 +174,7 @@ void triggerWebhook_SubscriptionAllowlistMultipleTopics_HappyCase() throws Excep "topicsAllowList", "arn:aws:sns:eu-central-1:111222333444:SNSWebhook, arn:aws:sns:eu-central-1:111222333444:AnotherTopic")); - when(ctx.getProperties()).thenReturn(actualBPMNProperties); + ctx = createConnectorContext(actualBPMNProperties); // Configure payload final var headers = new HashMap<>(snsRequestHeaders); @@ -205,7 +208,7 @@ void triggerWebhook_SubscriptionNoAllowlistTopic_RaiseException() throws Excepti "securitySubscriptionAllowedFor", "specific", "topicsAllowList", "arn:aws:sns:eu-central-1:111222333444:WrongTopic")); - when(ctx.getProperties()).thenReturn(actualBPMNProperties); + ctx = createConnectorContext(actualBPMNProperties); // Configure payload final var headers = new HashMap<>(snsRequestHeaders); @@ -234,7 +237,7 @@ void triggerWebhook_SubscriptionAllowListEmpty_RaiseException() throws Exception "context", "snstest", "securitySubscriptionAllowedFor", "specific")); - when(ctx.getProperties()).thenReturn(actualBPMNProperties); + ctx = createConnectorContext(actualBPMNProperties); // Configure payload final var headers = new HashMap<>(snsRequestHeaders); @@ -263,7 +266,7 @@ void triggerWebhook_Notification_HappyCase() throws Exception { "context", "snstest", "securitySubscriptionAllowedFor", "any")); - when(ctx.getProperties()).thenReturn(actualBPMNProperties); + ctx = createConnectorContext(actualBPMNProperties); // Configure payload final var headers = new HashMap<>(snsRequestHeaders); @@ -295,6 +298,7 @@ void triggerWebhook_UnknownMessage_ThrowsException() throws Exception { "securitySubscriptionAllowedFor", "any")); when(ctx.getProperties()).thenReturn(actualBPMNProperties); + ctx = createConnectorContext(actualBPMNProperties); // Configure payload final var headers = new HashMap<>(snsRequestHeaders); @@ -311,4 +315,12 @@ void triggerWebhook_UnknownMessage_ThrowsException() throws Exception { testObject.activate(ctx); Assert.assertThrows(Exception.class, () -> testObject.triggerWebhook(payload)); } + + private InboundConnectorContext createConnectorContext(Map properties) { + return InboundConnectorContextBuilder.create() + .properties(properties) + .objectMapper(ObjectMapperSupplier.getMapperInstance()) + .validation(new DefaultValidationProvider()) + .build(); + } }