Commit 66842bfd authored by Kutzner's avatar Kutzner 🤸
Browse files

upload project

parent f7c2b211
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.kebidge.camunda</groupId>
<artifactId>stock-asset-review</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Stock Asset Review</name>
<description>Spring Boot Camunda Application for BPT Camunda Assignment.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.5.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>7.16.0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-spin</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-dataformat-all</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<!-- other versions will fail with spring boot-->
<version>2.8.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.5.4</version>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package de.kebidge.camunda;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpClient.Redirect;
import java.net.http.HttpClient.Version;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletResponse;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
public class GlobalQuoteDelegate implements JavaDelegate {
private final static Logger LOGGER = Logger.getLogger("de.kebidge.camunda.GlobalQuoteDelegate");
// execute ServiceTask_2 (Get Price and Change)
public void execute(DelegateExecution execution) throws Exception {
// process variables
String stock_process = "stock";
String stock_value = (String) execution.getVariable(stock_process);
String quote_value = "";
String price_process = "price";
String change_process = "change";
/*
* dummy data for user task 2
* **************************
* -> for usage comment out line 125 and line 126
*/
double price_value = 0.123;
double change_value = -0.987;
// set your alphavantage key here
// https://www.alphavantage.co/support/#api-key
String key = "VPNHOQPE0AOJ8BEP";
LOGGER.info("Processing request by '" + stock_value + "'...");
// build GET Request
// GET https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=IBM&apikey=VPNHOQPE0AOJ8BEP
String apiURL = "https://www.alphavantage.co/";
String queryEndpoint = "query?function=GLOBAL_QUOTE&symbol=";
String apiKey = "&apikey=" + key;
String uri_string = apiURL + queryEndpoint + stock_value + apiKey;
// set HTTP Client
HttpClient vClient = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(20))
.followRedirects(Redirect.NORMAL).version(Version.HTTP_1_1).build();
// set HTTP Request
HttpRequest vRequest = HttpRequest.newBuilder().headers("Content-Type", "application/json")
.timeout(Duration.ofSeconds(20))
.uri(URI.create(uri_string)).build();
LOGGER.info("Build GET Request: " + uri_string);
try {
HttpResponse<String> vResponse = vClient.send(vRequest, BodyHandlers.ofString());
// check requested resource is available
if (vResponse.statusCode() == HttpServletResponse.SC_NOT_FOUND) {
// requested resource is not available (404)
// set null to process variables
execution.setVariable(price_process, null);
execution.setVariable(change_process, null);
LOGGER.info("SC_NOT_FOUND -> set variable price and change to null");
} else {
// requested resource is available (200)
// get quote resonse from REST API -> save to quote_value
quote_value = vResponse.body();
/* parse GLOBAL_QUOTE JSON
Example:
{
"Global Quote": {
"01. symbol": "IBM",
"02. open": "116.4900",
"03. high": "116.5600",
"04. low": "115.2700",
"05. price": "116.0500",
"06. volume": "5384548",
"07. latest trading day": "2021-11-19",
"08. previous close": "116.6600",
"09. change": "-0.6100",
"10. change percent": "-0.5229%"
}
}
*/
// parse JSON object
JsonParser jsonParser = new JsonParser();
JsonElement jsonTree = jsonParser.parse(quote_value);
if(jsonTree.isJsonObject()) {
JsonObject jsonObject = jsonTree.getAsJsonObject();
// value = get(key)
JsonElement quote_element = jsonObject.get("Global Quote");
if(quote_element.isJsonObject()){
JsonObject quoteObject = quote_element.getAsJsonObject();
// check symbol item is not null
if(quoteObject.get("01. symbol") != null) {
// real data for user task 2
// comment out these variables while using dummy data
price_value = quoteObject.get("05. price").getAsDouble();
change_value = quoteObject.get("09. change").getAsDouble();
LOGGER.info("JSON Parser: price=" + price_value);
LOGGER.info("JSON Parser: change=" + change_value);
// set price value and change value to process variables
execution.setVariable(price_process, price_value);
execution.setVariable(change_process, change_value);
LOGGER.info("HttpServletResponse succeed...");
LOGGER.info("Set process variable " + price_process + " = " + price_value);
LOGGER.info("Set process variable " + change_process + " = " + change_value);
} else {
// symbol item is null
LOGGER.info("JSON is empty... Sorry your Key is just for demo purposes. Use symbol=\"IBM\" instead!");
LOGGER.info(quote_value);
}
}
} else {
// quote_value is not a JSON object
LOGGER.info("JSON Parser failed...");
LOGGER.info("Not a JSON Object");
LOGGER.info(quote_value);
}
}
} catch (IOException | InterruptedException e) {
// IOException
// set null to process variables
execution.setVariable(price_process, null);
execution.setVariable(change_process, null);
LOGGER.info("CATCH IOException -> set variables price and change to null");
}
}
}
\ No newline at end of file
package de.kebidge.camunda;
import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@EnableProcessApplication
public class StockAssetReviewApplication {
public static void main(String... args) {
SpringApplication.run(StockAssetReviewApplication.class, args);
}
}
\ No newline at end of file
package de.kebidge.camunda;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpClient.Redirect;
import java.net.http.HttpClient.Version;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletResponse;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
public class SymbolSearchDelegate implements JavaDelegate {
private final static Logger LOGGER = Logger.getLogger("de.kebidge.camunda.SymbolDelegate");
// execute ServiceTask_1 (Get Symbol)
public void execute(DelegateExecution execution) throws Exception {
// process variables
//String stock_process = "stock";
String stock_value = (String) execution.getVariable("stock");
String symbol_process = "symbol";
String symbol_value = "";
// set alphavantage key here
// https://www.alphavantage.co/support/#api-key
String key = "VPNHOQPE0AOJ8BEP";
LOGGER.info("Processing request by '" + stock_value + "'...");
// build GET Request
// GET https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=IBM&apikey=VPNHOQPE0AOJ8BEP
String apiURL = "https://www.alphavantage.co/";
String queryEndpoint = "query?function=SYMBOL_SEARCH&keywords=";
String apiKey = "&apikey=" + key;
String uri_string = apiURL + queryEndpoint + stock_value + apiKey;
// set HTTP Client
HttpClient vClient = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(20))
.followRedirects(Redirect.NORMAL).version(Version.HTTP_1_1).build();
// set HTTP Request
HttpRequest vRequest = HttpRequest.newBuilder().headers("Content-Type", "application/json")
.timeout(Duration.ofSeconds(20))
.uri(URI.create(uri_string)).build();
LOGGER.info("Build GET Request: " + uri_string);
try {
HttpResponse<String> vResponse = vClient.send(vRequest, BodyHandlers.ofString());
// check requested resource is available
if (vResponse.statusCode() == HttpServletResponse.SC_NOT_FOUND) {
// requested resource is not available (404)
// set null to process variable
execution.setVariable(symbol_process, null);
LOGGER.info("SC_NOT_FOUND -> set variable symbol to null");
} else {
// requested resource is available (200)
// get symbol value from REST API
symbol_value = vResponse.body();
// set symbol value to process variable
execution.setVariable(symbol_process, symbol_value);
// log success and symbol value
LOGGER.info("HttpServletResponse succeed...");
//LOGGER.info("Set variable symbol = " + symbol_value);
}
} catch (IOException | InterruptedException e) {
// IOException
// set null to process variable
execution.setVariable(symbol_process, null);
LOGGER.info("CATCH IOException -> set variable symbol to null");
}
}
}
\ No newline at end of file
server:
port: 9999
camunda.bpm:
admin-user:
id: demo
password: demo
filter.create: All
\ 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:camunda="http://camunda.org/schema/1.0/bpmn" 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_1x1nxrf" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
<bpmn:process id="stock-asset-review" name="Stock Asset Review" isExecutable="true" camunda:versionTag="1.0">
<bpmn:userTask id="UserTask_1" name="Set Company Name" camunda:formKey="embedded:app:forms/company_form.html" camunda:assignee="demo">
<bpmn:incoming>SequenceFlow_1</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_2</bpmn:outgoing>
</bpmn:userTask>
<bpmn:startEvent id="StartEvent_1" name="End of Month">
<bpmn:outgoing>SequenceFlow_1</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_1" sourceRef="StartEvent_1" targetRef="UserTask_1" />
<bpmn:endEvent id="EndEvent_1" name="Stock sold">
<bpmn:incoming>SequenceFlow_6</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_2" sourceRef="UserTask_1" targetRef="ServiceTask_1" />
<bpmn:sequenceFlow id="SequenceFlow_3" sourceRef="ServiceTask_1" targetRef="ServiceTask_2" />
<bpmn:serviceTask id="ServiceTask_1" name="Get Symbol" camunda:class="de.kebidge.camunda.SymbolSearchDelegate">
<bpmn:incoming>SequenceFlow_2</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_3</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_4" sourceRef="ServiceTask_2" targetRef="Gateway_1" />
<bpmn:sequenceFlow id="SequenceFlow_6" sourceRef="UserTask_2" targetRef="EndEvent_1" />
<bpmn:serviceTask id="ServiceTask_2" name="Get Price and Change" camunda:class="de.kebidge.camunda.GlobalQuoteDelegate">
<bpmn:incoming>SequenceFlow_3</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_4</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="UserTask_2" name="Sell Stock" camunda:formKey="embedded:app:forms/sell_form.html" camunda:assignee="demo">
<bpmn:incoming>SequenceFlow_5</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_6</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_1" name="Sell?" default="SequenceFlow_7">
<bpmn:incoming>SequenceFlow_4</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_5</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_7</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_5" name="price &#60; 1 and change &#60; 0" sourceRef="Gateway_1" targetRef="UserTask_2">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${price&lt;1 and change&lt;0}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="EndEvent_2" name="Stock kept">
<bpmn:incoming>SequenceFlow_7</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_7" name="else" sourceRef="Gateway_1" targetRef="EndEvent_2" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="stock-asset-review">
<bpmndi:BPMNEdge id="Flow_0vuxnj0_di" bpmnElement="SequenceFlow_7">
<di:waypoint x="855" y="190" />
<di:waypoint x="1102" y="190" />
<bpmndi:BPMNLabel>
<dc:Bounds x="960" y="208" width="21" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0zqw9st_di" bpmnElement="SequenceFlow_5">
<di:waypoint x="830" y="165" />
<di:waypoint x="830" y="120" />
<di:waypoint x="920" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="777" y="86" width="65" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1dxkuas_di" bpmnElement="SequenceFlow_6">
<di:waypoint x="1020" y="120" />
<di:waypoint x="1102" y="120" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1kt7jg3_di" bpmnElement="SequenceFlow_4">
<di:waypoint x="730" y="190" />
<di:waypoint x="805" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_06l28f4_di" bpmnElement="SequenceFlow_3">
<di:waypoint x="540" y="190" />
<di:waypoint x="630" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1p2nm6g_di" bpmnElement="SequenceFlow_2">
<di:waypoint x="360" y="190" />
<di:waypoint x="440" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0t60i3l_di" bpmnElement="SequenceFlow_1">
<di:waypoint x="198" y="190" />
<di:waypoint x="260" y="190" />
<bpmndi:BPMNLabel>
<dc:Bounds x="209" y="122" width="43" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Activity_00yx1vs_di" bpmnElement="UserTask_1">
<dc:Bounds x="260" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0o0elvh_di" bpmnElement="StartEvent_1">
<dc:Bounds x="162" y="172" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="147" y="215" width="66" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0ov9625_di" bpmnElement="EndEvent_1">
<dc:Bounds x="1102" y="102" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1095" y="145" width="52" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_00qqedh_di" bpmnElement="ServiceTask_1">
<dc:Bounds x="440" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1yqx8ez_di" bpmnElement="ServiceTask_2">
<dc:Bounds x="630" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1lx723m_di" bpmnElement="UserTask_2">
<dc:Bounds x="920" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0zybgsi_di" bpmnElement="Gateway_1" isMarkerVisible="true">
<dc:Bounds x="805" y="165" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="818" y="222" width="25" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0wgvc1u_di" bpmnElement="EndEvent_2">
<dc:Bounds x="1102" y="172" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1094" y="215" width="53" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
<form role="form" name="form">
<label for="companyName">Company Name</label>
<input id="companyName" required
cam-variable-name="stock"
cam-variable-type="String"
class="form-control" />
</form>
\ No newline at end of file
<form role="form" name="form">
<div class="form-group">
<label for="symbol">Company Name</label>
<input id="symbol" required
cam-variable-name="stock"
cam-variable-type="String"
class="form-control"><br>
<label for="price">Price</label><br>
<input id="price" required
cam-variable-name="price"
cam-variable-type="Double"
class="form-control"><br>
<label for="change">Change</label><br>
<input id="change" required
cam-variable-name="change"
cam-variable-type="Double"
class="form-control"><br>
<input type="button" value="Sell">
<input type="button" value="Cancel">
</div>
</form>
\ No newline at end of file
server:
port: 9999
camunda.bpm:
admin-user:
id: demo
password: demo
filter.create: All
\ 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:camunda="http://camunda.org/schema/1.0/bpmn" 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_1x1nxrf" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
<bpmn:process id="stock-asset-review" name="Stock Asset Review" isExecutable="true" camunda:versionTag="1.0">
<bpmn:userTask id="UserTask_1" name="Set Company Name" camunda:formKey="embedded:app:forms/company_form.html" camunda:assignee="demo">
<bpmn:incoming>SequenceFlow_1</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_2</bpmn:outgoing>
</bpmn:userTask>
<bpmn:startEvent id="StartEvent_1" name="End of Month">
<bpmn:outgoing>SequenceFlow_1</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_1" sourceRef="StartEvent_1" targetRef="UserTask_1" />
<bpmn:endEvent id="EndEvent_1" name="Stock sold">
<bpmn:incoming>SequenceFlow_6</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_2" sourceRef="UserTask_1" targetRef="ServiceTask_1" />
<bpmn:sequenceFlow id="SequenceFlow_3" sourceRef="ServiceTask_1" targetRef="ServiceTask_2" />
<bpmn:serviceTask id="ServiceTask_1" name="Get Symbol" camunda:class="de.kebidge.camunda.SymbolSearchDelegate">
<bpmn:incoming>SequenceFlow_2</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_3</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_4" sourceRef="ServiceTask_2" targetRef="Gateway_1" />
<bpmn:sequenceFlow id="SequenceFlow_6" sourceRef="UserTask_2" targetRef="EndEvent_1" />
<bpmn:serviceTask id="ServiceTask_2" name="Get Price and Change" camunda:class="de.kebidge.camunda.GlobalQuoteDelegate">
<bpmn:incoming>SequenceFlow_3</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_4</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="UserTask_2" name="Sell Stock" camunda:formKey="embedded:app:forms/sell_form.html" camunda:assignee="demo">
<bpmn:incoming>SequenceFlow_5</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_6</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_1" name="Sell?" default="SequenceFlow_7">
<bpmn:incoming>SequenceFlow_4</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_5</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_7</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_5" name="price &#60; 1 and change &#60; 0" sourceRef="Gateway_1" targetRef="UserTask_2">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${price&lt;1 and change&lt;0}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="EndEvent_2" name="Stock kept">
<bpmn:incoming>SequenceFlow_7</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_7" name="else" sourceRef="Gateway_1" targetRef="EndEvent_2" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="stock-asset-review">
<bpmndi:BPMNEdge id="Flow_0vuxnj0_di" bpmnElement="SequenceFlow_7">
<di:waypoint x="855" y="190" />
<di:waypoint x="1102" y="190" />
<bpmndi:BPMNLabel>
<dc:Bounds x="960" y="208" width="21" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0zqw9st_di" bpmnElement="SequenceFlow_5">
<di:waypoint x="830" y="165" />
<di:waypoint x="830" y="120" />
<di:waypoint x="920" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="777" y="86" width="65" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1dxkuas_di" bpmnElement="SequenceFlow_6">
<di:waypoint x="1020" y="120" />
<di:waypoint x="1102" y="120" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1kt7jg3_di" bpmnElement="SequenceFlow_4">
<di:waypoint x="730" y="190" />
<di:waypoint x="805" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_06l28f4_di" bpmnElement="SequenceFlow_3">
<di:waypoint x="540" y="190" />
<di:waypoint x="630" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1p2nm6g_di" bpmnElement="SequenceFlow_2">
<di:waypoint x="360" y="190" />
<di:waypoint x="440" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0t60i3l_di" bpmnElement="SequenceFlow_1">
<di:waypoint x="198" y="190" />
<di:waypoint x="260" y="190" />
<bpmndi:BPMNLabel>
<dc:Bounds x="209" y="122" width="43" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Activity_00yx1vs_di" bpmnElement="UserTask_1">
<dc:Bounds x="260" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0o0elvh_di" bpmnElement="StartEvent_1">
<dc:Bounds x="162" y="172" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="147" y="215" width="66" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0ov9625_di" bpmnElement="EndEvent_1">
<dc:Bounds x="1102" y="102" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1095" y="145" width="52" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_00qqedh_di" bpmnElement="ServiceTask_1">
<dc:Bounds x="440" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1yqx8ez_di" bpmnElement="ServiceTask_2">
<dc:Bounds x="630" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1lx723m_di" bpmnElement="UserTask_2">
<dc:Bounds x="920" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0zybgsi_di" bpmnElement="Gateway_1" isMarkerVisible="true">
<dc:Bounds x="805" y="165" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="818" y="222" width="25" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0wgvc1u_di" bpmnElement="EndEvent_2">
<dc:Bounds x="1102" y="172" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1094" y="215" width="53" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
<form role="form" name="form">
<label for="companyName">Company Name</label>
<input id="companyName" required
cam-variable-name="stock"
cam-variable-type="String"
class="form-control" />
</form>
\ No newline at end of file
<form role="form" name="form">
<div class="form-group">
<label for="symbol">Company Name</label>
<input id="symbol" required
cam-variable-name="stock"
cam-variable-type="String"
class="form-control"><br>
<label for="price">Price</label><br>
<input id="price" required
cam-variable-name="price"
cam-variable-type="Double"
class="form-control"><br>
<label for="change">Change</label><br>
<input id="change" required
cam-variable-name="change"
cam-variable-type="Double"
class="form-control"><br>
<input type="button" value="Sell">
<input type="button" value="Cancel">
</div>
</form>
\ No newline at end of file
#Generated by Maven
#Tue Nov 23 02:26:49 CET 2021
groupId=de.kebidge.camunda
artifactId=stock-asset-review
version=1.0.0-SNAPSHOT
de\kebidge\camunda\GlobalQuoteDelegate.class
de\kebidge\camunda\SymbolSearchDelegate.class
de\kebidge\camunda\StockAssetReviewApplication.class
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment