Git Product home page Git Product logo

insurance-application-simulator's Introduction

Insurance application simulator

Utility that creates demo data for the Insurance Application Simulator process in Camunda BPM.

Purpose

This small utility can be used to test Camunda's Insurance Showcase. This first version is a spring boot command line application package inside a JAR.

All insurance applications are created using a template (base-request.json), which can be overwritten.

{
  "applicant":{
    "email":"[email protected]"
  },
  "vehicleManufacturer":"VW",
  "vehicleType":"Golf V",
  "product":"Camundanzia Vollkasko Plus",
  "priceIndicationInCent":15000
}

The applicant's name is randomly generated. For the birthday (which affects the age that will affect the risk associated with that person), if you provide it in your custom "base-request.json" file, then the application will use that for all the generated requests, otherwise, it will choose a random date between 1980 and 2000. Below is a JSON file with the birthday on it:

{
  "applicant":{
    "email":"[email protected]",
    "birthday":"2000-01-01T00:00:00"
  },
  "vehicleManufacturer":"VW",
  "vehicleType":"Golf V",
  "product":"Camundanzia Vollkasko Plus",
  "priceIndicationInCent":15000
}

How-To

To execute the application, just build it and run the following command with the generated jar:

java -jar -Dnumapp=300 -Dwaittime=1 -Dlanguage=en -Dinsappendpoint=http://localhost:8080/camunda-showcase-insurance-application/api/new-application/de -Dbasereqfile=custom-request.json -Dapplemail=[email protected] insurance-application-simulator-0.0.1-SNAPSHOT.jar

Below is the description of the arguments:

  • -Dnumapp: Number of dummy applications that need to be created.
  • -Dwaittime: Time (in seconds) that the utiliy will wait between creating each dummy application.
  • -Dlanguage: Language that will be used, can either be "de" (Deutsch) or "en" (English).
  • -Dinsappendpoint (Optional): Overwrites the default endpoint for the rest api of the insurance application. The default is "http://localhost:8080/camunda-showcase-insurance-application/api/new-application".
  • -Dbasereqfile (Optional): Overwrites the base-request.json file with a custom one (must be in the same directory that the jar is being executed).
  • -Dapplemail (Optional): E-mail which will be used as "applicant email". The default is: "[email protected]".

Example:

Creates 10 applications using Deutsch as language.

java -jar -Dnumapp=10 -Dwaittime=0 -Dlanguage=de insurance-application-simulator-0.0.1-SNAPSHOT.jar

Creates 100 applications, each one at every 3 seconds, using English as language and a custom endpoint for the insurance application api.

java -jar -Dnumapp=100 -Dwaittime=5 -Dlanguage=en -Dinsappendpoint=http://localhost:8080/camunda-showcase-insurance-application/api/new-application/de insurance-application-simulator-0.0.1-SNAPSHOT.jar

Creates 200 applications, each one at every 2 seconds, using the English as language, a custom endpoint for the insurance application api and a custom-file.json as the base request file.

java -jar -Dnumapp=200 -Dwaittime=2 -Dlanguage=en -Dinsappendpoint=http://localhost:8080/camunda-showcase-insurance-application/api/new-application/de -Dbasereqfile=custom-request.json insurance-application-simulator-0.0.1-SNAPSHOT.jar

Creates 300 applications, each one at every 1 seconds, using the English as language, a custom endpoint for the insurance application api, a custom-file.json as the base request file and a different applicant email.

java -jar -Dnumapp=300 -Dwaittime=1 -Dlanguage=en -Dinsappendpoint=http://localhost:8080/camunda-showcase-insurance-application/api/new-application/de -Dbasereqfile=custom-request.json -Dapplemail=[email protected] insurance-application-simulator-0.0.1-SNAPSHOT.jar

insurance-application-simulator's People

Contributors

lucascalsilva avatar

Stargazers

 avatar Datocrat One avatar

insurance-application-simulator's Issues

Questions & suggestions

Questions:

  1. Is this intended to package camunda engine, then run the simulation within the JAR on that engine?
  2. Which approach would you suggest for repurposing this to work on any of the other camunda example processes, trying to abstract it further?
  3. Are there other simulators you are familiar with?

Suggestions:

  1. I would suggest changing port numbers if that's the case given that developers probably are running another camunda engine on 8080 already. The tests have port 8081 for the failing endpoint, I would suggest changing that to 8099 to indicate it should fail, then changing 8080 to 8081 elsewhere.
  2. Update the version for spring boot to 2.2.0.RELEASE build was failing around upstream dependencies

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.