Git Product home page Git Product logo

connectors's Introduction

Camunda Connectors

CI Maven Central Outbound template Inbound template

This is the repository for Camunda Connectors. It manages all parts of the Connectors ecosystem, including the Connector SDK, out-of-the-box Connectors available in Camunda, the Connector Runtime, and the Docker images.

For more information on Connectors, refer to the Camunda documentation.

Contents

License

This is a multi-module project with different licenses applied to different modules.

Modules available under Apache 2.0 license

When in doubt, refer to the LICENSE file in the respective module.

Create a Connector

Include the connector-core, e.g. via Maven:

<dependency>
  <groupId>io.camunda.connector</groupId>
  <artifactId>connector-core</artifactId>
  <version>${version.connectors}</version>
  <scope>provided</scope>
</dependency>

Set the dependency to a provided scope as the runtimes that execute Connectors provide the necessary classes already.

To find the latest version, check the Maven Central repository.

Outbound Connector

Define your Connector logic through the OutboundConnectorFunction interface:

@OutboundConnector(
  name = "PING",
  inputVariables = {"caller"},
  type = "io.camunda.example.PingConnector:1"
)
public class PingConnector implements OutboundConnectorFunction {

  @Override
  public Object execute(OutboundConnectorContext context) throws Exception {
    var request = context.bindVariables(PingRequest.class);
    var caller = request.getCaller();
    return new PingResponse("Pong to " + caller);
  }
}

Inbound Connector

Define your Connector logic through the InboundConnectorExecutable interface:

@InboundConnector(
  name = "SUBSCRIPTION",
  type = "io.camunda.example.SubscriptionConnector:1"
)
public class SubscriptionConnector implements InboundConnectorExecutable {

  private MockSubscription subscription; // imitates some real-world subscription

  @Override
  public void activate(InboundConnectorContext context) throws Exception {
    var properties = context.bindProperties(SubscriptionProperties.class);
    // subscribe to events
    subscription = new MockSubscription(properties.getTopic());
    subscription.subscribe(event -> {
      context.correlate(event);
    });
  }

  @Override
  public void deactivate() throws Exception {
    // unsubscribe from events
    subscription.shutdown();
  }
}

Connector Discovery

The SDK provides a default implementation for Connector discovery using Java ServiceLoader with the connector-runtime-core module.

To make your Connector discoverable, expose the OutboundConnectorFunction or InboundConnectorExecutable implementation as an SPI implementation. Alternatively, you can use the manual discovery mechanism via properties.

Connector Validation

If you want to validate your Connector input, the SDK provides a default implementation using Jakarta Bean Validation with the connector-validation module. You can include it via maven with the following dependency:

<dependency>
  <groupId>io.camunda.connector</groupId>
  <artifactId>connector-validation</artifactId>
  <version>${version.connectors}</version>
  <scope>provided</scope>
</dependency>

Set the dependency to a provided scope as the runtimes that execute Connectors provide the necessary classes already.

Find more details in the validation module.

Start a Connector

Connector runtime supports running outbound Connectors as job workers and manages the lifecycle of the inbound Connectors. You can also build your own runtime, tailored towards your environment. For more details, refer to the connector-runtime module.

Build

mvn clean package

Build a release

  1. For minor releases (x.y.0), create a new branch release/x.y from main in advance and rebase it onto main from time to time. This can be done using the CREATE_RELEASE_BRANCH workflow.
  2. To trigger the release, publish a new GitHub release and name the tag according to the version you want to release (e.g. 1.0.0). This will trigger a GitHub workflow that builds and publishes the release artifacts, generates a changelog and bundles the element templates into an archive.

Backport a PR to an older release

We use [backport-action](https://github.com/korthout/backport-action) to backport PRs to older releases. For example, add a label backport release/8.3 to backport a PR to the release/8.3 branch. This will take effect when the PR is meged.

You can also trigger this for already merged PRs by posting a comment on the PR containing /backport.

connectors's People

Contributors

renovate[bot] avatar igpetrov avatar github-actions[bot] avatar oleksiivanov avatar chillleader avatar tmetzke avatar menski avatar sbuettner avatar berndruecker avatar nikku avatar renovate-bot avatar markfarkas-camunda avatar mbiciin avatar vil02 avatar jonathanlukas avatar akulminskyi avatar jessesimpson36 avatar rob2universe avatar manueldittmar avatar pucilowski avatar maxtru avatar mcalm avatar bulivlad avatar

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.