UNPKG

vmes-flowable

Version:

ceshibao

35 lines (25 loc) 1.05 kB
'use strict'; var is = require('jeeplus-bpmn/lib/util/ModelUtil').is, getBusinessObject = require('jeeplus-bpmn/lib/util/ModelUtil').getBusinessObject; var jobPriority = require('./implementation/JobPriority'), jobRetryTimeCycle = require('./implementation/JobRetryTimeCycle'); module.exports = function(group, element, bpmnFactory, translate) { var businessObject = getBusinessObject(element); if (is(element, 'flowable:JobPriorized') || is(element, 'bpmn:Participant') && businessObject.get('processRef')) { group.entries = group.entries.concat(jobPriority(element, bpmnFactory, { getBusinessObject: function(element) { var bo = getBusinessObject(element); if (!is(bo, 'bpmn:Participant')) { return bo; } return bo.get('processRef'); } }, translate)); } if (is(element, 'flowable:AsyncCapable')) { group.entries = group.entries.concat(jobRetryTimeCycle(element, bpmnFactory, { getBusinessObject: getBusinessObject }, translate)); } };