2015-04-27 14:50:09 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var is = require('./ModelUtil').is,
|
|
|
|
getBusinessObject = require('./ModelUtil').getBusinessObject;
|
|
|
|
|
|
|
|
module.exports.isExpanded = function(element) {
|
|
|
|
|
|
|
|
if (is(element, 'bpmn:CallActivity')) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is(element, 'bpmn:SubProcess')) {
|
|
|
|
return getBusinessObject(element).di.isExpanded;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is(element, 'bpmn:Participant')) {
|
|
|
|
return !!getBusinessObject(element).processRef;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
};
|
2015-08-04 15:52:43 +00:00
|
|
|
|
|
|
|
module.exports.isEventSubProcess = function(element) {
|
|
|
|
return element && !!getBusinessObject(element).triggeredByEvent;
|
|
|
|
};
|