Git Product home page Git Product logo

connector-template-inbound's Introduction

A template for new C8 inbound Connectors.

To use this template update the following resources to match the name of your connector:

...and delete this hint.

Read more about creating Connectors

Check out the Connectors SDK

Inbound Connector Template

Camunda Inbound Connector Template

Build

You can package the Connector by running the following command:

mvn clean package

This will create the following artifacts:

  • A thin JAR without dependencies.
  • An uber JAR containing all dependencies, potentially shaded to avoid classpath conflicts. This will not include the SDK artifacts since those are in scope provided and will be brought along by the respective Connector Runtime executing the Connector.

Shading dependencies

You can use the maven-shade-plugin defined in the Maven configuration to relocate common dependencies that are used in other Connectors and the Connector Runtime. This helps to avoid classpath conflicts when the Connector is executed.

Use the relocations configuration in the Maven Shade plugin to define the dependencies that should be shaded. The Maven Shade documentation provides more details on relocations.

API

Connector Properties

This Connector can be configured with the following properties:

Name Description Example Can be a secret
sender Value of the sender field of the messages generated by MockSubscription Alice Yes
messagesPerMinute How many messages per minute should MockSubscription produce (1-10) 3 No

Output

This Connector produces the following output:

{
  "event": {
    "sender": ".....",
    "message": ".....",
    "code": 999
  }
}

Test locally

Run unit tests

mvn clean verify

Test with local runtime

Use the Camunda Connector Runtime to run your function as a local Java application.

In your IDE you can also simply navigate to the LocalContainerRuntime class in test scope and run it via your IDE. If necessary, you can adjust application.properties in test scope.

Element Template

The element templates can be found in the element-templates/inbound-template-connector.json file.

connector-template-inbound's People

Contributors

renovate[bot] avatar chillleader avatar markfarkas-camunda avatar sbuettner avatar igpetrov avatar superbeagle avatar oleksiivanov avatar

Stargazers

Иван Карло avatar

Watchers

Jonathan avatar Clément Nero avatar Ev avatar  avatar  avatar

connector-template-inbound's Issues

Replace mock subscription with a real-life example

Is your feature request related to a problem? Please describe.

Currently this repository uses a mock subscription mechanism. We received feedback that this concept is non-intuitive (not immediately clear why the inbound connector would generate events for itself).

Describe the solution you'd like

It would be nice to replace the mock subscription with something closer to the real life. For example, with a simplified version of the File Watch Connector.

Describe alternatives you've considered

Keep the current mock subscription.

Add Inbound intermediate connector element template

We support both start event and intermediate event inbound connectors, but this repository only contains a template for start event connector.

We need to add an example of the element template for an intermediate event.

Add an example of async subscription execution

What should we do?

Add an example of using CompletableFuture or ExecutorService to execute the connector asynchronously.

Why should we do it?

To illustrate how such connectors are used in the real world.

Add test examples

What should we do?

Add an example of how we can use the functionality provided by connector-test dependency to test custom inbound connector implementations. In particular, the examples should make use of InboundConnectorContextBuilder from connector-test, and be similar to the tests defined in the outbound connector template repository.

Why should we do it?

To make it clear how to test inbound connectors.

inbound-template-connector.json needs update of property inbound.type

Describe the Bug

File inbound-template-connector.json
line: 30 value "io.camunda.mytestinbound:1" must be changed to "io.camunda.my-inbound-connector:"1

Steps to Reproduce

  1. do this
  2. do that

Expected Behavior

Environment

  • OS: [e.g. Windows 7]
  • Library version: [e.g. 2.0.0]
  • Camunda Cloud Environment: [e.g. staging / prod, cluster]

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

asdf
.tool-versions
  • java 21.0.4+7.0.LTS
  • maven 3.8.4
  • python 3.12.5
github-actions
.github/workflows/CI.yaml
  • actions/checkout v4
  • actions/setup-java v4
maven
pom.xml
  • io.camunda.connector:connector-core 8.5.6
  • io.camunda.connector:connector-validation 8.5.6
  • org.slf4j:slf4j-api 2.0.16
  • com.fasterxml.jackson.core:jackson-annotations 2.17.2
  • com.fasterxml.jackson.core:jackson-core 2.17.2
  • com.fasterxml.jackson.core:jackson-databind 2.17.2
  • com.fasterxml.jackson.datatype:jackson-datatype-jdk8 2.17.2
  • com.fasterxml.jackson.datatype:jackson-datatype-jsr310 2.17.2
  • com.fasterxml.jackson.module:jackson-module-parameter-names 2.17.2
  • org.junit.jupiter:junit-jupiter 5.11.0
  • org.mockito:mockito-junit-jupiter 5.12.0
  • org.assertj:assertj-core 3.26.3
  • org.slf4j:slf4j-jdk14 2.0.16
  • io.camunda.connector:spring-boot-starter-camunda-connectors 8.5.6
  • org.apache.maven.plugins:maven-clean-plugin 3.4.0
  • org.apache.maven.plugins:maven-dependency-plugin 3.8.0
  • org.apache.maven.plugins:maven-resources-plugin 3.3.1
  • org.apache.maven.plugins:maven-compiler-plugin 3.13.0
  • org.apache.maven.plugins:maven-jar-plugin 3.4.2
  • org.apache.maven.plugins:maven-install-plugin 3.1.3
  • org.apache.maven.plugins:maven-shade-plugin 3.6.0
  • org.apache.maven.plugins:maven-surefire-plugin 3.4.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.