Skip to content

Instantly share code, notes, and snippets.

View meyerdan's full-sized avatar

Daniel Meyer meyerdan

View GitHub Profile
@meyerdan
meyerdan / Api.java
Last active April 5, 2018 06:36
Zeebe Client Api ideas
public interface ZeebeClient
{
ZeebeTopicClient topic(String topicName);
Map<String, PartitionInfo> listTopics();
}
public interface ZeebeTopicClient
{
Future<TaskEvent> createTask(CreateTaskCommand cmd);
@meyerdan
meyerdan / README.md
Last active May 21, 2018 20:27
Human consumable text format for simple workflows

Motivation

Allow developers to specify workflows without the need for installing additional tooling such as a modeler.

Goals

  • It should be easy to define a simple workflow with a text editor only
  • The format must map down directly to BPMN
  • The format must be based on an existing text based format like (XML, JSON, YAML, TOML, ...)
@meyerdan
meyerdan / next-steps.md
Last active June 7, 2017 06:26
My Zeebe Questions

Everything related to Stream Processing is currently more or less well structured in the sense that it is clear which components exist, what their responsibilities are, how they interact and what the main mechanisms are. Yes, there are problmens but they are not "structural". However, everything besides Stream Processing is chaos. We need to bring some order and structure here -

Broker

  • Which kinds of interactions exist besides Stream Processing? Which facilities do we have to address them?
  • Which components are inside the broker and what are their main responsibilites? How can they interact?
  • Hat state is there and how is it managed?
  • Where are certain "aspects" of the client api protocol managed? For instance, if a request for which a broker is currently not leader is received it needs to be rejected. Currently this works differently for commands vs. control messages. This should probably be unified.

Client <> Broker Cluster

@meyerdan
meyerdan / api.java
Last active August 29, 2015 14:26
Typesafe property api
public class Property<T> {
protected final String name;
public Property(String name) {
this.name = name;
}
public String toString() {
return name;
@meyerdan
meyerdan / CreateFilter.java
Last active April 5, 2018 17:12
camunda Filter Service
// create a taskQuery
TaskQuery myTasksQuery = taskService.createTaskQuery().taskAssignee("daniel.meyer").active();
// save taskQuery as filter
Filter myTasksFilter = filterService.newTaskFilter("My Tasks");
myTasksFilter.setOwner("daniel.meyer");
myTasksFilter.setQuery(myTasksQuery);
String filterId = filterService.saveFilter(myTasksFilter);
// execute the filter
@meyerdan
meyerdan / loan-application.xml
Created July 17, 2014 09:55
CMMN Loan application XML Code
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<definitions id="_81291489-586f-4b00-b7c4-1ef8f7523c29"
targetNamespace="Examples"
xmlns="http://www.omg.org/spec/CMMN/20131201/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<case id="loanApplication" name="Loan Application Case">
<casePlanModel name="Loan Application" id="CasePlanModel_1">
@meyerdan
meyerdan / CreateAndComplete.java
Created July 17, 2014 09:54
CMMN Loan Application Example
// deploy the case definition
repositoryService.createDeployment()
.addClasspathResource("org/camunda/bpm/engine/test/examples/cmmn/loan-application.cmmn")
.deploy();
// create a new case instance
CaseInstance caseInstance = caseService
.withCaseDefinitionByKey("loanApplication")
.setVariable("applicantId", "some id ...")
.create();
@meyerdan
meyerdan / async-berfore-and-after.xml
Last active August 29, 2015 14:04
Asynchronous continuations
<!-- AFTER (new) -->
<serviceTask id="service1" name="Generate Invoice" camunda:asyncAfter="true"
camunda:class="my.custom.Delegate" />
<!-- BEFORE -->
<serviceTask id="service1" name="Generate Invoice" camunda:asyncBefore="true"
camunda:class="my.custom.Delegate" />
@meyerdan
meyerdan / xpathEl.xml
Last active August 29, 2015 14:02
xpath in el
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">
<![CDATA[
${ XML(someVariable).xPath('/customers/customer[@id='+customerId+']/@score' ).number() >= 100 }
]]>
</bpmn2:conditionExpression>
@meyerdan
meyerdan / bpmnIoMapping.xml
Last active August 29, 2015 14:02
I/O mapping
<bpmn2:serviceTask id="requestScore" name="Request Rating Score">
<bpmn2:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="customer">${ XML(customers).xPath('/customers/customer[1]').element() }</camunda:inputParameter>
<camunda:inputParameter name="requestedAmount">${ amount }</camunda:inputParameter>
<camunda:inputParameter name="someData">
<camunda:map>
<camunda:entry key="a">${b}</camunda:entry>
<camunda:entry key="c">${d}</camunda:entry>