• Stars
    star
    165
  • Rank 228,906 (Top 5 %)
  • Language
    C#
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Showcase using Camunda BPM on .NET Platform with C# (no Java Coding required!)

Using Camunda BPM and .NET - Showcase using C#

You do not need to code Java in order to develop on Camunda BPM. This Showcase demonstrates how to use Camunda BPM in combination with the .NET-Platform. All code examples are given in C#.

A class library named "Camunda Client" is contained, which can serve as a basis for your own projects using Camunda. It abstracts the details of remote communication with the Camunda BPM Platform.

Camunda introduction blog posts

Run the examples

A Process Application in C#

A process application might be a simple console application in C#. The following screenshot shows the content of the InsuranceApplicationCamundaTasklist console appplication:

Project Layout

It consists of:

  • Models (BPMN, CMMN or DMN): You can add models to your application. If you configure them to be "embedded resources" they can be scanned by the "Camunda Client", which deployes them to the Camunda Engine via REST-API.

  • External Task Workers: Service Tasks and Send Tasks can be implemented using External Tasks. This means, you only enter a so called "Topic"-Name in the BPMN model and query tasks for External Workers via REST API. The workers can be fully implememted in C#.

  • Task Forms (HTML): If you want to use the Camunda Tasklist you can leverage [Embedded Task Forms] (https://docs.camunda.org/manual/7.5/user-guide/task-forms/#embedded-task-forms) - HTML Snippets which are shown for certain User Tasks. The HTML forms can be added to the application. If configured as "embedded resource" they can be scanned by the "Camunda Client", which deployes them to the Camunda Engine via REST-API.

If you do not want to use the Camunda Tasklist, you can also write your own

  • Custom Tasklist: This showcase contains a complete Tasklist written in WPF. Now you can add WPF-Pages to be shown for certain User Tasks.

Architecture

Implementing Service Tasks

When using the Camunda Client a Worker is as easy as CalculationWorker:

    [ExternalTaskTopic("calculate")]
    [ExternalTaskVariableRequirements("x", "y")]
    class CalculationAdapter : IExternalTaskAdapter
    {

        public void Execute(ExternalTask externalTask, ref Dictionary<string, object> resultVariables)
        {
            long x = Convert.ToInt64(externalTask.variables["x"].value);
            long y = Convert.ToInt64(externalTask.variables["y"].value);
            long result = x + y;
            resultVariables.Add("result", result);
        }

}

Adding Forms for User Tasks

You can use embeded forms (e.g. Sample HTML Form) which are deployed within the Camunda Engine. Therefor add the form key:

camunda:formKey="embedded:deployment:CamundaModels.DE.decide.html"

The Camunda Client Class Library

The Class Library Camunda Client is not meant to be a re-usable, stable component. It is meant to serve as example and can be a starting point for your own code. Feel free to copy and modify the code, as it is released under Apache License you can do what you want with the code.

Startup

See SimpleCalculationProcess Exampleยด on how-to start and stop the Camunda Client.

During Startup the client:

  • Scans the classpath for Models (BPMN, CMMN and DMN) as well as HTML-Files. The files must be tagged as "embedded resource" to be part of the classpath! All found files are deployed to the Camunda Engine via REST-API.
  • Scans the classpath for classes having the ExternalTaskWorker attribute set. For all workers found a thread is started, which polls Camunda regurlary for new work and executes it if found.

Stopping

Stopping the Camunda Client means to stop and dispose all running Threads.

Writing your own Tasklist in WPF

WPF Tasklist Example

You can also write a complete customized tasklist, e.g. as WPF application. In the sample tasklist we provide here, we can load WPF pages as task forms for User Task. Instead of referencing HTML forms we now point to the class name (including namespace) in BPMN now:

camunda:formKey="InsuranceApplicationWpfTasklist.TaskForms.EN.DecideAboutApplication"

More Repositories

1

flowing-retail

Sample application demonstrating an order fulfillment system decomposed into multiple independant components (e.g. microservices). Showing concrete implementation alternatives using e.g. Java, Spring Boot, Apache Kafka, Camunda, Zeebe, ...
Java
1,221
star
2

trip-booking-saga-java

Example implementation of the Saga pattern for the classic trip booking example using the lightweight open source workflow engine (Camunda).
Java
268
star
3

camunda-7-springboot-amqp-microservice-cloud-example

Simple example using Camunda and Spring Boot to define a simple microservice communcating via AMQP, fully unit tested and deployable in the cloud
Java
215
star
4

flowing-trip-booking-saga-c-sharp

Example implementation of the Saga pattern for the classic trip booking example using the lightweight open source workflow engine (Camunda) and C#.
C#
164
star
5

flowing-retail-old

REPLACED BY MORE CURRENT VRSION OF THIS EXAMPLE: https://github.com/berndruecker/flowing-retail
Java
63
star
6

ticket-booking-camunda-8

A ticket booking example using Camunda Cloud, RabbitMQ, REST and two sample apps (Java Spring Boot and NodeJS)
Java
26
star
7

trip-booking-saga-serverless

Standard example of the Saga pattern (trip booking) in a serverless world
JavaScript
22
star
8

customer-onboarding-camunda-8-springboot

A simple onboarding process example using BPMN, Camunda Cloud, Java, Spring Boot and REST
Java
21
star
9

flowing-retail-concept-java

Simple application showing the concepts using plain Java without infrastructure
Java
20
star
10

camunda-csharp-client

Small (hacky!) client library wrapping around the Camunda REST API. Use to get started or demo - but note that this code is not supported or build for production!
C#
19
star
11

kafka-camunda-spring-simple

Simple Java Spring Boot example connecting to Confluent Cloud (Kafka) and Camunda Cloud (Zeebe)
Java
14
star
12

zeebe-camunda-dmn

Sample how to use Camunda DMN decisions in a Zeebe Workflow
Java
11
star
13

oreilly-training-process-automation

Labs for the OReilly Training "Process Automation in Modern Architectures"
11
star
14

customer-onboarding-camunda-8-springboot-extended

Example onboarding process using Camunda Cloud, Java, Spring Boot, REST and AMQP
Java
10
star
15

processautomationbook.com

Website for the book "Practical Process Automation" with O'Reilly
CSS
7
star
16

camunda-7-on-pcf

Tutorial how to run Camunda on Pivotal Cloud Foundary (PCF)
Java
6
star
17

camunda-7-remote-spring-boot-example

Example showing how to connect to a remote Camunda Run from Spring boot for external taks and OpenAPI REST calls
Java
6
star
18

flowing-retail-camunda-intro

Order flow implemented as one simple Camunda process application. Small sister of the flowing-retail example showing the same use case as system of collaborating microservices.
Java
6
star
19

kafka-connect-zeebe-benchmark

Python
5
star
20

zeebe-loadtest-kubernetes

Load tests for Zeebe which can be run on Kubernetes using Helm charts to provision everything automatically
Java
5
star
21

camunda-zipkin-springboot-demo

POC using Spring Boot to show that you also trace whole workflows from Camunda with Zipkin.
Java
5
star
22

bpmn-resilience-patterns

Showing how to leverage BPMN and/or the Camunda BPM engine to improve resilience by certain patterns around retrying and timeouts
Java
5
star
23

flowing-retail-payment-rest-spring-statemachine

Flowing Retail payment service implemented using Spring StateMachine (as comparison for Camunda)
Java
5
star
24

camunda-engine-7-harvester

Simple POC to show how to gather information about multiple Camunda engines across the enterprise
Java
4
star
25

customer-onboarding-camunda-7

Quick and dirty demo for an onboarding process from the book "Practical Process Automation" using Camunda Platform and Spring Boot
Java
4
star
26

camunda-7-openapi-demo

Java
3
star
27

zeebe-aws-event-bridge

summer hackdays 2020 project to prototype an integration between zeebe cloud and AWS EventBridge
Java
3
star
28

mule-camunda-24

Showcase using Mule and camunda BPM for a simple order process
Java
3
star
29

camunda-ready-to-receive-patterns

Some samples how to handle if a workflow instance in Camunda is not yet ready-to-receive a message
Java
2
star
30

claims-processing-demo

Claims processing demo for Camunda Con 2024 NYC
1
star
31

advanced-workflow-patterns

JavaScript
1
star
32

zeebe-benchmark-demo

Simple local benchmark for smoketest of Zeebe performance
Java
1
star
33

camunda-compensation-examples

Java
1
star
34

custom-process-landscape

1
star
35

camunda-8-junit-tests-playgorund

Project to play with latest Camunda Cloud Zeebe testing libraries
Java
1
star
36

zeebe-first-contact

Hello World example used for first contact live demos
Java
1
star
37

camunda-interactive-lab

Interactive lab to do a plublic exercise to get Camunda running on participant machines, communicating with a central cloud Camunda instance to showcase some things - and to play around :-)
Java
1
star