Skip to content
Snippets Groups Projects
Commit 14fc2867 authored by eraydertsiz's avatar eraydertsiz
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
/mvnw text eol=lf
*.cmd text eol=crlf
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
# exercisetwo
mvnw 0 → 100644
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.2
#
# Optional ENV vars
# -----------------
# JAVA_HOME - location of a JDK home dir, required when download maven via java source
# MVNW_REPOURL - repo url base for downloading maven distribution
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
# ----------------------------------------------------------------------------
set -euf
[ "${MVNW_VERBOSE-}" != debug ] || set -x
# OS specific support.
native_path() { printf %s\\n "$1"; }
case "$(uname)" in
CYGWIN* | MINGW*)
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
native_path() { cygpath --path --windows "$1"; }
;;
esac
# set JAVACMD and JAVACCMD
set_java_home() {
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
if [ -n "${JAVA_HOME-}" ]; then
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACCMD="$JAVA_HOME/jre/sh/javac"
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACCMD="$JAVA_HOME/bin/javac"
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
return 1
fi
fi
else
JAVACMD="$(
'set' +e
'unset' -f command 2>/dev/null
'command' -v java
)" || :
JAVACCMD="$(
'set' +e
'unset' -f command 2>/dev/null
'command' -v javac
)" || :
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
return 1
fi
fi
}
# hash string like Java String::hashCode
hash_string() {
str="${1:-}" h=0
while [ -n "$str" ]; do
char="${str%"${str#?}"}"
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
str="${str#?}"
done
printf %x\\n $h
}
verbose() { :; }
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
die() {
printf %s\\n "$1" >&2
exit 1
}
trim() {
# MWRAPPER-139:
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
# Needed for removing poorly interpreted newline sequences when running in more
# exotic environments such as mingw bash on Windows.
printf "%s" "${1}" | tr -d '[:space:]'
}
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
while IFS="=" read -r key value; do
case "${key-}" in
distributionUrl) distributionUrl=$(trim "${value-}") ;;
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
esac
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
case "${distributionUrl##*/}" in
maven-mvnd-*bin.*)
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
:Linux*x86_64*) distributionPlatform=linux-amd64 ;;
*)
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
distributionPlatform=linux-amd64
;;
esac
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
;;
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
esac
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
distributionUrlName="${distributionUrl##*/}"
distributionUrlNameMain="${distributionUrlName%.*}"
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
exec_maven() {
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
}
if [ -d "$MAVEN_HOME" ]; then
verbose "found existing MAVEN_HOME at $MAVEN_HOME"
exec_maven "$@"
fi
case "${distributionUrl-}" in
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
esac
# prepare tmp dir
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
trap clean HUP INT TERM EXIT
else
die "cannot create temp dir"
fi
mkdir -p -- "${MAVEN_HOME%/*}"
# Download and Install Apache Maven
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
verbose "Downloading from: $distributionUrl"
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
# select .zip or .tar.gz
if ! command -v unzip >/dev/null; then
distributionUrl="${distributionUrl%.zip}.tar.gz"
distributionUrlName="${distributionUrl##*/}"
fi
# verbose opt
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
# normalize http auth
case "${MVNW_PASSWORD:+has-password}" in
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
esac
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
verbose "Found wget ... using wget"
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
verbose "Found curl ... using curl"
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
elif set_java_home; then
verbose "Falling back to use Java to download"
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
cat >"$javaSource" <<-END
public class Downloader extends java.net.Authenticator
{
protected java.net.PasswordAuthentication getPasswordAuthentication()
{
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
}
public static void main( String[] args ) throws Exception
{
setDefault( new Downloader() );
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
}
}
END
# For Cygwin/MinGW, switch paths to Windows format before running javac and java
verbose " - Compiling Downloader.java ..."
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
verbose " - Running Downloader.java ..."
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
fi
# If specified, validate the SHA-256 sum of the Maven distribution zip file
if [ -n "${distributionSha256Sum-}" ]; then
distributionSha256Result=false
if [ "$MVN_CMD" = mvnd.sh ]; then
echo "Checksum validation is not supported for maven-mvnd." >&2
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
exit 1
elif command -v sha256sum >/dev/null; then
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
distributionSha256Result=true
fi
elif command -v shasum >/dev/null; then
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
distributionSha256Result=true
fi
else
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
exit 1
fi
if [ $distributionSha256Result = false ]; then
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
exit 1
fi
fi
# unzip and move
if command -v unzip >/dev/null; then
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
else
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
fi
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
clean || :
exec_maven "$@"
mvnw.cmd 0 → 100644
<# : batch portion
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Apache Maven Wrapper startup batch script, version 3.3.2
@REM
@REM Optional ENV vars
@REM MVNW_REPOURL - repo url base for downloading maven distribution
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
@REM ----------------------------------------------------------------------------
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
@SET __MVNW_CMD__=
@SET __MVNW_ERROR__=
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
@SET PSModulePath=
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
)
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
@SET __MVNW_PSMODULEP_SAVE=
@SET __MVNW_ARG0_NAME__=
@SET MVNW_USERNAME=
@SET MVNW_PASSWORD=
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
@echo Cannot start maven from wrapper >&2 && exit /b 1
@GOTO :EOF
: end batch / begin powershell #>
$ErrorActionPreference = "Stop"
if ($env:MVNW_VERBOSE -eq "true") {
$VerbosePreference = "Continue"
}
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
if (!$distributionUrl) {
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
}
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
"maven-mvnd-*" {
$USE_MVND = $true
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
$MVN_CMD = "mvnd.cmd"
break
}
default {
$USE_MVND = $false
$MVN_CMD = $script -replace '^mvnw','mvn'
break
}
}
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
if ($env:MVNW_REPOURL) {
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
}
$distributionUrlName = $distributionUrl -replace '^.*/',''
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
if ($env:MAVEN_USER_HOME) {
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
}
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
exit $?
}
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
}
# prepare tmp dir
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
trap {
if ($TMP_DOWNLOAD_DIR.Exists) {
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
}
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
# Download and Install Apache Maven
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
Write-Verbose "Downloading from: $distributionUrl"
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
$webclient = New-Object System.Net.WebClient
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
# If specified, validate the SHA-256 sum of the Maven distribution zip file
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
if ($distributionSha256Sum) {
if ($USE_MVND) {
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
}
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
}
}
# unzip and move
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
try {
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
} catch {
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
Write-Error "fail to move MAVEN_HOME"
}
} finally {
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
pom.xml 0 → 100644
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.1-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.bpa</groupId>
<artifactId>exercisetwo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>exercisetwo</name>
<description>Exercise 2</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<properties>
<java.version>21</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.camunda</groupId>
<artifactId>spring-boot-starter-camunda-sdk</artifactId>
<version>8.6.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</project>
package com.bpa.exercisetwo;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import io.camunda.zeebe.spring.client.annotation.JobWorker;
import io.camunda.zeebe.spring.client.annotation.Variable;
@Component
public class ChargeCreditCardWorker {
private final static Logger LOG = LoggerFactory.getLogger(ChargeCreditCardWorker.class);
@JobWorker(type = "charge-credit-card")
public Map<String, Double> chargeCreditCard(@Variable(name = "totalWithTax") Double totalWithTax) {
LOG.info("charging credit card: {}", totalWithTax);
return Map.of("amountCharged", totalWithTax);
}
}
\ No newline at end of file
package com.bpa.exercisetwo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import io.camunda.zeebe.client.ZeebeClient;
import io.camunda.zeebe.spring.client.annotation.Deployment;
@SpringBootApplication
@Deployment(resources = "classpath:order-tracking.bpmn")
public class ExercisetwoApplication implements CommandLineRunner {
private static final Logger LOG = LoggerFactory.getLogger(ExercisetwoApplication.class);
@Autowired
private ZeebeClient zeebeClient;
public static void main(String[] args) {
SpringApplication.run(ExercisetwoApplication.class, args);
}
@Override
public void run(final String... args) {
var bpmnProcessId = "order-tracking";
var event = zeebeClient.newCreateInstanceCommand()
.bpmnProcessId(bpmnProcessId)
.latestVersion()
.variables(Map.of("Distance", 10))
.send()
.join();
LOG.info("started a process instance: {}", event.getProcessInstanceKey());
}
}
spring.application.name=exercisetwo
camunda:
client:
mode: self-managed
zeebe:
enabled: true
grpc-address: http://127.0.0.1:26500
rest-address: http://127.0.0.1:8080
rest:
query:
enabled: true
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Web Modeler" exporterVersion="0d4ab51" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.6.0">
<bpmn:process id="order-tracking" name="Order Tracking for Git" isExecutable="true">
<bpmn:extensionElements>
<zeebe:versionTag value="2" />
<zeebe:userTaskForm id="UserTaskForm_0gkk5oq">{
"executionPlatform": "Camunda Cloud",
"executionPlatformVersion": "8.6.0",
"exporter": {
"name": "Camunda Web Modeler",
"version": "0d4ab51"
},
"schemaVersion": 17,
"id": "confirm-pickup-0uouvik",
"components": [
{
"text": "Please Confirm the Delivery\n",
"type": "text",
"layout": {
"row": "Row_09w5fk0",
"columns": null
},
"id": "Field_1ry8w6b"
},
{
"label": "I will: ",
"values": [
{
"label": "Deliver the Food ",
"value": "Confirmed"
},
{
"label": "Not Deliver the Food ",
"value": "Rejected"
}
],
"type": "radio",
"layout": {
"row": "Row_0zycbud",
"columns": null
},
"id": "Field_12ah2co",
"key": "Confirmation_key"
}
],
"type": "default"
}</zeebe:userTaskForm>
<zeebe:userTaskForm id="UserTaskForm_1p74ldh">{
"executionPlatform": "Camunda Cloud",
"executionPlatformVersion": "8.6.0",
"exporter": {
"name": "Camunda Web Modeler",
"version": "0d4ab51"
},
"schemaVersion": 17,
"id": "estimate-delivery-time-0y9kj37",
"components": [
{
"text": "How Long is it going to take you to deliver the Food? \n",
"type": "text",
"layout": {
"row": "Row_0c1ylgv",
"columns": null
},
"id": "Field_1iwdn6y"
},
{
"label": "Delivery Time (in minutes)",
"type": "number",
"layout": {
"row": "Row_0wimgfh",
"columns": null
},
"id": "Field_1woxjjh",
"key": "Delivery_Time_Driver",
"defaultValue": 10,
"decimalDigits": 1
}
],
"type": "default"
}</zeebe:userTaskForm>
<zeebe:userTaskForm id="UserTaskForm_2u53od2">{
"executionPlatform": "Camunda Cloud",
"executionPlatformVersion": "8.6.0",
"exporter": {
"name": "Camunda Web Modeler",
"version": "0d4ab51"
},
"schemaVersion": 17,
"id": "update-on-delivery-0texxsd",
"components": [
{
"label": "Issues",
"values": [
{
"label": "Yes",
"value": "True"
},
{
"label": "No ",
"value": "False"
}
],
"type": "radio",
"layout": {
"row": "Row_0pud4fx",
"columns": null
},
"id": "Field_11dna86",
"key": "Delivery_Issues_key",
"defaultValue": "False"
},
{
"label": "What are the Issues? ",
"type": "textfield",
"layout": {
"row": "Row_0jktkpo",
"columns": null
},
"id": "Field_0mxlz6p",
"key": "Issue_Description",
"properties": { },
"conditional": {
"hide": "=Delivery_Issues_key = \"False\""
}
},
{
"label": "How far are you still away? (in km)",
"type": "number",
"layout": {
"row": "Row_0ain9q1",
"columns": null
},
"id": "Field_0uia563",
"key": "Distance",
"conditional": {
"hide": "=Delivery_Issues_key = \"False\""
}
}
],
"type": "default"
}</zeebe:userTaskForm>
</bpmn:extensionElements>
<bpmn:task id="Activity_09ycg47" name="Assign Delivery Partner">
<bpmn:incoming>Flow_11a7zqw</bpmn:incoming>
<bpmn:incoming>Flow_0p726hm</bpmn:incoming>
<bpmn:outgoing>Flow_0si3cap</bpmn:outgoing>
</bpmn:task>
<bpmn:userTask id="Activity_1rns5zd" name="Confirm Pickup">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="camunda-forms:bpmn:UserTaskForm_0gkk5oq" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0si3cap</bpmn:incoming>
<bpmn:outgoing>Flow_1n7se2z</bpmn:outgoing>
</bpmn:userTask>
<bpmn:startEvent id="Event_0at5i3f" name="Order Ready for Delivery">
<bpmn:outgoing>Flow_0p726hm</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:exclusiveGateway id="Gateway_0p6v77f">
<bpmn:incoming>Flow_1n7se2z</bpmn:incoming>
<bpmn:outgoing>Flow_11a7zqw</bpmn:outgoing>
<bpmn:outgoing>Flow_1reih9a</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:parallelGateway id="Gateway_1wolxtn">
<bpmn:incoming>Flow_0lnw21c</bpmn:incoming>
<bpmn:outgoing>Flow_0suv55w</bpmn:outgoing>
<bpmn:outgoing>Flow_1awbsm1</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:parallelGateway id="Gateway_12xvqui">
<bpmn:incoming>Flow_13nk1j7</bpmn:incoming>
<bpmn:incoming>Flow_06cropf</bpmn:incoming>
<bpmn:outgoing>Flow_0ezt6v1</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:endEvent id="Event_0s02qds" name="Succsessful Delivery">
<bpmn:incoming>Flow_1nlo3a5</bpmn:incoming>
</bpmn:endEvent>
<bpmn:userTask id="Activity_1mbr2yh" name="Estimate Delivery Time">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="camunda-forms:bpmn:UserTaskForm_1p74ldh" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0suv55w</bpmn:incoming>
<bpmn:outgoing>Flow_13nk1j7</bpmn:outgoing>
</bpmn:userTask>
<bpmn:scriptTask id="Activity_1xjen9s" name="Estimate Delivery Time with ML">
<bpmn:extensionElements>
<zeebe:script expression="=Distance*4" resultVariable="Delivery_Time_Estimation" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_1awbsm1</bpmn:incoming>
<bpmn:outgoing>Flow_06cropf</bpmn:outgoing>
</bpmn:scriptTask>
<bpmn:scriptTask id="Activity_1ujsjc1" name="Aggregate Delivery Times">
<bpmn:extensionElements>
<zeebe:script expression="=(Delivery_Time_Estimation+Delivery_Time_Driver)/2" resultVariable="Delivery_Time_Aggregated" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0ezt6v1</bpmn:incoming>
<bpmn:outgoing>Flow_1tuiyfu</bpmn:outgoing>
</bpmn:scriptTask>
<bpmn:userTask id="Activity_1jp3ojw" name="Update on Delivery">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="camunda-forms:bpmn:UserTaskForm_2u53od2" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0hijsp9</bpmn:incoming>
<bpmn:outgoing>Flow_0x9ri92</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_1021dof">
<bpmn:incoming>Flow_0x9ri92</bpmn:incoming>
<bpmn:outgoing>Flow_0425zu2</bpmn:outgoing>
<bpmn:outgoing>Flow_0wvd2yc</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:task id="Activity_0sbjiwn" name="Send Issue Notification">
<bpmn:incoming>Flow_0425zu2</bpmn:incoming>
<bpmn:outgoing>Flow_0ju48e5</bpmn:outgoing>
</bpmn:task>
<bpmn:exclusiveGateway id="Gateway_1sygnoe">
<bpmn:incoming>Flow_1reih9a</bpmn:incoming>
<bpmn:incoming>Flow_0ju48e5</bpmn:incoming>
<bpmn:outgoing>Flow_0lnw21c</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:task id="Activity_1ek8ybm" name="Deliver Order">
<bpmn:incoming>Flow_0wvd2yc</bpmn:incoming>
<bpmn:outgoing>Flow_1nlo3a5</bpmn:outgoing>
</bpmn:task>
<bpmn:task id="Activity_18xvk0l" name="Send delivery Time Notification">
<bpmn:incoming>Flow_1tuiyfu</bpmn:incoming>
<bpmn:outgoing>Flow_0hijsp9</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="Flow_11a7zqw" name="Rejected" sourceRef="Gateway_0p6v77f" targetRef="Activity_09ycg47">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=Confirmation_key= "Rejected"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0p726hm" sourceRef="Event_0at5i3f" targetRef="Activity_09ycg47" />
<bpmn:sequenceFlow id="Flow_0si3cap" sourceRef="Activity_09ycg47" targetRef="Activity_1rns5zd" />
<bpmn:sequenceFlow id="Flow_1n7se2z" sourceRef="Activity_1rns5zd" targetRef="Gateway_0p6v77f" />
<bpmn:sequenceFlow id="Flow_1reih9a" name="Confirmed" sourceRef="Gateway_0p6v77f" targetRef="Gateway_1sygnoe">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=Confirmation_key= "Confirmed"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0lnw21c" sourceRef="Gateway_1sygnoe" targetRef="Gateway_1wolxtn" />
<bpmn:sequenceFlow id="Flow_0suv55w" sourceRef="Gateway_1wolxtn" targetRef="Activity_1mbr2yh" />
<bpmn:sequenceFlow id="Flow_1awbsm1" sourceRef="Gateway_1wolxtn" targetRef="Activity_1xjen9s" />
<bpmn:sequenceFlow id="Flow_13nk1j7" sourceRef="Activity_1mbr2yh" targetRef="Gateway_12xvqui" />
<bpmn:sequenceFlow id="Flow_06cropf" sourceRef="Activity_1xjen9s" targetRef="Gateway_12xvqui" />
<bpmn:sequenceFlow id="Flow_0ezt6v1" sourceRef="Gateway_12xvqui" targetRef="Activity_1ujsjc1" />
<bpmn:sequenceFlow id="Flow_1nlo3a5" sourceRef="Activity_1ek8ybm" targetRef="Event_0s02qds" />
<bpmn:sequenceFlow id="Flow_1tuiyfu" sourceRef="Activity_1ujsjc1" targetRef="Activity_18xvk0l" />
<bpmn:sequenceFlow id="Flow_0hijsp9" sourceRef="Activity_18xvk0l" targetRef="Activity_1jp3ojw" />
<bpmn:sequenceFlow id="Flow_0x9ri92" sourceRef="Activity_1jp3ojw" targetRef="Gateway_1021dof" />
<bpmn:sequenceFlow id="Flow_0425zu2" sourceRef="Gateway_1021dof" targetRef="Activity_0sbjiwn">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=Delivery_Issues_key = "True"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0wvd2yc" sourceRef="Gateway_1021dof" targetRef="Activity_1ek8ybm">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=Delivery_Issues_key = "False"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0ju48e5" sourceRef="Activity_0sbjiwn" targetRef="Gateway_1sygnoe" />
<bpmn:textAnnotation id="TextAnnotation_0f918fg">
<bpmn:text>Pass in Distance between adresses</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_1nnul1r" associationDirection="None" sourceRef="Event_0at5i3f" targetRef="TextAnnotation_0f918fg" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="order-tracking">
<bpmndi:BPMNShape id="Activity_09ycg47_di" bpmnElement="Activity_09ycg47">
<dc:Bounds x="280" y="250" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_11uu00f_di" bpmnElement="Activity_1rns5zd">
<dc:Bounds x="410" y="250" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_14vdc0k" bpmnElement="Event_0at5i3f">
<dc:Bounds x="187" y="272" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="165" y="315" width="81" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0sr8jzo_di" bpmnElement="Gateway_0p6v77f" isMarkerVisible="true">
<dc:Bounds x="545" y="265" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0jbr9t1_di" bpmnElement="Gateway_1wolxtn">
<dc:Bounds x="755" y="265" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0ve56ty_di" bpmnElement="Gateway_12xvqui">
<dc:Bounds x="975" y="265" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0s02qds_di" bpmnElement="Event_0s02qds">
<dc:Bounds x="1762" y="272" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1751" y="315" width="59" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0etz3fp_di" bpmnElement="Activity_1mbr2yh">
<dc:Bounds x="840" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0sa3g6t_di" bpmnElement="Activity_1xjen9s">
<dc:Bounds x="840" y="330" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1de5pv9_di" bpmnElement="Activity_1ujsjc1">
<dc:Bounds x="1060" y="250" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_00zfs66_di" bpmnElement="Activity_1jp3ojw">
<dc:Bounds x="1350" y="250" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1021dof_di" bpmnElement="Gateway_1021dof" isMarkerVisible="true">
<dc:Bounds x="1495" y="265" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0sbjiwn_di" bpmnElement="Activity_0sbjiwn">
<dc:Bounds x="1060" y="80" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1sygnoe_di" bpmnElement="Gateway_1sygnoe" isMarkerVisible="true">
<dc:Bounds x="655" y="265" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1ek8ybm_di" bpmnElement="Activity_1ek8ybm">
<dc:Bounds x="1600" y="250" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_05e8xn9_di" bpmnElement="Activity_18xvk0l">
<dc:Bounds x="1210" y="250" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Association_1nnul1r_di" bpmnElement="Association_1nnul1r">
<di:waypoint x="205" y="272" />
<di:waypoint x="205" y="188" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="TextAnnotation_0f918fg_di" bpmnElement="TextAnnotation_0f918fg">
<dc:Bounds x="155" y="120" width="100" height="68" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_11a7zqw_di" bpmnElement="Flow_11a7zqw">
<di:waypoint x="570" y="315" />
<di:waypoint x="570" y="390" />
<di:waypoint x="330" y="390" />
<di:waypoint x="330" y="330" />
<bpmndi:BPMNLabel>
<dc:Bounds x="429" y="372" width="44" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0p726hm_di" bpmnElement="Flow_0p726hm">
<di:waypoint x="223" y="290" />
<di:waypoint x="280" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0si3cap_di" bpmnElement="Flow_0si3cap">
<di:waypoint x="380" y="290" />
<di:waypoint x="410" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1n7se2z_di" bpmnElement="Flow_1n7se2z">
<di:waypoint x="510" y="290" />
<di:waypoint x="545" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1reih9a_di" bpmnElement="Flow_1reih9a">
<di:waypoint x="595" y="290" />
<di:waypoint x="655" y="290" />
<bpmndi:BPMNLabel>
<dc:Bounds x="600" y="272" width="52" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0lnw21c_di" bpmnElement="Flow_0lnw21c">
<di:waypoint x="705" y="290" />
<di:waypoint x="755" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0suv55w_di" bpmnElement="Flow_0suv55w">
<di:waypoint x="780" y="265" />
<di:waypoint x="780" y="200" />
<di:waypoint x="840" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1awbsm1_di" bpmnElement="Flow_1awbsm1">
<di:waypoint x="780" y="315" />
<di:waypoint x="780" y="370" />
<di:waypoint x="840" y="370" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_13nk1j7_di" bpmnElement="Flow_13nk1j7">
<di:waypoint x="940" y="200" />
<di:waypoint x="1000" y="200" />
<di:waypoint x="1000" y="265" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_06cropf_di" bpmnElement="Flow_06cropf">
<di:waypoint x="940" y="370" />
<di:waypoint x="1000" y="370" />
<di:waypoint x="1000" y="315" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ezt6v1_di" bpmnElement="Flow_0ezt6v1">
<di:waypoint x="1025" y="290" />
<di:waypoint x="1060" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1nlo3a5_di" bpmnElement="Flow_1nlo3a5">
<di:waypoint x="1700" y="290" />
<di:waypoint x="1762" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1tuiyfu_di" bpmnElement="Flow_1tuiyfu">
<di:waypoint x="1160" y="290" />
<di:waypoint x="1210" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0hijsp9_di" bpmnElement="Flow_0hijsp9">
<di:waypoint x="1310" y="290" />
<di:waypoint x="1350" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0x9ri92_di" bpmnElement="Flow_0x9ri92">
<di:waypoint x="1450" y="290" />
<di:waypoint x="1495" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0425zu2_di" bpmnElement="Flow_0425zu2">
<di:waypoint x="1520" y="265" />
<di:waypoint x="1520" y="120" />
<di:waypoint x="1160" y="120" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0wvd2yc_di" bpmnElement="Flow_0wvd2yc">
<di:waypoint x="1545" y="290" />
<di:waypoint x="1600" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ju48e5_di" bpmnElement="Flow_0ju48e5">
<di:waypoint x="1060" y="120" />
<di:waypoint x="680" y="120" />
<di:waypoint x="680" y="265" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0phr9lx" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.29.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.6.0">
<bpmn:process id="process-payments" name="Process payments" isExecutable="true">
<bpmn:extensionElements>
<zeebe:versionTag value="2" />
<zeebe:userTaskForm id="UserTaskForm_3jrqien">{
"components": [
{
"label": "What do you want to eat?",
"type": "textfield",
"layout": {
"row": "Row_0uhdq3s",
"columns": null
},
"id": "Field_1xkogta",
"key": "textfield_pckgde"
}
],
"type": "default",
"id": "Form_1doqc36",
"executionPlatform": "Camunda Cloud",
"executionPlatformVersion": "8.6.0",
"exporter": {
"name": "Camunda Modeler",
"version": "5.29.0"
},
"schemaVersion": 17
}</zeebe:userTaskForm>
</bpmn:extensionElements>
<bpmn:serviceTask id="Activity_1pz9vy0" name="Charge credit card">
<bpmn:extensionElements>
<zeebe:taskDefinition type="charge-credit-card" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0e12uym</bpmn:incoming>
<bpmn:outgoing>Flow_0sr27j3</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_0e12uym" sourceRef="Activity_1bj84u7" targetRef="Activity_1pz9vy0" />
<bpmn:sequenceFlow id="Flow_0ioeoes" sourceRef="StartEvent_1" targetRef="Activity_1u0h3j9" />
<bpmn:sequenceFlow id="Flow_0sr27j3" sourceRef="Activity_1pz9vy0" targetRef="Event_0yupd5l" />
<bpmn:endEvent id="Event_0yupd5l" name="Payment executed">
<bpmn:incoming>Flow_0sr27j3</bpmn:incoming>
</bpmn:endEvent>
<bpmn:startEvent id="StartEvent_1" name="Payment request received">
<bpmn:outgoing>Flow_0ioeoes</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:scriptTask id="Activity_1bj84u7" name="Prepare transaction">
<bpmn:extensionElements>
<zeebe:script expression="=total * 1.1" resultVariable="totalWithTax" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_17hh22h</bpmn:incoming>
<bpmn:incoming>Flow_1vfmksh</bpmn:incoming>
<bpmn:outgoing>Flow_0e12uym</bpmn:outgoing>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="Flow_0neoqzy" sourceRef="Activity_1u0h3j9" targetRef="Gateway_0nrg5nb" />
<bpmn:userTask id="Activity_1u0h3j9" name="Decide Something">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="camunda-forms:bpmn:UserTaskForm_3jrqien" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0ioeoes</bpmn:incoming>
<bpmn:outgoing>Flow_0neoqzy</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_0nrg5nb">
<bpmn:incoming>Flow_0neoqzy</bpmn:incoming>
<bpmn:outgoing>Flow_17hh22h</bpmn:outgoing>
<bpmn:outgoing>Flow_1vfmksh</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_17hh22h" sourceRef="Gateway_0nrg5nb" targetRef="Activity_1bj84u7">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=meal="meat"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1vfmksh" sourceRef="Gateway_0nrg5nb" targetRef="Activity_1bj84u7">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=meal="salad"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="process-payments">
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
<dc:Bounds x="182" y="162" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="158" y="205" width="85" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0fcys5r_di" bpmnElement="Activity_1u0h3j9">
<dc:Bounds x="290" y="140" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0yupd5l_di" bpmnElement="Event_0yupd5l">
<dc:Bounds x="1042" y="162" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1038" y="205" width="45" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1pz9vy0_di" bpmnElement="Activity_1pz9vy0">
<dc:Bounds x="810" y="140" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_19ojtcx_di" bpmnElement="Activity_1bj84u7">
<dc:Bounds x="630" y="140" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0nrg5nb_di" bpmnElement="Gateway_0nrg5nb" isMarkerVisible="true">
<dc:Bounds x="455" y="155" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0e12uym_di" bpmnElement="Flow_0e12uym">
<di:waypoint x="730" y="180" />
<di:waypoint x="810" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ioeoes_di" bpmnElement="Flow_0ioeoes">
<di:waypoint x="218" y="180" />
<di:waypoint x="290" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0sr27j3_di" bpmnElement="Flow_0sr27j3">
<di:waypoint x="910" y="180" />
<di:waypoint x="1042" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0neoqzy_di" bpmnElement="Flow_0neoqzy">
<di:waypoint x="390" y="180" />
<di:waypoint x="455" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_17hh22h_di" bpmnElement="Flow_17hh22h">
<di:waypoint x="489" y="196" />
<di:waypoint x="560" y="320" />
<di:waypoint x="642" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1vfmksh_di" bpmnElement="Flow_1vfmksh">
<di:waypoint x="489" y="164" />
<di:waypoint x="540" y="80" />
<di:waypoint x="632" y="144" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
package com.bpa.exercisetwo;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ExercisetwoApplicationTests {
@Test
void contextLoads() {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment