Skip to main content
Version: 2.4

Process DemoTicketProcess

Overview

The DemoTicketProcess process is a sample BPMN process demonstrating automatic ticket routing (decision-making). Based on the evaluation result, the ticket is routed either through the Solution task or directly to the Verification task. Both branches always end with the Verification step before reaching the endpoint.

This document describes three process versions:

  • Version 0 - inline SpEL expressions directly in listeners (original approach)
  • Version 1 - delegate pattern with tsmScriptListenerExecutor and reusable scripts
  • Version 2 - task templates using the tsm:templateCode attribute (process created from predefined templates)

Process Diagram

The process diagram is shared by all versions - the process flow itself does not change:

demo_ticket

Version 0 - Inline SpEL Expressions

Process Elements

1. Start Event (Event_0nlkbod)

The process entry point. No input condition is required - the process starts immediately.

2. Service Task: Decision (Activity_12esote)

PropertyValue
TypeService Task
Expression#{true} (always succeeds)
ColorWHITE
Execution Listeners

This task has three listeners - two at start and one at end. All use inline SpEL expressions - logic is embedded directly in the expression attribute.

Listener 1 (start) - Ticket routing:

#ticket.priority == 'Blocker'
?
#ticket.chars.decision = 'solution'
:
#ticket.chars.decision = 'verification'
  • Checks ticket priority directly (no external script call)
  • If priority is Blocker, sets characteristic decision to 'solution'
  • Otherwise, sets characteristic decision to 'verification'

Listener 2 (start) - Decision description:

#ticket.chars.decision == 'solution' ?
#ticket.chars.decisionDescription = 'Resolve within 12 hours.'
:
#ticket.chars.decisionDescription = 'Resolve within 24 hours.'

  • Sets ticket characteristic decisionDescription based on the routing decision
  • If solution, deadline text is "Resolve within 12 hours."
  • If verification, deadline text is "Resolve within 24 hours."

Listener 3 (end) - Comment creation:

@comment.comment.create({
ownerType: "Ticket",
ownerId: #ticket.id,
comment: #ticket.chars?.decisionDescription
})
  • Creates a ticket comment with the decision description text from decisionDescription
  • The comment is created under the currently logged-in user
  • Runs at task end, so decisionDescription from listener 2 is already available

3. Exclusive Gateway - Branching (Gateway_13syha3)

BranchConditionTarget
Defaultnone (default flow)User Task Solution
Conditional#{#ticket.chars.decision == 'verification'}Merge Gateway Gateway_1bb2ay5 (skips Solution)

4. User Task: Solution (Activity_14932so)

PropertyValue
TypeUser Task
Assigneea4cb8448-c81c-46d0-9255-06d5191a56a4
Default open statusNEW
Allowed statusesNEW, DONE
Task Listener (event: create) - Notification on create
@notification.notification.sendNotification(
{
"templateCode" : "DemoTicketProcessCreation",
"ownerId" : #ticket.id,
"ownerType" : "Ticket",
"data" : {"ticketId" : #ticket.id},
"notificationTo" : {{"ownerId" : #ticket.creationUser,
"ownerType" : "User"}}
}
)
  • Inline call to @notification.notification.sendNotification directly in the expression attribute
  • Sends a notification to the ticket creator using template DemoTicketProcessCreation
Task Listener (event: complete) - Notification on complete
@notification.notification.sendNotification(
{
"templateCode" : "DemoTicketProcessCreation",
"ownerId" : #ticket.id,
"ownerType" : "Ticket",
"data" : {"ticketId" : #ticket.id},
"notificationTo" : {{"ownerId" : #ticket.creationUser,
"ownerType" : "User"}}
}
)
  • Inline call to @notification.notification.sendNotification directly in the expression attribute
  • Sends a notification to the ticket creator using template DemoTicketProcessCompletion

5. Merge Gateway (Gateway_1bb2ay5)

Merges both branches (from Solution and from the conditional skip) into a single flow leading to Verification.

6. User Task: Verification (Activity_1183phb)

PropertyValue
TypeUser Task
Assigneea4cb8448-c81c-46d0-9255-06d5191a56a4
Default open statusNEW
Allowed statusesNEW, DONE

Same base configuration as task Solution (assignee, statuses). No listeners.

7. End Event (Event_19chu7e)

Process ends after Verification is completed.

Services Used (Version 0)

ServiceUsage
@comment.comment.createCreates a ticket comment with decision description text
@notification.notification.sendNotificationSends notifications to ticket creator (on create and complete in task Solution)

Version 1 - Delegate Pattern with tsmScriptListenerExecutor

Version 1 keeps the same process flow but replaces inline SpEL expressions with delegate tsmScriptListenerExecutor, which executes reusable scripts with parameters.

Changes Compared to Version 0

Service Task: Decision - Listener migration

The task keeps 3 listeners, but listeners 2 and 3 are replaced by delegate expressions:

Listener 1 (start, expression) - Ticket routing:

#ticket.priority == 'Blocker'
?
#ticket.chars.decision = 'solution'
:
#ticket.chars.decision = 'verification'

No change vs v0 - remains as inline expression.

Listener 2 (start, delegateExpression) - Script DemoTicketProcess:

<camunda:executionListener delegateExpression="#{tsmScriptListenerExecutor}" event="start">
<camunda:field name="scriptCode" stringValue="DemoTicketProcess" />
<camunda:field name="paramsJson">
<camunda:string>{"decision":"#{#ticket.chars.decision}"}</camunda:string>
</camunda:field>
</camunda:executionListener>
Version 0 (inline)Version 1 (delegate)
Typeexpression="#{#ticket.chars.decision == ...}"delegateExpression="#{tsmScriptListenerExecutor}"
LogicInline ternary setting decisionDescriptionScript DemoTicketProcess with parameter decision
  • Uses delegate tsmScriptListenerExecutor instead of an inline expression
  • Executes script DemoTicketProcess, which sets decisionDescription based on the selected branch
  • Parameter decision is passed as SpEL expression #{#ticket.chars.decision}

Listener 3 (end, delegateExpression) - Script DemoTicketComment:

<camunda:executionListener delegateExpression="#{tsmScriptListenerExecutor}" event="end">
<camunda:field name="scriptCode" stringValue="DemoTicketComment" />
<camunda:field name="paramsJson">
<camunda:string>{"ticketId":"#{#ticket.id}","comment":"#{#ticket.chars.decisionDescription}"}</camunda:string>
</camunda:field>
</camunda:executionListener>
Version 0 (inline)Version 1 (delegate)
Typeexpression="#{@comment.comment.create(...)}"delegateExpression="#{tsmScriptListenerExecutor}"
LogicDirect @comment.comment.create callScript DemoTicketComment with parameters ticketId, comment
  • Replaces the original inline @comment.comment.create(...) from version 0
  • Runs at task end (end) so decisionDescription from listener 2 is already available
  • Creates a comment with the decision description text

User Task: Solution - Listener migration

In version 0, this task had inline listeners calling @notification.notification.sendNotification(...) directly. In version 1, they are replaced by delegate listeners with script DemoTicketNotification:

Task Listener 1 (create) - Notification on create:

Version 0 (inline)Version 1 (delegate)
Typecamunda:taskListener expression="..."camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}"
Call@notification.notification.sendNotification(...)script DemoTicketNotification with paramsJson: {"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCreation"}
<camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}" event="create">
<camunda:field name="scriptCode" stringValue="DemoTicketNotification" />
<camunda:field name="paramsJson">
<camunda:string>{"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCreation"}</camunda:string>
</camunda:field>
</camunda:taskListener>

Task Listener 2 (complete) - Notification on completion:

Version 0 (inline)Version 1 (delegate)
Typecamunda:taskListener expression="..."camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}"
Call@notification.notification.sendNotification(ticket, 'DemoTicketProcessCompletion', ...)script DemoTicketNotification with paramsJson: {"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCompletion"}
<camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}" event="complete">
<camunda:field name="scriptCode" stringValue="DemoTicketNotification" />
<camunda:field name="paramsJson">
<camunda:string>{"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCompletion"}</camunda:string>
</camunda:field>
</camunda:taskListener>

User Task: Verification - No changes

Task Verification remains unchanged in version 1.


Version 2 - Task Templates with tsm:templateCode

Version 2 uses the same listeners and scripts as version 1, but each task is additionally linked to a Task Template using attributes tsm:templateCode and tsm:templateVersion. The template defines complete task configuration (attributes, listeners, statuses) as a reusable building block.

Changes Compared to Version 1

New task attributes: tsm:templateCode + tsm:templateVersion

Each task in version 2 additionally contains:

Tasktsm:templateCodetsm:templateVersion
Service Task DecisionDemoTicketProcessDecision1.0.0
User Task SolutionDemoTicketProcessSolution1.0.0
User Task VerificationDemoTicketProcessVerification1.0.0

These attributes bind a task to its Task Template (see section Task Templates). Templates define default configuration, so attributes, listeners, and statuses are applied automatically.

New task element IDs

Tasks are recreated from templates and receive new BPMN element IDs:

TaskVersion 1 IDVersion 2 ID
DecisionActivity_12esoteActivity_09n8fih
SolutionActivity_14932soActivity_1u8j2f4
VerificationActivity_1183phbActivity_04xum8v

Remaining configuration - No changes

Listeners, scripts, and runtime logic remain identical to version 1. The only change is adding tsm:templateCode / tsm:templateVersion on each task.


Comparison: Inline SpEL vs Delegate Pattern vs Task Templates

Overall Overview

AspectVersion 0 (inline)Version 1 (delegate)Version 2 (task templates)
Logic definitionDirectly in expression attributeScript binding via scriptCode + paramsJsonSame as v1, but managed via template
ReusabilityLogic tied to one concrete taskScripts can be reused in any processWhole tasks reusable as templates (tsm:templateCode)
ParameterizationHardcoded in SpEL expressionJSON with SpEL references (#{#ticket.id})Same as v1
XML readabilityLong escaped expressions in attributesStructured XML with <camunda:field>Same as v1 + template metadata
Parameter configurationNone - all in codeForm Script.*.ParamsSame as v1
TestabilityMust test through full processScripts can be tested independentlyScripts + templates can be tested independently
NotificationsDirect @notification.notification.sendNotification(...)Delegate -> script DemoTicketNotificationSame as v1
CommentsDirect @comment.comment.create(...)Delegate -> script DemoTicketCommentSame as v1
Process creationManual configuration per taskManual configuration + delegate scriptsTemplate selection -> automatic configuration
Task versioningNoneNonetsm:templateVersion on each task

Example: User Task notifications

Version 0 - Inline expression:

<camunda:taskListener
expression="#{@notification.notification.sendNotification({'templateCode':'DemoTicketProcessCreation','ownerId':#ticket.id,'ownerType':'Ticket','data':{'ticketId':#ticket.id},'notificationTo':{'ownerId':#ticket.creationUser,'ownerType':'User'}})}"
event="create" />
<camunda:taskListener
expression="#{@notification.notification.sendNotification({'templateCode':'DemoTicketProcessCreation','ownerId':#ticket.id,'ownerType':'Ticket','data':{'ticketId':#ticket.id},'notificationTo':{'ownerId':#ticket.creationUser,'ownerType':'User'}})}"
event="complete" />

Version 1 - Delegate with script:

<camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}" event="create">
<camunda:field name="scriptCode" stringValue="DemoTicketNotification" />
<camunda:field name="paramsJson">
<camunda:string>{"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCreation"}</camunda:string>
</camunda:field>
</camunda:taskListener>
<camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}" event="complete">
<camunda:field name="scriptCode" stringValue="DemoTicketNotification" />
<camunda:field name="paramsJson">
<camunda:string>{"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCompletion"}</camunda:string>
</camunda:field>
</camunda:taskListener>

Key changes:

  • expression="#{@notification.notification.sendNotification(...)}" -> delegateExpression="#{tsmScriptListenerExecutor}" with script DemoTicketNotification (reusable, configurable through form)
  • Parameters (ticket, templateCode) are passed via JSON instead of inline arguments

Example: Comment creation on the Service Task

Version 0 - Inline:

@comment.comment.create({
ownerType: "Ticket",
ownerId: #ticket.id,
comment: #ticket.chars?.decisionDescription
})

Version 1 - Delegate:

<camunda:executionListener delegateExpression="#{tsmScriptListenerExecutor}" event="end">
<camunda:field name="scriptCode" stringValue="DemoTicketComment" />
<camunda:field name="paramsJson">
<camunda:string>{"ticketId":"#{#ticket.id}","comment":"#{#ticket.chars.decisionDescription}"}</camunda:string>
</camunda:field>
</camunda:executionListener>

Version 1 delegates this logic to script DemoTicketComment, which is reusable and configured through form Script.DemoTicketComment.Params.


Notification Templates

The process uses two notification templates for informing the ticket creator about task lifecycle events:

DemoTicketProcessCreation

PropertyValue
Notification typeDirect
NameDemo ticket process creation
SubjectDemo ticket process creation
StateActive
Config typeTicketing
Delivery typeEmail
PriorityLow

Sent when the Solution user task is created (create event). Notifies the ticket creator that the solution task has been assigned.

DemoTicketProcessCompletion

PropertyValue
Notification typeDirect
NameDemo ticket process completion
SubjectDemo ticket process completion
StateActive
Config typeTicketing
Delivery typeEmail
PriorityLow

Sent when the Solution user task is completed (complete event). Notifies the ticket creator that the solution task has been finished.


Script: DemoTicketComment

Script for creating a comment on a ticket. Used in the process for automatic comment creation.

@comment.comment.create({
ownerType: "Ticket",
ownerId: #ticketId,
comment: #comment
})

Parameters:

  • #ticketId - ID of the target ticket
  • #comment - comment text

Form: Script.DemoTicketComment.Params

Form for script DemoTicketComment parameters. Contains two inputs:

  • ticketId - ticket selector via LOV (tsm-ticket-lov), wrapped in expression editor
  • comment - text input for comment text, wrapped in expression editor

Both inputs use layout widget dtl-fluent-expression-editor, which allows entering values as SpEL expressions.

{
"type": "object",
"properties": {
"ticketId": {
"title": "Vyberte ticket",
"widget": {
"type": "tsm-ticket-lov",
"notitle": true,
"validationMessages": {}
},
"type": "string",
"config": {},
"localizationData": {
"en": {
"title": "Select a ticket",
"widget": { "tooltip": "", "placeholder": "" }
}
}
},
"comment": {
"type": "string",
"title": "Text",
"widget": {
"notitle": true,
"type": "text"
}
}
},
"widget": {
"type": "dtl-fluent-section"
},
"layout": [
{
"type": "layout",
"items": ["ticketId"],
"widget": {
"type": "dtl-fluent-expression-editor",
"validationMessages": {},
"labelPosition": "labelByFormType"
},
"title": "Ticket",
"localizationData": {
"en": {
"title": "Ticket",
"widget": { "tooltip": "", "placeholder": "" }
}
},
"config": {
"spelModule": "${$context.spelModule}",
"editorOptions": {
"fontSize": 12,
"minimap": { "enabled": false },
"automaticLayout": true,
"autoClosingBrackets": "always",
"matchBrackets": "always",
"renderWhitespace": "none",
"scrollBeyondLastLine": false,
"lineNumbers": "on",
"quickSuggestions": { "other": true, "comments": false, "strings": true },
"tabCompletion": "on"
}
},
"propertyKey": "ticketId"
},
{
"propertyKey": "comment",
"type": "layout",
"items": ["comment"],
"widget": {
"type": "dtl-fluent-expression-editor",
"validationMessages": {},
"labelPosition": "labelByFormType"
},
"title": "Komentář",
"localizationData": {
"en": {
"title": "Comment",
"widget": { "tooltip": "", "placeholder": "" }
}
},
"config": {
"spelModule": "${$context.spelModule}",
"editorOptions": {
"fontSize": 12,
"minimap": { "enabled": false },
"automaticLayout": true,
"autoClosingBrackets": "always",
"matchBrackets": "always",
"renderWhitespace": "none",
"scrollBeyondLastLine": false,
"lineNumbers": "on",
"quickSuggestions": { "other": true, "comments": false, "strings": true },
"tabCompletion": "on"
}
}
}
]
}

Script: DemoTicketProcess

Script for setting decision description based on selected branch. Based on parameter decision, it sets ticket characteristic decisionDescription.

#decision == 'solution' ?
#ticket.chars.decisionDescription = 'Resolve within 12 hours.'
:
#ticket.chars.decisionDescription = 'Resolve within 24 hours.'

Parameters:

  • #decision - branch selector string ('solution' or 'verification')

Form: Script.DemoTicketProcess.Params

Form for script DemoTicketProcess parameters. Contains one input:

  • decision - text input wrapped in expression editor (dtl-fluent-expression-editor), allowing value input as SpEL expression
{
"type": "object",
"layout": [
{
"type": "layout",
"items": [
"decision"
],
"title": "Rozhodnutí",
"config": {
"spelModule": "${$context.spelModule}",
"editorOptions": {
"minimap": {
"enabled": false
},
"fontSize": 12,
"lineNumbers": "on",
"matchBrackets": "always",
"tabCompletion": "on",
"automaticLayout": true,
"quickSuggestions": {
"other": true,
"strings": true,
"comments": false
},
"renderWhitespace": "none",
"autoClosingBrackets": "always",
"scrollBeyondLastLine": false
}
},
"widget": {
"type": "dtl-fluent-expression-editor",
"labelPosition": "labelByFormType",
"validationMessages": {}
},
"propertyKey": "decision",
"localizationData": {
"en": {
"title": "Decision",
"widget": { "tooltip": "", "placeholder": "" }
}
}
}
],
"widget": {
"type": "dtl-fluent-section"
},
"properties": {
"decision": {
"type": "string",
"title": "Text",
"widget": {
"type": "text",
"notitle": true
}
}
}
}

