fix(replace-menu): a compensation handler can also be a call-activity
closes #603
This commit is contained in:
parent
681869fb44
commit
13a9d24e84
|
@ -203,14 +203,6 @@ ReplaceMenuProvider.prototype.getEntries = function(element) {
|
|||
if (is(businessObject, 'bpmn:FlowNode')) {
|
||||
entries = filter(replaceOptions.TASK, differentType);
|
||||
|
||||
if (businessObject.isForCompensation) {
|
||||
|
||||
// can only replace to compensation activities
|
||||
entries = filter(entries, function(entry) {
|
||||
return !/CallActivity/.test(entry.target.type);
|
||||
});
|
||||
}
|
||||
|
||||
// collapsed SubProcess can not be replaced with itself
|
||||
if (is(businessObject, 'bpmn:SubProcess') && !isExpanded(businessObject)) {
|
||||
entries = reject(entries, function(entry) {
|
||||
|
|
|
@ -1068,7 +1068,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
|||
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
||||
|
||||
|
||||
it('should exclude non-activities from options', inject(function(elementRegistry, popupMenu) {
|
||||
it('options should include subProcesses and callActivity', inject(function(elementRegistry, popupMenu) {
|
||||
|
||||
// given
|
||||
var taskElement = elementRegistry.get('Task_1');
|
||||
|
@ -1080,7 +1080,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
|||
subProcessEntry = queryEntry(popupMenu, 'replace-with-collapsed-subprocess');
|
||||
|
||||
// then
|
||||
expect(callActivityEntry).to.not.exist;
|
||||
expect(callActivityEntry).to.exist;
|
||||
expect(subProcessEntry).to.exist;
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in New Issue