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
tsmScriptListenerExecutorand reusable scripts - Version 2 - task templates using the
tsm:templateCodeattribute (process created from predefined templates)
Process Diagram
The process diagram is shared by all versions - the process flow itself does not change:
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)
| Property | Value |
|---|---|
| Type | Service Task |
| Expression | #{true} (always succeeds) |
| Color | WHITE |
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 characteristicdecisionto'solution' - Otherwise, sets characteristic
decisionto'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
decisionDescriptionbased 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
decisionDescriptionfrom listener 2 is already available
3. Exclusive Gateway - Branching (Gateway_13syha3)
| Branch | Condition | Target |
|---|---|---|
| Default | none (default flow) | User Task Solution |
| Conditional | #{#ticket.chars.decision == 'verification'} | Merge Gateway Gateway_1bb2ay5 (skips Solution) |
4. User Task: Solution (Activity_14932so)
| Property | Value |
|---|---|
| Type | User Task |
| Assignee | a4cb8448-c81c-46d0-9255-06d5191a56a4 |
| Default open status | NEW |
| Allowed statuses | NEW, 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.sendNotificationdirectly in theexpressionattribute - 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.sendNotificationdirectly in theexpressionattribute - 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)
| Property | Value |
|---|---|
| Type | User Task |
| Assignee | a4cb8448-c81c-46d0-9255-06d5191a56a4 |
| Default open status | NEW |
| Allowed statuses | NEW, 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)
| Service | Usage |
|---|---|
@comment.comment.create | Creates a ticket comment with decision description text |
@notification.notification.sendNotification | Sends 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) | |
|---|---|---|
| Type | expression="#{#ticket.chars.decision == ...}" | delegateExpression="#{tsmScriptListenerExecutor}" |
| Logic | Inline ternary setting decisionDescription | Script DemoTicketProcess with parameter decision |
- Uses delegate
tsmScriptListenerExecutorinstead of an inline expression - Executes script
DemoTicketProcess, which setsdecisionDescriptionbased on the selected branch - Parameter
decisionis 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) | |
|---|---|---|
| Type | expression="#{@comment.comment.create(...)}" | delegateExpression="#{tsmScriptListenerExecutor}" |
| Logic | Direct @comment.comment.create call | Script DemoTicketComment with parameters ticketId, comment |
- Replaces the original inline
@comment.comment.create(...)from version 0 - Runs at task end (
end) sodecisionDescriptionfrom 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) | |
|---|---|---|
| Type | camunda: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) | |
|---|---|---|
| Type | camunda: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:
| Task | tsm:templateCode | tsm:templateVersion |
|---|---|---|
Service Task Decision | DemoTicketProcessDecision | 1.0.0 |
User Task Solution | DemoTicketProcessSolution | 1.0.0 |
User Task Verification | DemoTicketProcessVerification | 1.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:
| Task | Version 1 ID | Version 2 ID |
|---|---|---|
| Decision | Activity_12esote | Activity_09n8fih |
| Solution | Activity_14932so | Activity_1u8j2f4 |
| Verification | Activity_1183phb | Activity_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
| Aspect | Version 0 (inline) | Version 1 (delegate) | Version 2 (task templates) |
|---|---|---|---|
| Logic definition | Directly in expression attribute | Script binding via scriptCode + paramsJson | Same as v1, but managed via template |
| Reusability | Logic tied to one concrete task | Scripts can be reused in any process | Whole tasks reusable as templates (tsm:templateCode) |
| Parameterization | Hardcoded in SpEL expression | JSON with SpEL references (#{#ticket.id}) | Same as v1 |
| XML readability | Long escaped expressions in attributes | Structured XML with <camunda:field> | Same as v1 + template metadata |
| Parameter configuration | None - all in code | Form Script.*.Params | Same as v1 |
| Testability | Must test through full process | Scripts can be tested independently | Scripts + templates can be tested independently |
| Notifications | Direct @notification.notification.sendNotification(...) | Delegate -> script DemoTicketNotification | Same as v1 |
| Comments | Direct @comment.comment.create(...) | Delegate -> script DemoTicketComment | Same as v1 |
| Process creation | Manual configuration per task | Manual configuration + delegate scripts | Template selection -> automatic configuration |
| Task versioning | None | None | tsm: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 scriptDemoTicketNotification(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
| Property | Value |
|---|---|
| Notification type | Direct |
| Name | Demo ticket process creation |
| Subject | Demo ticket process creation |
| State | Active |
| Config type | Ticketing |
| Delivery type | |
| Priority | Low |
Sent when the Solution user task is created (create event). Notifies the ticket creator that the solution task has been assigned.
DemoTicketProcessCompletion
| Property | Value |
|---|---|
| Notification type | Direct |
| Name | Demo ticket process completion |
| Subject | Demo ticket process completion |
| State | Active |
| Config type | Ticketing |
| Delivery type | |
| Priority | Low |
Sent when the Solution user task is completed (complete event). Notifies the ticket creator that the solution task has been finished.
Related Scripts and Forms
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 (usesidas notification owner andcreationUseras 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"
}
}
]
| Item | Type | Description |
|---|---|---|
name = "Decision" | attribute | Task name |
expression = "#{true}" | attribute | Camunda expression (always succeeds) |
| Execution listener (start) | executionListener | Inline SpEL - priority-based routing |
Execution listener (start, DemoTicketProcess) | executionListener + scriptCode | Delegate - sets decisionDescription |
Execution listener (end, DemoTicketComment) | executionListener + scriptCode | Delegate - 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"
}
]
| Item | Type | Description |
|---|---|---|
name = "Solution" | attribute | Task name |
assignee | attribute | Assigned user |
defaultOpenStatus = "NEW" | attribute | Default open status |
Task listener (create, DemoTicketNotification) | taskListener + scriptCode | Notification on create (template DemoTicketProcessCreation) |
Task listener (complete, DemoTicketNotification) | taskListener + scriptCode | Notification on completion (template DemoTicketProcessCompletion) |
Statuses NEW, DONE | status | Allowed 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"
}
]
| Item | Type | Description |
|---|---|---|
name = "Verification" | attribute | Task name |
assignee | attribute | Assigned user |
defaultOpenStatus = "NEW" | attribute | Default open status |
Statuses NEW, DONE | status | Allowed statuses |
Comparison with DemoTicketProcessSolution: template DemoTicketProcessVerification is minimal - no listeners or scripts, only base attributes and statuses.
Prerequisites
Version 0
- Notification templates
DemoTicketProcessCreationandDemoTicketProcessCompletionexist - Ticket characteristics
decisionanddecisionDescriptionare defined
Version 1
- Scripts
DemoTicketProcess,DemoTicketComment, andDemoTicketNotificationexist in the system - Forms
Script.DemoTicketProcess.Params,Script.DemoTicketComment.Params, andScript.DemoTicketNotification.Paramsexist - Notification templates
DemoTicketProcessCreationandDemoTicketProcessCompletionexist - Ticket characteristics
decisionanddecisionDescriptionare defined
Version 2
- Everything from Version 1, plus:
- Task templates
DemoTicketProcessDecision(v1.0.0),DemoTicketProcessSolution(v1.0.0), andDemoTicketProcessVerification(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="<p></p>" tsm:color="WHITE">
<bpmn:documentation><p></p></bpmn:documentation>
<bpmn:extensionElements>
<camunda:executionListener expression="#{#ticket.priority == 'Blocker' ? #ticket.chars.decision = 'solution' : #ticket.chars.decision = 'verification'}" event="start" />
<camunda:executionListener expression="#{#ticket.chars.decision == 'solution' ? #ticket.chars.decisionDescription = 'Resolve within 12 hours.' : #ticket.chars.decisionDescription = 'Resolve within 24 hours.' }" event="start" />
<camunda:executionListener expression="#{@comment.comment.create({ ownerType: "Ticket", ownerId: #ticket.id, comment: #ticket.chars.decisionDescription })}" 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="<p></p>" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation><p></p></bpmn:documentation>
<bpmn:extensionElements>
<tsm:status status="NEW" />
<tsm:status status="DONE" />
<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" />
</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="<p></p>">
<bpmn:documentation><p></p></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="<p></p>" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation><p></p></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="<p></p>" tsm:color="WHITE">
<bpmn:documentation><p></p></bpmn:documentation>
<bpmn:extensionElements>
<camunda:executionListener expression="#{#ticket.priority == 'Blocker' ? #ticket.chars.decision = 'solution' : #ticket.chars.decision = 'verification'}" 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="<p></p>" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation><p></p></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="<p></p>">
<bpmn:documentation><p></p></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="<p></p>" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation><p></p></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="<p></p>">
<bpmn:documentation><p></p></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="<p></p>" tsm:color="WHITE">
<bpmn:documentation><p></p></bpmn:documentation>
<bpmn:extensionElements>
<camunda:executionListener expression="#{#ticket.priority == 'Blocker' ? #ticket.chars.decision = 'solution' : #ticket.chars.decision = 'verification'}" 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="<p></p>" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation><p></p></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="<p></p>" tsm:defaultOpenStatus="NEW" tsm:color="WHITE">
<bpmn:documentation><p></p></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>