Script: DemoTicketNotification

Script for sending notification to ticket creator using selected notification template.

@notification.notification.sendNotification({
ownerId: #ticket.id,
ownerType: "Ticket",
templateCode: #templateCode,
data: {'ticket' : #ticket},
notificationTo : {
{
ownerId : #ticket.creationUser,
ownerType : "User"
}
}
})

Parameters:

  • #ticket - ticket object (uses id as notification owner and creationUser as recipient)
  • #templateCode - notification template code

Form: Script.DemoTicketNotification.Params

Form for script DemoTicketNotification parameters. Contains two inputs:

  • ticket - ticket selector via LOV (tsm-ticket-lov), returns whole object (selectProperty: "all"), wrapped in expression editor
  • templateCode - notification template selector via LOV (tsm-notification-template-lov), returns template code (selectProperty: "code"), wrapped in expression editor

Both inputs use spelModule: "${$context.spelModule}" for contextual SpEL module.

{
"type": "object",
"properties": {
"ticket": {
"type": "string",
"title": "Vyberte ticket",
"config": {
"selectProperty": "all"
},
"widget": {
"type": "tsm-ticket-lov",
"notitle": true,
"validationMessages": {}
},
"localizationData": {
"en": {
"title": "Select a ticket",
"widget": { "tooltip": "", "placeholder": "" }
}
}
},
"templateCode": {
"type": "string",
"title": "Vyberte šablonu upozornění",
"config": {
"selectProperty": "code"
},
"widget": {
"type": "tsm-notification-template-lov",
"notitle": true,
"validationMessages": {}
},
"localizationData": {
"en": {
"title": "Select a notification template",
"widget": { "tooltip": "", "placeholder": "" }
}
}
}
},
"widget": {
"type": "dtl-fluent-section"
},
"layout": [
{
"type": "layout",
"items": ["ticket"],
"title": "Ticket",
"widget": {
"type": "dtl-fluent-expression-editor",
"validationMessages": {},
"labelPosition": "labelByFormType"
},
"propertyKey": "ticket",
"localizationData": {
"en": {
"title": "Ticket",
"widget": { "tooltip": "", "placeholder": "" }
}
},
"config": {
"spelModule": "${$context.spelModule}",
"editorOptions": {
"fontSize": 12,
"minimap": { "enabled": false },
"automaticLayout": true,
"autoClosingBrackets": "always",
"matchBrackets": "always",
"renderWhitespace": "none",
"scrollBeyondLastLine": false,
"lineNumbers": "on",
"quickSuggestions": { "other": true, "comments": false, "strings": true },
"tabCompletion": "on"
}
}
},
{
"type": "layout",
"items": ["templateCode"],
"title": "Šablona",
"widget": {
"type": "dtl-fluent-expression-editor",
"validationMessages": {},
"labelPosition": "labelByFormType"
},
"propertyKey": "templateCode",
"localizationData": {
"en": {
"title": "Template",
"widget": { "tooltip": "", "placeholder": "" }
}
},
"config": {
"spelModule": "${$context.spelModule}",
"editorOptions": {
"fontSize": 12,
"minimap": { "enabled": false },
"automaticLayout": true,
"autoClosingBrackets": "always",
"matchBrackets": "always",
"renderWhitespace": "none",
"scrollBeyondLastLine": false,
"lineNumbers": "on",
"quickSuggestions": { "other": true, "comments": false, "strings": true },
"tabCompletion": "on"
}
}
}
]
}

Task Templates

Task templates define task configuration as a JSON array. They allow reusing the same set of attributes, listeners, and statuses across different tasks and processes. In version 2, templates are referenced directly from BPMN XML using attributes tsm:templateCode and tsm:templateVersion.

Task Template: DemoTicketProcessDecision (Service Task)

[
{
"set": "Decision",
"name": "name",
"type": "attribute"
},
{
"set": "#{true}",
"name": "expression",
"type": "attribute"
},
{
"set": "#{#ticket.priority == 'Blocker'\n?\n#ticket.chars.decision = 'solution'\n:\n#ticket.chars.decision = 'verification'}",
"type": "executionListener",
"event": "start"
},
{
"type": "executionListener",
"event": "start",
"params": {
"setJson": {
"decision": "#{#ticket.chars.decision}"
}
},
"scriptCode": {
"set": "DemoTicketProcess"
}
},
{
"type": "executionListener",
"event": "end",
"params": {
"setJson": {
"comment": "#{#ticket.chars.decisionDescription}",
"ticketId": "#{#ticket.id}"
}
},
"scriptCode": {
"set": "DemoTicketComment"
}
}
]
ItemTypeDescription
name = "Decision"attributeTask name
expression = "#{true}"attributeCamunda expression (always succeeds)
Execution listener (start)executionListenerInline SpEL - priority-based routing
Execution listener (start, DemoTicketProcess)executionListener + scriptCodeDelegate - sets decisionDescription
Execution listener (end, DemoTicketComment)executionListener + scriptCodeDelegate - creates comment

Task Template: DemoTicketProcessSolution (User Task)

[
{
"set": "Solution",
"name": "name",
"type": "attribute"
},
{
"set": "a4cb8448-c81c-46d0-9255-06d5191a56a4",
"name": "assignee",
"type": "attribute"
},
{
"set": "NEW",
"name": "defaultOpenStatus",
"type": "attribute"
},
{
"type": "taskListener",
"event": "create",
"params": {
"setJson": {
"ticket": "#{#ticket}",
"templateCode": "DemoTicketProcessCreation"
}
},
"scriptCode": {
"set": "DemoTicketNotification"
}
},
{
"type": "taskListener",
"event": "complete",
"params": {
"setJson": {
"ticket": "#{#ticket}",
"templateCode": "DemoTicketProcessCompletion"
}
},
"scriptCode": {
"set": "DemoTicketNotification"
}
},
{
"type": "status",
"statusCode": "NEW"
},
{
"type": "status",
"statusCode": "DONE"
}
]
ItemTypeDescription
name = "Solution"attributeTask name
assigneeattributeAssigned user
defaultOpenStatus = "NEW"attributeDefault open status
Task listener (create, DemoTicketNotification)taskListener + scriptCodeNotification on create (template DemoTicketProcessCreation)
Task listener (complete, DemoTicketNotification)taskListener + scriptCodeNotification on completion (template DemoTicketProcessCompletion)
Statuses NEW, DONEstatusAllowed statuses

Task Template: DemoTicketProcessVerification (User Task)

[
{
"set": "Verification",
"name": "name",
"type": "attribute"
},
{
"set": "a4cb8448-c81c-46d0-9255-06d5191a56a4",
"name": "assignee",
"type": "attribute"
},
{
"set": "NEW",
"name": "defaultOpenStatus",
"type": "attribute"
},
{
"type": "status",
"statusCode": "NEW"
},
{
"type": "status",
"statusCode": "DONE"
}
]
ItemTypeDescription
name = "Verification"attributeTask name
assigneeattributeAssigned user
defaultOpenStatus = "NEW"attributeDefault open status
Statuses NEW, DONEstatusAllowed statuses

Comparison with DemoTicketProcessSolution: template DemoTicketProcessVerification is minimal - no listeners or scripts, only base attributes and statuses.


Prerequisites

Version 0

  • Notification templates DemoTicketProcessCreation and DemoTicketProcessCompletion exist
  • Ticket characteristics decision and decisionDescription are defined

Version 1

  • Scripts DemoTicketProcess, DemoTicketComment, and DemoTicketNotification exist in the system
  • Forms Script.DemoTicketProcess.Params, Script.DemoTicketComment.Params, and Script.DemoTicketNotification.Params exist
  • Notification templates DemoTicketProcessCreation and DemoTicketProcessCompletion exist
  • Ticket characteristics decision and decisionDescription are defined

Version 2

  • Everything from Version 1, plus:
  • Task templates DemoTicketProcessDecision (v1.0.0), DemoTicketProcessSolution (v1.0.0), and DemoTicketProcessVerification (v1.0.0) exist

Source XML

Version 0 - inline SpEL
<?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:tsm="http://tsm.datalite.cz/schema/1.0/bpmn" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:color="http://www.omg.org/spec/BPMN/non-normative/color/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
<bpmn:process id="DemoTicketProcess" name="Demo ticket process" isExecutable="true" camunda:versionTag="0">
<bpmn:startEvent id="Event_0nlkbod">
<bpmn:outgoing>Flow_18nzlds</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_18nzlds" sourceRef="Event_0nlkbod" targetRef="Activity_12esote" />
<bpmn:serviceTask id="Activity_12esote" name="Decision" camunda:exclusive="false" camunda:expression="#{true}" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<camunda:executionListener expression="#{#ticket.priority == &#39;Blocker&#39;&#10;?&#10;#ticket.chars.decision = &#39;solution&#39;&#10;:&#10;#ticket.chars.decision = &#39;verification&#39;}" event="start" />
<camunda:executionListener expression="#{#ticket.chars.decision == &#39;solution&#39; ?&#10;#ticket.chars.decisionDescription = &#39;Resolve within 12 hours.&#39;&#10;:&#10;#ticket.chars.decisionDescription = &#39;Resolve within 24 hours.&#39;&#10;}" event="start" />
<camunda:executionListener expression="#{@comment.comment.create({&#10; ownerType: &#34;Ticket&#34;,&#10; ownerId: #ticket.id,&#10; comment: #ticket.chars.decisionDescription&#10;})}" event="end" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_18nzlds</bpmn:incoming>
<bpmn:outgoing>Flow_07q9j1q</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="Gateway_13syha3" default="Flow_19tkrij">
<bpmn:incoming>Flow_07q9j1q</bpmn:incoming>
<bpmn:outgoing>Flow_19tkrij</bpmn:outgoing>
<bpmn:outgoing>Flow_1gvb1ol</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_07q9j1q" sourceRef="Activity_12esote" targetRef="Gateway_13syha3" />
<bpmn:sequenceFlow id="Flow_19tkrij" sourceRef="Gateway_13syha3" targetRef="Activity_14932so" />
<bpmn:userTask id="Activity_14932so" name="Solution" camunda:exclusive="false" camunda:assignee="a4cb8448-c81c-46d0-9255-06d5191a56a4" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<tsm:status status="NEW" />
<tsm:status status="DONE" />
<camunda:taskListener expression="#{@notification.notification.sendNotification(&#10; {&#10; &#34;templateCode&#34; : &#34;DemoTicketProcessCreation&#34;,&#10; &#34;ownerId&#34; : #ticket.id,&#10; &#34;ownerType&#34; : &#34;Ticket&#34;,&#10; &#34;data&#34; : {&#34;ticketId&#34; : #ticket.id},&#10; &#34;notificationTo&#34; : {{&#34;ownerId&#34; : #ticket.creationUser,&#10; &#34;ownerType&#34; : &#34;User&#34;}}&#10; }&#10;)}" event="create" />
<camunda:taskListener expression="#{@notification.notification.sendNotification(&#10; {&#10; &#34;templateCode&#34; : &#34;DemoTicketProcessCreation&#34;,&#10; &#34;ownerId&#34; : #ticket.id,&#10; &#34;ownerType&#34; : &#34;Ticket&#34;,&#10; &#34;data&#34; : {&#34;ticketId&#34; : #ticket.id},&#10; &#34;notificationTo&#34; : {{&#34;ownerId&#34; : #ticket.creationUser,&#10; &#34;ownerType&#34; : &#34;User&#34;}}&#10; }&#10;)}" event="complete" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_19tkrij</bpmn:incoming>
<bpmn:outgoing>Flow_0fp5okw</bpmn:outgoing>
</bpmn:userTask>
<bpmn:endEvent id="Event_19chu7e">
<bpmn:incoming>Flow_095s07t</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0fp5okw" sourceRef="Activity_14932so" targetRef="Gateway_1bb2ay5" />
<bpmn:sequenceFlow id="Flow_1gvb1ol" name="Verification" sourceRef="Gateway_13syha3" targetRef="Gateway_1bb2ay5" tsm:color="black" tsm:description="&#60;p&#62;&#60;/p&#62;">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements />
<bpmn:conditionExpression>#{#ticket.chars.decision == 'verification'}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:userTask id="Activity_1183phb" name="Verification" camunda:exclusive="false" camunda:assignee="a4cb8448-c81c-46d0-9255-06d5191a56a4" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<tsm:status status="NEW" />
<tsm:status status="DONE" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0llyxq1</bpmn:incoming>
<bpmn:outgoing>Flow_095s07t</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_1bb2ay5">
<bpmn:incoming>Flow_0fp5okw</bpmn:incoming>
<bpmn:incoming>Flow_1gvb1ol</bpmn:incoming>
<bpmn:outgoing>Flow_0llyxq1</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_095s07t" sourceRef="Activity_1183phb" targetRef="Event_19chu7e" />
<bpmn:sequenceFlow id="Flow_0llyxq1" sourceRef="Gateway_1bb2ay5" targetRef="Activity_1183phb" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DemoTicketProcess">
<bpmndi:BPMNShape id="Event_0nlkbod_di" bpmnElement="Event_0nlkbod">
<dc:Bounds x="182" y="202" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_16vskqm_di" bpmnElement="Activity_12esote" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="270" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_13syha3_di" bpmnElement="Gateway_13syha3" isMarkerVisible="true">
<dc:Bounds x="425" y="195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0b7z7he_di" bpmnElement="Activity_14932so" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="540" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_19chu7e_di" bpmnElement="Event_19chu7e">
<dc:Bounds x="1032" y="202" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0rp0iqc_di" bpmnElement="Activity_1183phb" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="850" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1bb2ay5_di" bpmnElement="Gateway_1bb2ay5" isMarkerVisible="true">
<dc:Bounds x="725" y="195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_18nzlds_di" bpmnElement="Flow_18nzlds">
<di:waypoint x="218" y="220" />
<di:waypoint x="270" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_07q9j1q_di" bpmnElement="Flow_07q9j1q">
<di:waypoint x="370" y="220" />
<di:waypoint x="425" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_19tkrij_di" bpmnElement="Flow_19tkrij">
<di:waypoint x="475" y="220" />
<di:waypoint x="540" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0fp5okw_di" bpmnElement="Flow_0fp5okw">
<di:waypoint x="640" y="220" />
<di:waypoint x="725" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1gvb1ol_di" bpmnElement="Flow_1gvb1ol" bioc:stroke="#000000" color:border-color="#000000">
<di:waypoint x="450" y="245" />
<di:waypoint x="450" y="340" />
<di:waypoint x="750" y="340" />
<di:waypoint x="750" y="250" />
<bpmndi:BPMNLabel>
<dc:Bounds x="564" y="290" width="54" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_095s07t_di" bpmnElement="Flow_095s07t">
<di:waypoint x="950" y="220" />
<di:waypoint x="1032" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0llyxq1_di" bpmnElement="Flow_0llyxq1">
<di:waypoint x="775" y="220" />
<di:waypoint x="850" y="220" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Version 1 - delegate pattern
<?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:tsm="http://tsm.datalite.cz/schema/1.0/bpmn" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:color="http://www.omg.org/spec/BPMN/non-normative/color/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
<bpmn:process id="DemoTicketProcess" name="Demo ticket process" isExecutable="true" camunda:versionTag="1">
<bpmn:startEvent id="Event_0nlkbod">
<bpmn:outgoing>Flow_18nzlds</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_18nzlds" sourceRef="Event_0nlkbod" targetRef="Activity_12esote" />
<bpmn:serviceTask id="Activity_12esote" name="Decision" camunda:exclusive="false" camunda:expression="#{true}" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<camunda:executionListener expression="#{#ticket.priority == &#39;Blocker&#39;&#10;?&#10;#ticket.chars.decision = &#39;solution&#39;&#10;:&#10;#ticket.chars.decision = &#39;verification&#39;}" event="start" />
<camunda:executionListener delegateExpression="#{tsmScriptListenerExecutor}" event="start">
<camunda:field name="scriptCode" stringValue="DemoTicketProcess" />
<camunda:field name="paramsJson">
<camunda:string>{"decision":"#{#ticket.chars.decision}","rozhodnuti":"#{#ticket.chars.decision}"}</camunda:string>
</camunda:field>
</camunda:executionListener>
<camunda:executionListener delegateExpression="#{tsmScriptListenerExecutor}" event="end">
<camunda:field name="scriptCode" stringValue="DemoTicketComment" />
<camunda:field name="paramsJson">
<camunda:string>{"ticketId":"#{#ticket.id}","comment":"#{#ticket.chars.decisionDescription}"}</camunda:string>
</camunda:field>
</camunda:executionListener>
</bpmn:extensionElements>
<bpmn:incoming>Flow_18nzlds</bpmn:incoming>
<bpmn:outgoing>Flow_07q9j1q</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="Gateway_13syha3" default="Flow_19tkrij">
<bpmn:incoming>Flow_07q9j1q</bpmn:incoming>
<bpmn:outgoing>Flow_19tkrij</bpmn:outgoing>
<bpmn:outgoing>Flow_1gvb1ol</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_07q9j1q" sourceRef="Activity_12esote" targetRef="Gateway_13syha3" />
<bpmn:sequenceFlow id="Flow_19tkrij" sourceRef="Gateway_13syha3" targetRef="Activity_14932so" />
<bpmn:userTask id="Activity_14932so" name="Solution" camunda:exclusive="false" camunda:assignee="a4cb8448-c81c-46d0-9255-06d5191a56a4" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<tsm:status status="NEW" />
<tsm:status status="DONE" />
<camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}" event="create">
<camunda:field name="scriptCode" stringValue="DemoTicketNotification" />
<camunda:field name="paramsJson">
<camunda:string>{"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCreation"}</camunda:string>
</camunda:field>
</camunda:taskListener>
<camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}" event="complete">
<camunda:field name="scriptCode" stringValue="DemoTicketNotification" />
<camunda:field name="paramsJson">
<camunda:string>{"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCompletion"}</camunda:string>
</camunda:field>
</camunda:taskListener>
</bpmn:extensionElements>
<bpmn:incoming>Flow_19tkrij</bpmn:incoming>
<bpmn:outgoing>Flow_0fp5okw</bpmn:outgoing>
</bpmn:userTask>
<bpmn:endEvent id="Event_19chu7e">
<bpmn:incoming>Flow_095s07t</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0fp5okw" sourceRef="Activity_14932so" targetRef="Gateway_1bb2ay5" />
<bpmn:sequenceFlow id="Flow_1gvb1ol" name="Verification" sourceRef="Gateway_13syha3" targetRef="Gateway_1bb2ay5" tsm:color="black" tsm:description="&#60;p&#62;&#60;/p&#62;">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements />
<bpmn:conditionExpression>#{#ticket.chars.decision == 'verification'}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:userTask id="Activity_1183phb" name="Verification" camunda:exclusive="false" camunda:assignee="a4cb8448-c81c-46d0-9255-06d5191a56a4" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<tsm:status status="NEW" />
<tsm:status status="DONE" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0llyxq1</bpmn:incoming>
<bpmn:outgoing>Flow_095s07t</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_1bb2ay5">
<bpmn:incoming>Flow_0fp5okw</bpmn:incoming>
<bpmn:incoming>Flow_1gvb1ol</bpmn:incoming>
<bpmn:outgoing>Flow_0llyxq1</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_095s07t" sourceRef="Activity_1183phb" targetRef="Event_19chu7e" />
<bpmn:sequenceFlow id="Flow_0llyxq1" sourceRef="Gateway_1bb2ay5" targetRef="Activity_1183phb" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DemoTicketProcess">
<bpmndi:BPMNShape id="Event_0nlkbod_di" bpmnElement="Event_0nlkbod">
<dc:Bounds x="182" y="202" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_16vskqm_di" bpmnElement="Activity_12esote" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="270" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_13syha3_di" bpmnElement="Gateway_13syha3" isMarkerVisible="true">
<dc:Bounds x="425" y="195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0b7z7he_di" bpmnElement="Activity_14932so" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="540" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_19chu7e_di" bpmnElement="Event_19chu7e">
<dc:Bounds x="1032" y="202" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0rp0iqc_di" bpmnElement="Activity_1183phb" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="850" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1bb2ay5_di" bpmnElement="Gateway_1bb2ay5" isMarkerVisible="true">
<dc:Bounds x="725" y="195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_18nzlds_di" bpmnElement="Flow_18nzlds">
<di:waypoint x="218" y="220" />
<di:waypoint x="270" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_07q9j1q_di" bpmnElement="Flow_07q9j1q">
<di:waypoint x="370" y="220" />
<di:waypoint x="425" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_19tkrij_di" bpmnElement="Flow_19tkrij">
<di:waypoint x="475" y="220" />
<di:waypoint x="540" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0fp5okw_di" bpmnElement="Flow_0fp5okw">
<di:waypoint x="640" y="220" />
<di:waypoint x="725" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1gvb1ol_di" bpmnElement="Flow_1gvb1ol" bioc:stroke="#000000" color:border-color="#000000">
<di:waypoint x="450" y="245" />
<di:waypoint x="450" y="340" />
<di:waypoint x="750" y="340" />
<di:waypoint x="750" y="250" />
<bpmndi:BPMNLabel>
<dc:Bounds x="564" y="290" width="54" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_095s07t_di" bpmnElement="Flow_095s07t">
<di:waypoint x="950" y="220" />
<di:waypoint x="1032" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0llyxq1_di" bpmnElement="Flow_0llyxq1">
<di:waypoint x="775" y="220" />
<di:waypoint x="850" y="220" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Version 2 - task templates
<?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:tsm="http://tsm.datalite.cz/schema/1.0/bpmn" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:color="http://www.omg.org/spec/BPMN/non-normative/color/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
<bpmn:process id="DemoTicketProcess" name="Demo ticket process" isExecutable="true" camunda:versionTag="2">
<bpmn:startEvent id="Event_0nlkbod">
<bpmn:outgoing>Flow_18nzlds</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_18nzlds" sourceRef="Event_0nlkbod" targetRef="Activity_09n8fih" />
<bpmn:exclusiveGateway id="Gateway_13syha3" default="Flow_19tkrij">
<bpmn:incoming>Flow_14tro6o</bpmn:incoming>
<bpmn:outgoing>Flow_19tkrij</bpmn:outgoing>
<bpmn:outgoing>Flow_1gvb1ol</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_19tkrij" sourceRef="Gateway_13syha3" targetRef="Activity_1u8j2f4" />
<bpmn:endEvent id="Event_19chu7e">
<bpmn:incoming>Flow_0umnbu4</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_1gvb1ol" name="Verification" sourceRef="Gateway_13syha3" targetRef="Gateway_1bb2ay5" tsm:color="black" tsm:description="&#60;p&#62;&#60;/p&#62;">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements />
<bpmn:conditionExpression>#{#ticket.chars.decision == 'verification'}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="Gateway_1bb2ay5">
<bpmn:incoming>Flow_1gvb1ol</bpmn:incoming>
<bpmn:incoming>Flow_04pq459</bpmn:incoming>
<bpmn:outgoing>Flow_0llyxq1</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0llyxq1" sourceRef="Gateway_1bb2ay5" targetRef="Activity_04xum8v" />
<bpmn:sequenceFlow id="Flow_14tro6o" sourceRef="Activity_09n8fih" targetRef="Gateway_13syha3" />
<bpmn:serviceTask id="Activity_09n8fih" name="Decision" camunda:exclusive="false" camunda:expression="#{true}" tsm:templateCode="DemoTicketProcessDecision" tsm:templateVersion="1.0.0" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<camunda:executionListener expression="#{#ticket.priority == &#39;Blocker&#39;&#10;?&#10;#ticket.chars.decision = &#39;solution&#39;&#10;:&#10;#ticket.chars.decision = &#39;verification&#39;}" event="start" />
<camunda:executionListener delegateExpression="#{tsmScriptListenerExecutor}" event="start">
<camunda:field name="scriptCode" stringValue="DemoTicketProcess" />
<camunda:field name="paramsJson">
<camunda:string>{"decision":"#{#ticket.chars.decision}","rozhodnuti":"#{#ticket.chars.decision}"}</camunda:string>
</camunda:field>
</camunda:executionListener>
<camunda:executionListener delegateExpression="#{tsmScriptListenerExecutor}" event="end">
<camunda:field name="scriptCode" stringValue="DemoTicketComment" />
<camunda:field name="paramsJson">
<camunda:string>{"comment":"#{#ticket.chars.decisionDescription}","ticketId":"#{#ticket.id}"}</camunda:string>
</camunda:field>
</camunda:executionListener>
</bpmn:extensionElements>
<bpmn:incoming>Flow_18nzlds</bpmn:incoming>
<bpmn:outgoing>Flow_14tro6o</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_04pq459" sourceRef="Activity_1u8j2f4" targetRef="Gateway_1bb2ay5" />
<bpmn:userTask id="Activity_1u8j2f4" name="Solution" camunda:exclusive="false" camunda:assignee="a4cb8448-c81c-46d0-9255-06d5191a56a4" tsm:templateCode="DemoTicketProcessSolution" tsm:templateVersion="1.0.0" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<tsm:status status="NEW" />
<tsm:status status="DONE" />
<camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}" event="create">
<camunda:field name="scriptCode" stringValue="DemoTicketNotification" />
<camunda:field name="paramsJson">
<camunda:string>{"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCreation"}</camunda:string>
</camunda:field>
</camunda:taskListener>
<camunda:taskListener delegateExpression="#{tsmScriptListenerExecutor}" event="complete">
<camunda:field name="scriptCode" stringValue="DemoTicketNotification" />
<camunda:field name="paramsJson">
<camunda:string>{"ticket":"#{#ticket}","templateCode":"DemoTicketProcessCompletion"}</camunda:string>
</camunda:field>
</camunda:taskListener>
</bpmn:extensionElements>
<bpmn:incoming>Flow_19tkrij</bpmn:incoming>
<bpmn:outgoing>Flow_04pq459</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_0umnbu4" sourceRef="Activity_04xum8v" targetRef="Event_19chu7e" />
<bpmn:userTask id="Activity_04xum8v" name="Verification" camunda:exclusive="false" camunda:assignee="a4cb8448-c81c-46d0-9255-06d5191a56a4" tsm:templateCode="DemoTicketProcessVerification" tsm:templateVersion="1.0.0" tsm:description="&#60;p&#62;&#60;/p&#62;" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation>&lt;p&gt;&lt;/p&gt;</bpmn:documentation>
<bpmn:extensionElements>
<tsm:status status="NEW" />
<tsm:status status="DONE" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0llyxq1</bpmn:incoming>
<bpmn:outgoing>Flow_0umnbu4</bpmn:outgoing>
</bpmn:userTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DemoTicketProcess">
<bpmndi:BPMNShape id="Event_0nlkbod_di" bpmnElement="Event_0nlkbod">
<dc:Bounds x="182" y="202" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_13syha3_di" bpmnElement="Gateway_13syha3" isMarkerVisible="true">
<dc:Bounds x="425" y="195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_19chu7e_di" bpmnElement="Event_19chu7e">
<dc:Bounds x="1032" y="202" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1bb2ay5_di" bpmnElement="Gateway_1bb2ay5" isMarkerVisible="true">
<dc:Bounds x="725" y="195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1sxcxpk_di" bpmnElement="Activity_09n8fih" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="260" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0p9eeu3_di" bpmnElement="Activity_1u8j2f4" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="540" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0jsx6ke_di" bpmnElement="Activity_04xum8v" bioc:stroke="#000000" bioc:fill="#ffffff" color:background-color="#ffffff" color:border-color="#000000">
<dc:Bounds x="840" y="180" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_18nzlds_di" bpmnElement="Flow_18nzlds">
<di:waypoint x="218" y="220" />
<di:waypoint x="260" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_19tkrij_di" bpmnElement="Flow_19tkrij">
<di:waypoint x="475" y="220" />
<di:waypoint x="540" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1gvb1ol_di" bpmnElement="Flow_1gvb1ol" bioc:stroke="#000000" color:border-color="#000000">
<di:waypoint x="450" y="245" />
<di:waypoint x="450" y="340" />
<di:waypoint x="750" y="340" />
<di:waypoint x="750" y="250" />
<bpmndi:BPMNLabel>
<dc:Bounds x="564" y="290" width="54" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0llyxq1_di" bpmnElement="Flow_0llyxq1">
<di:waypoint x="775" y="220" />
<di:waypoint x="840" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_14tro6o_di" bpmnElement="Flow_14tro6o">
<di:waypoint x="360" y="220" />
<di:waypoint x="425" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_04pq459_di" bpmnElement="Flow_04pq459">
<di:waypoint x="640" y="220" />
<di:waypoint x="725" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0umnbu4_di" bpmnElement="Flow_0umnbu4">
<di:waypoint x="940" y="220" />
<di:waypoint x="1032" y="220" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>