Skip to content

Instantly share code, notes, and snippets.

@menski
Last active August 29, 2015 14:05
Show Gist options
  • Save menski/aaa98ff2c2f8b2bd5df0 to your computer and use it in GitHub Desktop.
Save menski/aaa98ff2c2f8b2bd5df0 to your computer and use it in GitHub Desktop.
CMMN Listener
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<definitions id="_7f0c94c0-2a22-445d-b4b7-4fd181e08248"
xmlns="http://www.omg.org/spec/CMMN/20131201/MODEL"
xmlns:camunda="http://camunda.org/schema/1.0/cmmn"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
targetNamespace="Examples">
<case id="case" name="Case">
<casePlanModel id="CasePlanModel_1">
<extensionElements>
<!-- Case execution listener which calls a delegate expression if the case is closed -->
<camunda:caseExecutionListener event="close" delegateExpression="${myListener}" />
</extensionElements>
<planItem id="PI_HumanTask_1" definitionRef="HumanTask_1" />
<humanTask id="HumanTask_1" name="A HumanTask">
<extensionElements>
<!-- Case execution listener which calls a delegate class if the human task is suspend -->
<camunda:caseExecutionListener event="suspend"
class="org.camunda.bpm.cmmn.listener.MyExecutionListener" />
<!-- Task listener which evaluates an expression if the human task is assigned -->
<camunda:taskListener event="assignment"
expression="${myTaskListener.notify(task, task.eventName)}" />
</extensionElements>
</humanTask>
</casePlanModel>
</case>
</definitions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment