Skip to content

Instantly share code, notes, and snippets.

View tsurdilo's full-sized avatar

Tihomir Surdilovic tsurdilo

View GitHub Profile
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company</groupId>
<artifactId>business-application-service-2</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>business-application-service</name>
<parent>
GitHub: https://github.com/serverlessworkflow
Website: http://serverlessworkflow.io
Slack: https://slack.cncf.io/ #serverless-workflow
Meetings: https://www.cncf.io/community/calendar/
```json
{
"id": "helloworld",
"version": "1.0",
"name": "Hello World Workflow",
"description": "Inject Hello World",
"states":[
{
"name":"Hello State",
"type":"inject",
telegram.token=1279806730:AAEdLqtxm_f3PDoU71_2piAIKDULr369snE
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H "ce-id: 123" -H "ce-type: lastChainLink" -H "ce-source: test" --data '"Start"' http://localhost:8080/
{
"id": "123",
"name": "abc",
"events": [],
"functions": [],
"states": [],
"extensions": [
{
"id": "workflow-kpi-extension",
"content": "/a/b/c/d/e/mykpi.json"
{
"id": "123",
"name": "abc",
"events": [],
"functions": [],
"states": [],
"extensions": [
{
"id": "workflow-kpi-extension",
"content": {
{
"id": "123",
"name": "abc",
"events": [],
"functions": [],
"states": [],
"extensions": [
{
"extensionsid": "workflow-kpi-extension",
"currency": "USD",
Let's say we are developing an extension which adds additional information
to a serverless workflow that can be passed and processed by a simulation tool.
Our example extension can add "scenarios". Each scenario
can add "time" parameters for each of the workflow states and define a min and max value
within which the workflow state should be executed in. It should also add a "probability" parameter
which defines the probability that a state is triggered during the execution of the workflow.
So let's define a simple example workflow model and then add our custom extension into it:
{
"id": "VetAppointmentWorkflow",
"description": "Vet service call via events",
"version": "1.0",
"events": [
{
"name": "MakeVetAppointment",
"source": "VetServiceSoure",
"kind": "produced"
},