Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
add retries to TaskDefinition of ServiceTask
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikhorn93 committed Oct 11, 2017
1 parent 2b664c7 commit 228e29f
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
45 changes: 45 additions & 0 deletions client/lib/custom/propertyprovider/parts/TaskDefinitionProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,51 @@ module.exports = function(group, element, bpmnFactory) {
}
}));

group.entries.push(entryFactory.validationAwareTextField({
id: 'taskDefinitionRetries',
label: 'Retries',
modelProperty: 'retries',

getProperty: function(element, node) {
return (getTaskDefinition(element, node) || {}).retries;
},

setProperty: function(element, values, node) {
var bo = getBusinessObject(element);
var commands = [];

//CREATE extensionElemente
var extensionElements = bo.get('extensionElements');
if (!extensionElements) {
extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
commands.push(cmdHelper.updateProperties(element, { extensionElements: extensionElements }));
}
//create taskDefinition
var taskDefinition = getTaskDefinition(element);

if (!taskDefinition) {
taskDefinition = elementHelper.createElement('zeebe:TaskDefinition', { }, extensionElements, bpmnFactory);
commands.push(cmdHelper.addAndRemoveElementsFromList(
element,
extensionElements,
'values',
'extensionElements',
[ taskDefinition ],
[]
));
}

commands.push(cmdHelper.updateBusinessObject(element, taskDefinition, values));
return commands;
},

validate: function(element, values, node) {

return true;
}

}));

};


Expand Down
5 changes: 5 additions & 0 deletions client/lib/custom/zeebe-bpmn-moddle/zeebe.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@
"name": "type",
"type": "string",
"isAttr": true
},
{
"name": "retries",
"type": "string",
"isAttr": true
}
]
}
Expand Down

0 comments on commit 228e29f

Please sign in to comment.