Git Product home page Git Product logo

springone-camunda-coding-challenge's Introduction

SpringOne-Camunda-Coding-Challenge

A fun way to learn Camunda and win a small price. The coding challenge is designed for the SpringOne Conference. Results can be hand in from the 1st of September till the 08th of September 2021.

Table of Contents

How to win

  • Fork this repo
  • Do the challenges. You can do both challenges or just the first one. There are different levels and prizes for your performance.
  • Send us a link to your fork and your address in order to ship a prize and your ๐Ÿ‘• size to [email protected] with the subject: "SpringOne Coding Challenge"

Prerequirements

  • Make sure you have Java installed and that you use a version below 15. You can check the version in your terminal: java -version
  • Install the Camunda Modeler on your machine
  • Fork the project and open it in your IDE

๐ŸŽ‰ You are ready to hack!

The challenge

Challenge 1: Get the right order of the process

Get the right chronological order of the movie Pulp Fiction.

Inspect the project:
project structure

Navigate to src/main/resources and open the process.bpmn in the Camunda Modeler!

You will see a process similar to this one:

project structure

Below the connected process with sequence flows, gateways and events you see tasks that are unconnected. The tasks form the story of the movie Pulp Fiction. Darg and Drop them in the right chronological order on the sequence flow.

๐Ÿ“Œ Note: Make sure to save your model :)

Challenge 2: Correct the variables

In order to get the right story plot you have to change some of the variables in the task:

Script Task "Royal and Cheese conversation":
Make sure that the the variable lastTravel is set to Europe. To do so select the Script Task and open in the Camunda Modeler on the right hand site the Property panel and inspect the inline Script

Service Task: "Prepare To Go Out With Mia":
This Service task is implemented as a Delegate. Go into your IDE and look in the path: src/main/java/camunda.example.workflow for the PrepareToGoOutDelegate class. Change inside the class the variable drug to heroin.

Evaluation of your results

  • Challenge 1: You got the right or almost right order. The BPMN tasks are connected on the sequence flow:
    we send you a small price. ๐ŸŽ
  • Challenge 1 + 2: You got the right or almost right order and changed the variables:
    we send you a medium price ๐ŸŽ ๐ŸŽ
  • Challenge 1 + 2 without any mistakes. It is possible to start an instance of your process and route your process till the end without runtime errors:
    we send you a large price ๐ŸŽ ๐ŸŽ ๐ŸŽ

Run the application (process) - test if your process works

Running the application and starting an instance of the process will give you a hint if you got the right order. If the order is right your instance will run through. If the order is not correct potentially you will get runtime errors due to missing variables.

If you want to try out your solution and run it you can start the the application class in the project:

In your IDE

Application class

Right click on the class and select: Run 'Application'

Camunda's Webapplications

Once the application has started type in your browser:
http://localhost:8080/camunda/app/welcome/default/#!/login

Log in with the credentials:

username: demo    
password: demo   

Start a process instance

Choose the Tasklist application:
project structure

Start the process from there:
project structure

Terminal in your IDE

Observe your Terminal in your IDE and see what will be printed. You should be able to see the story of pulp fiction printed in your Terminal based on how you placed the tasks. Hint: Maybe you can identify already with that help if your order is correct.

Runtime Errors

Maybe you will get a runtime error due to a missing variable or an expression that cannot be resolved. This can happen for example if you start the process from Tasklist or if you complete a usertask and could look similar to this one:

error message

If that is the case the order of your process might not be right. Try to fix it and see where the variable that you need for a certain task is initiated.

๐Ÿ“Œ Note: There are better ways to handle errors in Camunda and normally they are not displayed at the user frontend. If you want to learn more about it you can read more about transactions and error handling in Camunda or watch this tutorial

Cockpit: Observe the state of your process

In Camunda's webapplications in the right upper corner is a house symbole that allows you to switch between the web applications:
project structure
Go to Cockpit. In order to observer your process instances select running instances.
cockpit

(Note: If your process instance has ended already you won't see it anymore. A running process instance is marked with a blue token)
user task in Cockpit

Tasklist: Claim and complete usertasks from your process

If your process instance stands on a User Task. Naviagte back to Tasklist. You should see here an available task:

user task in Tasklist

  1. Claim the task and complete it.
  2. Look at the form: Do you still remeber what happens with the golden watch in Pulp Fiction and if Butch takes it directly with him while escaping?
  3. Complete the task

springone-camunda-coding-challenge's People

Contributors

jaikanth6 avatar nlea 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.