Camunda

Revision as of 01:47, 6 September 2018 by Rasimsen (talk | contribs) (Executing automated steps)

Get started with Camunda

This tutorial guides you through modeling and implementing your first workflow with the Camunda BPM Platform. In this guide, you’ll choose between implementing executable processes in Java or JavaScript (NodeJS) using one of Camunda’s ready-to-go task clients.

Join in: Get the Sources for this guide

In addition to this guide, the source code of the example project is also available on GitHub. You can directly download the whole project or clone it with git:

git clone https://github.com/camunda/camunda-get-started-quickstart.git

To follow this guide, download the initial state or checkout the tag in the git repositiory:

git checkout -f Start

or every step in between:

git checkout -f Step-X

After every section in this guide you will find a box which contains a download link to the current state of the project and git instructions to checkout the current version of the repository.

You will be guided through the following steps:

Download and Installation

Install the Camunda BPM Platform and Camunda Modeler on your machine.

https://camunda.com/download/

Executable Process

Learn the basics of handling the Camunda Modeler, learn how to model and configure a fully executable process and learn how to integrate your own business logic.

Deploy the Process

Deploy the Process to Camunda and start your first process instances.

Involve Humans

Learn the basics of integrating user tasks into a Process and how to build forms with Camunda.

Make It Dynamic

Learn how to make your Process more dynamic by adding Gateways to the Process.

Decision Automation

Learn how to integrate DMN decision tables in the Process.


Plugins/Installation on IntellJ***

  • Download Camunda Modeler at first, and then go to IntellJ IDEA
  • IntelliJ IDEA -> Preferences -> Tools -> External Tools
  • + (Add new)
  • From Tool Settings, show your camunda modeler download path
    • Program: (CamundaModeler download path)
    • Arguments: $FilePath$
    • Working Directory: just show your working space

OK..

Offical manual : https://docs.camunda.org/manual/7.8/


Get started with Camunda

This tutorial guides you through modeling and implementing your first workflow with the Camunda BPM Platform. In this guide, you’ll choose between implementing executable processes in Java or JavaScript (NodeJS) using one of Camunda’s ready-to-go task clients.

Download and Installation.

First, you need to install the Camunda BPM Platform and the Camunda Modeler.

In the following section, we’ll describe how to install the Camunda BPM Platform locally on your machine.

Hint:If you prefer, you can also run the Camunda BPM Platform with Docker:

docker pull camunda/camunda-bpm-platform:latest
docker run -d --name camunda -p 8080:8080 camunda/camunda-bpm-platform:latest

Afterwards, you can install the Camunda Modeler.

Prerequisites

Please make sure you have the following installed:

  • Java Runtime Environment 1.7+

You can verify this by using your terminal, shell, or command line:

java -version

If you need to install Java Runtime Environment, you can find the download from Oracle here.

Camunda BPM Platform

First, download a distribution of the Camunda BPM platform. You can choose from different distributions for various application servers. In this tutorial, we’ll use the Apache Tomcat-based distribution. Download it from the download page.

After downloading the distribution, unpack it inside a directory of your choice.

After you’ve successfully unpacked your distribution of the Camunda BPM platform, execute the script named start-camunda.bat (for Windows users) or start-camunda.sh (for Unix users).

This script will start the application server and open a welcome screen in your web browser. If the page does not open on its own, go to http://localhost:8080/camunda-welcome/index.html.

Camunda Modeler

Download the Camunda Modeler from the download page.

After downloading the Modeler, simply unzip the download in a folder of your choice.

After you have successfully unpacked the zip, run camunda-modeler.exe (for Windows users), camunda-modeler.app (for Mac users), or camunda-modeler.sh (for Linux users).

Once you’ve installed the Camunda Platform and the Camunda Modeler, you can move to the next step to model and execute your first process.

Executing automated steps

In this section, you’ll learn how to create your first BPMN 2.0 process with the Camunda Modeler and how to execute automated steps. Start by opening up Camunda Modeler.

Create a new BPMN Diagram

Create a new BPMN diagram by clicking File > New File > BPMN Diagram.


400px

Start with a Simple Process

Start by modeling a simple process.

modeler-step1.png

Double-click on the Start Event. A text box will open. Name the Start Event “Payment Retrieval Requested”.

Hint: When editing Labels, you can add line breaks using Shift + Enter.

Click on the start event. From its context menu, select the activity shape (rectangle). It will be placed automatically on the canvas, and you can drag it to your preferred position. Name it Charge Credit Card. Change the activity type to Service Task by clicking on the activity shape and using the wrench button.

modeler-step2.png

Add an End Event named Payment Received.

modeler-step3.png

Configure the Service Task

There are different ways to execute service tasks using Camunda BPM. In this guide, we’ll use the external task pattern. Open the Properties Panel within the Camunda Modeler and click on the Service Task you just created. Change the Implementation to External and use charge-card as the Topic.

modeler-step4.png

Configure Properties for Execution

modeler-step5.png

Because we’re modeling an executable process, we should give it an ID and set the isExecutable property to true. On the right-hand side of the canvas, you find the properties panel. When you click on empty space on the modeling canvas, the properties panel will display the properties of the process itself.

First, configure an ID for the process. Type payment-retrieval in the property field Id. The property ID is used by the process engine as an identifier for the executable process, and it’s best practice to set it to a human-readable name.

Second, configure the Name of the process. Type Payment Retrieval in the property field Name.

Finally, check the box next to the Executable property. If you don’t check this box, the process definition is ignored by the process engine.

Save the BPMN Diagram

modeler-save-diagram.png

When you’re done, save your changes by clicking File > Save File As.. or by using the Save Button. In the dialogue that appears, navigate to a folder of your choice and save the diagram as something like payment.bpmn.

Catch up: Get the Sources of Step-1.

https://github.com/camunda/camunda-get-started-quickstart


Implement an external task worker

After modeling the process, we want to execute some business logic.

Camunda BPM is built so that your business logic can be implemented in different languages. You have the choice which language suits your project best.

In this quick start, we’ll show you how to use Camunda’s ready-to-go task clients in:

  • Java
  • JavaScript (NodeJS)

If you’ve never worked with Java before, we recommend using the JavaScript (NodeJS) task client in this tutorial.

Hint : If you prefer a different programming language, you can also use Camunda’s REST API to access API operations via HTTP.