update
This commit is contained in:
162
ebpm-process-modeler/bpmn-js/provider/magic/CustomContextPad.js
Normal file
162
ebpm-process-modeler/bpmn-js/provider/magic/CustomContextPad.js
Normal file
@@ -0,0 +1,162 @@
|
||||
import inherits from 'inherits';
|
||||
//import layer from 'vue-layer';
|
||||
//import Vue from 'vue';
|
||||
//require("layui-layer");
|
||||
import {
|
||||
assign
|
||||
} from 'min-dash';
|
||||
|
||||
import ContextPadProvider from 'bpmn-js/lib/features/context-pad/ContextPadProvider';
|
||||
|
||||
import {
|
||||
bind
|
||||
} from 'min-dash';
|
||||
//import { appendFile } from 'fs';
|
||||
|
||||
/**上下文的什么鬼,actions代表每个事件,可以在这更改事件的属性,例如给title添加转换方法 */
|
||||
export default function CustomContextPadProvider(injector, connect, translate) {
|
||||
|
||||
injector.invoke(ContextPadProvider, this);
|
||||
|
||||
var cached = bind(this.getContextPadEntries, this);
|
||||
//console.log(this);
|
||||
//console.log(elementFactory);
|
||||
this.getContextPadEntries = function (element) {
|
||||
// console.log(ContextPadProvider);
|
||||
//console.log(this);
|
||||
var actions = cached(element);
|
||||
var businessObject = element.businessObject;
|
||||
// delete actions['Append TextAnnotation']
|
||||
//console.log(actions);
|
||||
if (actions['append.intermediate-event']) {
|
||||
delete actions['append.intermediate-event']
|
||||
}
|
||||
|
||||
if (!(/bpmn:.*Task/.test(businessObject.$type))) {
|
||||
delete actions['replace']
|
||||
}
|
||||
if (actions['append.end-event']) {
|
||||
//delete actions['append.end-event'];
|
||||
}
|
||||
if (actions['append.gateway']) {
|
||||
delete actions['append.gateway'];
|
||||
}
|
||||
if (actions['append.append-user-task']) {
|
||||
delete actions['append.append-user-task'];
|
||||
}
|
||||
if (actions['replace']) {
|
||||
delete actions['replace'];
|
||||
}
|
||||
if (actions['append.append-task']) {
|
||||
delete actions['append.append-task']
|
||||
actions['append.append-user-task'] = appendAction(this, 'bpmn:UserTask', 'bpmn-icon-user-task');
|
||||
}
|
||||
/*
|
||||
actions['aaDialog'] = {
|
||||
group: 'edit',
|
||||
className: "el-icon-plus",
|
||||
title: "弹框",
|
||||
action: {
|
||||
//dragstart: function (){alert(111)},
|
||||
click: function (){
|
||||
/*layer.open({
|
||||
type:1,
|
||||
content:'十几块了广阔的拉升',
|
||||
});
|
||||
//layer();
|
||||
//let $layer = layer(Vue);
|
||||
//console.log();
|
||||
layer.open({
|
||||
type:1,
|
||||
title: '在线调试'
|
||||
,content: '可以填写任意的layer代码'
|
||||
});
|
||||
},
|
||||
}
|
||||
};*/
|
||||
|
||||
for (let key in actions) {
|
||||
actions[key].title = translate(actions[key].title);
|
||||
if (key == 'delete') {
|
||||
actions[key].group = 'f';
|
||||
actions["4"] = actions[key];
|
||||
delete actions[key];
|
||||
}
|
||||
if (key == 'append.text-annotation') {
|
||||
actions[key].group = 'd';
|
||||
actions["2"] = actions[key];
|
||||
delete actions[key];
|
||||
}
|
||||
if (key == 'connect') {
|
||||
actions[key].group = 'a';
|
||||
actions["1"] = actions[key];
|
||||
delete actions[key];
|
||||
}
|
||||
}
|
||||
/*
|
||||
'append.append-task': appendAction(
|
||||
'bpmn:Task',
|
||||
'bpmn-icon-task'
|
||||
),
|
||||
|
||||
if(actions['replace']){
|
||||
delete actions['replace']
|
||||
}
|
||||
|
||||
if(isAny(businessObject, [ 'bpmn:StartEvent'])){
|
||||
|
||||
console.log(actions);
|
||||
delete actions['append.intermediate-event']
|
||||
console.log(actions);
|
||||
}*/
|
||||
//console.log(actions['replace'].action.click);
|
||||
return actions;
|
||||
};
|
||||
}
|
||||
|
||||
inherits(CustomContextPadProvider, ContextPadProvider);
|
||||
|
||||
CustomContextPadProvider.$inject = [
|
||||
'injector',
|
||||
'connect',
|
||||
'translate'
|
||||
];
|
||||
|
||||
|
||||
function appendAction(ContextPadProvider, type, className, title, options) {
|
||||
|
||||
if (typeof title !== 'string') {
|
||||
options = title;
|
||||
title = ContextPadProvider._translate('Append {type}', {
|
||||
type: type.replace(/^bpmn:/, '')
|
||||
});
|
||||
}
|
||||
|
||||
function appendStart(event, element) {
|
||||
|
||||
var shape = this._elementFactory.createShape(assign({
|
||||
type: type
|
||||
}, options));
|
||||
ContextPadProvider._create.start(event, shape, element);
|
||||
}
|
||||
|
||||
|
||||
var append = ContextPadProvider._autoPlace ? function (event, element) {
|
||||
var shape = ContextPadProvider._elementFactory.createShape(assign({
|
||||
type: type
|
||||
}, options));
|
||||
|
||||
ContextPadProvider._autoPlace.append(element, shape);
|
||||
} : appendStart;
|
||||
|
||||
|
||||
return {
|
||||
group: 'model',
|
||||
className: className,
|
||||
title: title,
|
||||
action: {
|
||||
dragstart: appendStart,
|
||||
click: append
|
||||
}
|
||||
};
|
||||
}
|
||||
221
ebpm-process-modeler/bpmn-js/provider/magic/CustomPalette.js
Normal file
221
ebpm-process-modeler/bpmn-js/provider/magic/CustomPalette.js
Normal file
@@ -0,0 +1,221 @@
|
||||
import {
|
||||
assign
|
||||
} from 'min-dash';
|
||||
|
||||
|
||||
/**
|
||||
* 定制调色板/感觉就是左边的菜单
|
||||
* A palette that allows you to create BPMN _and_ custom elements.
|
||||
* 允许您创建bpmn和定制元素的调色板。
|
||||
*/
|
||||
export default function PaletteProvider(palette, create, elementFactory, spaceTool, lassoTool, handTool,
|
||||
globalConnect, translate) {
|
||||
this._palette = palette;
|
||||
this._create = create;
|
||||
this._elementFactory = elementFactory;
|
||||
this._spaceTool = spaceTool;
|
||||
this._lassoTool = lassoTool;
|
||||
this._handTool = handTool;
|
||||
this._globalConnect = globalConnect;
|
||||
this._translate = translate;
|
||||
palette.registerProvider(this);
|
||||
}
|
||||
|
||||
PaletteProvider.$inject = [
|
||||
'palette',
|
||||
'create',
|
||||
'elementFactory',
|
||||
'spaceTool',
|
||||
'lassoTool',
|
||||
'handTool',
|
||||
'globalConnect',
|
||||
'translate'
|
||||
];
|
||||
|
||||
|
||||
PaletteProvider.prototype.getPaletteEntries = function (element) {
|
||||
var actions = {},
|
||||
create = this._create,
|
||||
elementFactory = this._elementFactory,
|
||||
spaceTool = this._spaceTool,
|
||||
lassoTool = this._lassoTool,
|
||||
handTool = this._handTool,
|
||||
globalConnect = this._globalConnect,
|
||||
translate = this._translate;
|
||||
|
||||
|
||||
function createAction(type, group, className, title, options) {
|
||||
|
||||
function createListener(event) {
|
||||
var shape = elementFactory.createShape(assign({
|
||||
type: type
|
||||
}, options));
|
||||
|
||||
if (options) {
|
||||
shape.businessObject.di.isExpanded = options.isExpanded;
|
||||
}
|
||||
create.start(event, shape);
|
||||
}
|
||||
var shortType = type.replace(/^bpmn:/, '');
|
||||
return {
|
||||
group: group,
|
||||
className: className + ' afterText',
|
||||
title: translate(title || 'Create ' + shortType),
|
||||
action: {
|
||||
dragstart: createListener,
|
||||
click: createListener
|
||||
}
|
||||
};
|
||||
}
|
||||
function createParticipant(event, collapsed) {
|
||||
create.start(event, elementFactory.createParticipantShape(collapsed));
|
||||
}
|
||||
|
||||
assign(actions, {
|
||||
/*'hand-tool': createAction(
|
||||
'custom:triangle', 'custom', 'icon-custom-triangle'
|
||||
),
|
||||
'custom-circle': createAction(
|
||||
'custom:circle', 'custom', 'icon-custom-circle'
|
||||
),
|
||||
'custom-separator': {
|
||||
group: 'custom',
|
||||
separator: true
|
||||
},
|
||||
*/
|
||||
/*
|
||||
'hand-tool': {
|
||||
group: 'tools',
|
||||
className: 'bpmn-icon-hand-tool',
|
||||
title: translate('Activate the hand tool'),
|
||||
action: {
|
||||
click: function(event) {
|
||||
handTool.activateHand(event);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
'space-tool': {
|
||||
group: 'tools',
|
||||
className: 'bpmn-icon-space-tool',
|
||||
title: translate('Activate the create/remove space tool'),
|
||||
action: {
|
||||
click: function(event) {
|
||||
spaceTool.activateSelection(event);
|
||||
}
|
||||
}
|
||||
},
|
||||
'tool-separator': {
|
||||
group: 'tools',
|
||||
separator: true
|
||||
},*/
|
||||
//事件
|
||||
'create.start-event': createAction(
|
||||
'bpmn:StartEvent', 'event', 'bpmn-icon-start-event-none'
|
||||
),
|
||||
/*
|
||||
'create.intermediate-event': createAction(
|
||||
'bpmn:IntermediateThrowEvent', 'event', 'bpmn-icon-intermediate-event-none'
|
||||
),*/
|
||||
'create.end-event': createAction(
|
||||
'bpmn:EndEvent', 'event', 'bpmn-icon-end-event-none'
|
||||
),
|
||||
'event-separator': {
|
||||
group: 'event',
|
||||
separator: true
|
||||
},
|
||||
//task 任务
|
||||
'create.user-task': createAction(
|
||||
'bpmn:UserTask', 'task', 'bpmn-icon-user-task'
|
||||
),
|
||||
'create.service-task': createAction(
|
||||
'bpmn:ServiceTask', 'task', 'bpmn-icon-service-task'
|
||||
),
|
||||
'create.script-task': createAction(
|
||||
'bpmn:ScriptTask', 'task', 'bpmn-icon-script-task'
|
||||
),
|
||||
'create.receive-task': createAction(
|
||||
'bpmn:ReceiveTask', 'task', 'bpmn-icon-receive-task'
|
||||
),
|
||||
'create.manual-task': createAction(
|
||||
'bpmn:ManualTask', 'task', 'bpmn-icon-manual-task'
|
||||
),
|
||||
'task-separator': {
|
||||
group: 'task',
|
||||
separator: true
|
||||
},
|
||||
//subprocess 流程
|
||||
// 'create.subprocess-expanded': createAction(
|
||||
// 'bpmn:SubProcess', 'subprocess', 'bpmn-icon-subprocess-expanded', 'Create expanded SubProcess', {
|
||||
// isExpanded: true
|
||||
// }
|
||||
// ),
|
||||
//collapsed-subprocess
|
||||
/* 'create.subprocess-collapsed': createAction(
|
||||
'bpmn:SubProcess', 'subprocess', 'bpmn-icon-subprocess-collapsed', 'Create collapsed SubProcess'
|
||||
), */
|
||||
'create.callactivity': createAction(
|
||||
'bpmn:CallActivity', 'subprocess', 'bpmn-icon-call-activity', 'Call Activity'
|
||||
),
|
||||
'subprocess-separator': {
|
||||
group: 'subprocess',
|
||||
separator: true
|
||||
},
|
||||
|
||||
//Gateway 网关
|
||||
|
||||
'create.exclusive-gateway': createAction(
|
||||
'bpmn:ExclusiveGateway', 'gateway', 'bpmn-icon-gateway-xor'
|
||||
),
|
||||
'create.inclusive-gateway': createAction(
|
||||
'bpmn:InclusiveGateway', 'gateway', 'bpmn-icon-gateway-or'
|
||||
),
|
||||
|
||||
'gateway-separator': {
|
||||
group: 'gateway',
|
||||
separator: true
|
||||
},
|
||||
//工具
|
||||
'global-connect-tool': {
|
||||
group: 'endTools',
|
||||
className: 'bpmn-icon-connection-multi afterText',
|
||||
title: translate('Activate the global connect tool'),
|
||||
action: {
|
||||
click: function (event) {
|
||||
globalConnect.toggle(event);
|
||||
}
|
||||
}
|
||||
},
|
||||
'lasso-tool': {
|
||||
group: 'endTools',
|
||||
className: 'bpmn-icon-lasso-tool afterText',
|
||||
title: translate('Activate the lasso tool'),
|
||||
action: {
|
||||
click: function (event) {
|
||||
lassoTool.activateSelection(event);
|
||||
}
|
||||
}
|
||||
},
|
||||
//bpmn:TextAnnotation
|
||||
'Append TextAnnotation':createAction(
|
||||
'bpmn:TextAnnotation', 'endTools', 'bpmn-icon-text-annotation','Append TextAnnotation'
|
||||
),
|
||||
/*
|
||||
'create.data-object': createAction(
|
||||
'bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object'
|
||||
),
|
||||
|
||||
'create.participant-expanded': {
|
||||
group: 'collaboration',
|
||||
className: 'bpmn-icon-participant',
|
||||
title: 'Create Pool/Participant',
|
||||
action: {
|
||||
dragstart: createParticipant,
|
||||
click: createParticipant
|
||||
}
|
||||
}*/
|
||||
});
|
||||
|
||||
return actions;
|
||||
};
|
||||
@@ -0,0 +1,219 @@
|
||||
import inherits from 'inherits';
|
||||
|
||||
import PropertiesActivator from 'bpmn-js-properties-panel/lib/PropertiesActivator';
|
||||
|
||||
// Require all properties you need from existing providers.
|
||||
// In this case all available bpmn relevant properties without camunda extensions.
|
||||
import processProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/ProcessProps';
|
||||
//import eventProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/EventProps';
|
||||
//import linkProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/LinkProps';
|
||||
import documentationProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/DocumentationProps';
|
||||
import idProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/IdProps';
|
||||
import nameProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/NameProps';
|
||||
import {
|
||||
isAny
|
||||
} from 'bpmn-js/lib/features/modeling/util/ModelingUtil';
|
||||
import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory';
|
||||
//import spellProps from '../magic/parts/SpellProps';
|
||||
//import axios from 'axios';
|
||||
//require("layui-layer");
|
||||
import Vue from 'vue';
|
||||
// Require your custom property entries.
|
||||
//import spellProps from './parts/SpellProps';
|
||||
var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
|
||||
var cmdHelper = require('bpmn-js-properties-panel/lib/helper/CmdHelper');
|
||||
|
||||
function ensureNotNull(prop) {
|
||||
if (!prop) {
|
||||
throw new Error(prop + ' must be set.');
|
||||
}
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
||||
var setDefaultParameters = function (options) {
|
||||
|
||||
// default method to fetch the current value of the input field
|
||||
var defaultGet = function (element) {
|
||||
var bo = getBusinessObject(element),
|
||||
res = {},
|
||||
prop = ensureNotNull(options.modelProperty);
|
||||
res[prop] = bo.get(prop);
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
// default method to set a new value to the input field
|
||||
var defaultSet = function (element, values) {
|
||||
var res = {},
|
||||
prop = ensureNotNull(options.modelProperty);
|
||||
if (values[prop] !== '') {
|
||||
res[prop] = values[prop];
|
||||
} else {
|
||||
res[prop] = undefined;
|
||||
}
|
||||
|
||||
return cmdHelper.updateProperties(element, res);
|
||||
};
|
||||
|
||||
// default validation method
|
||||
var defaultValidate = function () {
|
||||
return {};
|
||||
};
|
||||
|
||||
return {
|
||||
id: options.id,
|
||||
description: (options.description || ''),
|
||||
get: (options.get || defaultGet),
|
||||
set: (options.set || defaultSet),
|
||||
validate: (options.validate || defaultValidate),
|
||||
html: ''
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//配置右边状态栏
|
||||
// The general tab contains all bpmn relevant properties.
|
||||
// The properties are organized in groups.
|
||||
function createGeneralTabGroups(element, bpmnFactory, elementRegistry, translate) {
|
||||
var generalGroup = {
|
||||
id: 'general',
|
||||
label: translate('General'),
|
||||
entries: []
|
||||
};
|
||||
|
||||
if (isAny(element, ['bpmn:Process'])) {
|
||||
generalGroup.entries.push(entryFactory.textField({
|
||||
id: 'id',
|
||||
//description : 'Apply a black magic spell',
|
||||
label: '流程KEY',
|
||||
canBeDisabled: true,
|
||||
modelProperty: 'id'
|
||||
}));
|
||||
} else {
|
||||
idProps(generalGroup, element, translate);
|
||||
}
|
||||
|
||||
nameProps(generalGroup, element, null, null, translate);
|
||||
processProps(generalGroup, element, translate);
|
||||
documentationProps(generalGroup, element, bpmnFactory, translate);
|
||||
var configureGroup = {
|
||||
id: 'keyDetails',
|
||||
label: 'keyDetails',
|
||||
entries: []
|
||||
}
|
||||
/*
|
||||
var detailsGroup = {
|
||||
id: 'Details',
|
||||
label: 'Details',
|
||||
entries: []
|
||||
};
|
||||
linkProps(detailsGroup, element, translate);
|
||||
eventProps(detailsGroup, element, bpmnFactory, elementRegistry, translate);
|
||||
var documentationGroup = {
|
||||
id: 'Documentation',
|
||||
label: '说明',
|
||||
entries: []
|
||||
};
|
||||
|
||||
documentationProps(documentationGroup, element, bpmnFactory, translate);
|
||||
*/
|
||||
return [
|
||||
generalGroup,
|
||||
configureGroup
|
||||
// detailsGroup
|
||||
// documentationGroup
|
||||
]
|
||||
}
|
||||
|
||||
// Create the custom magic tab
|
||||
/*
|
||||
function createMagicTabGroups(element, elementRegistry) {
|
||||
|
||||
// Create a group called "Black Magic".
|
||||
var blackMagicGroup = {
|
||||
id: 'black-magic',
|
||||
label: 'Black Magic',
|
||||
entries: []
|
||||
};
|
||||
|
||||
// Add the spell props to the black magic group.
|
||||
|
||||
blackMagicGroup.entries.push(entryFactory.button({id:"id",label:"1111"}));
|
||||
spellProps(blackMagicGroup, element);
|
||||
return [
|
||||
blackMagicGroup
|
||||
];
|
||||
}*/
|
||||
|
||||
export default function MagicPropertiesProvider(
|
||||
eventBus, bpmnFactory, elementRegistry,
|
||||
translate) {
|
||||
|
||||
PropertiesActivator.call(this, eventBus);
|
||||
|
||||
this.getTabs = function (element) {
|
||||
|
||||
var generalTab = {
|
||||
id: 'General',
|
||||
label: '基本信息',
|
||||
groups: createGeneralTabGroups(element, bpmnFactory, elementRegistry, translate)
|
||||
};
|
||||
|
||||
// The "magic" tab
|
||||
/*
|
||||
var magicTab = {
|
||||
id: 'magic',
|
||||
label: 'Magic',
|
||||
groups: createMagicTabGroups(element, elementRegistry)
|
||||
};
|
||||
*/
|
||||
// Show general + "magic" tab
|
||||
return [
|
||||
generalTab,
|
||||
//magicTab
|
||||
];
|
||||
};
|
||||
}
|
||||
inherits(MagicPropertiesProvider, PropertiesActivator);
|
||||
|
||||
|
||||
//创建自定义控件
|
||||
|
||||
entryFactory.button = function (options, defaultParameters) {
|
||||
var id = options.id,
|
||||
label = options.label || id,
|
||||
element = options.element;
|
||||
var $dialogVisible = Vue.prototype.store.state.dialogVisible;
|
||||
var _click = function processConfig() {
|
||||
//console.log(Vue.prototype.store);
|
||||
// console.log(element)
|
||||
if (element && element.constructor.name == "Root") {
|
||||
$dialogVisible.dialogIfromeSrc = $dialogVisible.url + "/ebpm-process-manage/procDefModelMgr/proConfig.do?procDefId=" + $dialogVisible.procDefId;
|
||||
//$dialogVisible.dialogIfromeSrc = $dialogVisible.url+'/ebpm-process-manage/procDefModelMgr/proConfig.do?procDefId=api:1:79097648-b4c9-11e9-8827-aa03cab5dae6';
|
||||
$dialogVisible.title = "流程设置";
|
||||
} else {
|
||||
if (defaultParameters.id == 'bdqx') {
|
||||
$dialogVisible.dialogIfromeSrc = $dialogVisible.url + "/plateform-web/#/roleFormField?formId=" + $dialogVisible.formId + "&procDefKey=" + $dialogVisible.procDefKey +
|
||||
"&appId=" + $dialogVisible.appId + "&actDefId=" + element.id + "&formCode=" + $dialogVisible.formCode + "&modelId=" + $dialogVisible.modelId
|
||||
$dialogVisible.title = element.businessObject.name + "环节表单设置";
|
||||
} else {
|
||||
$dialogVisible.dialogIfromeSrc = $dialogVisible.url + "/ebpm-process-manage/activityInfo/actConfig.do?" +
|
||||
"processDefId=" + $dialogVisible.procDefId + "&activityDefId=" + element.id + "&sys=" + $dialogVisible.appId;
|
||||
//$dialogVisible.dialogIfromeSrc = $dialogVisible.url+'/ebpm-process-manage/activityInfo/actConfig.do?' +
|
||||
//'procDefId=api:1:79097648-b4c9-11e9-8827-aa03cab5dae6&activityDefId=sid-20F588AB-471E-4E74-B2B1-FB46403E26DB';
|
||||
$dialogVisible.title = "环节设置";
|
||||
}
|
||||
}
|
||||
$dialogVisible.show = true;
|
||||
//console.log($dialogVisible);
|
||||
}
|
||||
var resource = defaultParameters;
|
||||
if (!$dialogVisible.procDefId) {
|
||||
resource.html = '<a style="display: block;" data-action="_click" class="el-button el-button--primary el-button--mini is-disabled">' + label + '</a>';
|
||||
} else {
|
||||
resource.html = '<a style="display: block;" data-action="_click" class="el-button el-button--primary el-button--mini">' + label + '</a>';
|
||||
resource['_click'] = _click;
|
||||
}
|
||||
return resource;
|
||||
};
|
||||
14
ebpm-process-modeler/bpmn-js/provider/magic/index.js
Normal file
14
ebpm-process-modeler/bpmn-js/provider/magic/index.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import MagicPropertiesProvider from './MagicPropertiesProvider';
|
||||
import CustomPalette from './CustomPalette';
|
||||
import CustomContextPadProvider from "./CustomContextPad";
|
||||
import ReplaceMenuProvider from "./popup-menu/ReplaceMenuProvider";
|
||||
import ColorRenderer from '../../../bpmn-js/colors/ColorRenderer';
|
||||
|
||||
export default {
|
||||
__init__: [ 'propertiesProvider' , 'paletteProvider','contextPadProvider','replaceMenuProvider','colorRenderer'],
|
||||
propertiesProvider: [ 'type', MagicPropertiesProvider ],
|
||||
contextPadProvider: [ 'type', CustomContextPadProvider ],
|
||||
paletteProvider: [ 'type', CustomPalette ],
|
||||
replaceMenuProvider: [ 'type', ReplaceMenuProvider ],
|
||||
colorRenderer: [ 'type', ColorRenderer ],
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory';
|
||||
/** 没用上 */
|
||||
import {
|
||||
is
|
||||
} from 'bpmn-js/lib/util/ModelUtil';
|
||||
|
||||
|
||||
export default function(group, element) {
|
||||
|
||||
// Only return an entry, if the currently selected
|
||||
// element is a start event.
|
||||
|
||||
if (is(element, 'bpmn:StartEvent')) {
|
||||
group.entries.push(entryFactory.textField({
|
||||
id : 'spell',
|
||||
description : 'Apply a black magic spell',
|
||||
label : 'Spell',
|
||||
modelProperty : 'spell'
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,493 @@
|
||||
import {
|
||||
getBusinessObject,
|
||||
is
|
||||
} from '../../../../node_modules/bpmn-js/lib/util/ModelUtil';
|
||||
|
||||
import {
|
||||
isEventSubProcess,
|
||||
isExpanded
|
||||
} from '../../../../node_modules/bpmn-js/lib/util/DiUtil';
|
||||
|
||||
import {
|
||||
isDifferentType
|
||||
} from '../../../../node_modules/bpmn-js/lib/features/popup-menu/util/TypeUtil';
|
||||
import {
|
||||
forEach,
|
||||
filter
|
||||
} from 'min-dash';
|
||||
|
||||
import * as replaceOptions from './ReplaceOptions';
|
||||
|
||||
|
||||
/**
|
||||
* 替换弹出菜单的,不改默认行为的话只要改配置文件ReplaceOption.js
|
||||
* This module is an element agnostic replace menu provider for the popup menu.
|
||||
*/
|
||||
export default function ReplaceMenuProvider(
|
||||
popupMenu, modeling, moddle,
|
||||
bpmnReplace, rules, translate) {
|
||||
|
||||
this._popupMenu = popupMenu;
|
||||
this._modeling = modeling;
|
||||
this._moddle = moddle;
|
||||
this._bpmnReplace = bpmnReplace;
|
||||
this._rules = rules;
|
||||
this._translate = translate;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
ReplaceMenuProvider.$inject = [
|
||||
'popupMenu',
|
||||
'modeling',
|
||||
'moddle',
|
||||
'bpmnReplace',
|
||||
'rules',
|
||||
'translate'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Register replace menu provider in the popup menu
|
||||
*/
|
||||
ReplaceMenuProvider.prototype.register = function() {
|
||||
this._popupMenu.registerProvider('bpmn-replace', this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get all entries from replaceOptions for the given element and apply filters
|
||||
* on them. Get for example only elements, which are different from the current one.
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
*
|
||||
* @return {Array<Object>} a list of menu entry items
|
||||
*/
|
||||
ReplaceMenuProvider.prototype.getEntries = function(element) {
|
||||
|
||||
var businessObject = element.businessObject;
|
||||
|
||||
var rules = this._rules;
|
||||
|
||||
var entries;
|
||||
|
||||
if (!rules.allowed('shape.replace', { element: element })) {
|
||||
return [];
|
||||
}
|
||||
|
||||
var differentType = isDifferentType(element);
|
||||
|
||||
// start events outside event sub processes
|
||||
if (is(businessObject, 'bpmn:StartEvent') && !isEventSubProcess(businessObject.$parent)) {
|
||||
|
||||
entries = filter(replaceOptions.START_EVENT, differentType);
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// expanded/collapsed pools
|
||||
if (is(businessObject, 'bpmn:Participant')) {
|
||||
|
||||
entries = filter(replaceOptions.PARTICIPANT, function(entry) {
|
||||
return isExpanded(businessObject) !== entry.target.isExpanded;
|
||||
});
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// start events inside event sub processes
|
||||
if (is(businessObject, 'bpmn:StartEvent') && isEventSubProcess(businessObject.$parent)) {
|
||||
|
||||
entries = filter(replaceOptions.EVENT_SUB_PROCESS_START_EVENT, function(entry) {
|
||||
|
||||
var target = entry.target;
|
||||
|
||||
var isInterrupting = target.isInterrupting !== false;
|
||||
|
||||
var isInterruptingEqual = getBusinessObject(element).isInterrupting === isInterrupting;
|
||||
|
||||
// filters elements which types and event definition are equal but have have different interrupting types
|
||||
return differentType(entry) || !differentType(entry) && !isInterruptingEqual;
|
||||
|
||||
});
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// end events
|
||||
if (is(businessObject, 'bpmn:EndEvent')) {
|
||||
|
||||
entries = filter(replaceOptions.END_EVENT, function(entry) {
|
||||
var target = entry.target;
|
||||
|
||||
// hide cancel end events outside transactions
|
||||
if (target.eventDefinitionType == 'bpmn:CancelEventDefinition' && !is(businessObject.$parent, 'bpmn:Transaction')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return differentType(entry);
|
||||
});
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// boundary events
|
||||
if (is(businessObject, 'bpmn:BoundaryEvent')) {
|
||||
|
||||
entries = filter(replaceOptions.BOUNDARY_EVENT, function(entry) {
|
||||
|
||||
var target = entry.target;
|
||||
|
||||
if (target.eventDefinition == 'bpmn:CancelEventDefinition' &&
|
||||
!is(businessObject.attachedToRef, 'bpmn:Transaction')) {
|
||||
return false;
|
||||
}
|
||||
var cancelActivity = target.cancelActivity !== false;
|
||||
|
||||
var isCancelActivityEqual = businessObject.cancelActivity == cancelActivity;
|
||||
|
||||
return differentType(entry) || !differentType(entry) && !isCancelActivityEqual;
|
||||
});
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// intermediate events
|
||||
if (is(businessObject, 'bpmn:IntermediateCatchEvent') ||
|
||||
is(businessObject, 'bpmn:IntermediateThrowEvent')) {
|
||||
|
||||
entries = filter(replaceOptions.INTERMEDIATE_EVENT, differentType);
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// gateways
|
||||
if (is(businessObject, 'bpmn:Gateway')) {
|
||||
|
||||
entries = filter(replaceOptions.GATEWAY, differentType);
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// transactions
|
||||
if (is(businessObject, 'bpmn:Transaction')) {
|
||||
|
||||
entries = filter(replaceOptions.TRANSACTION, differentType);
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// expanded event sub processes
|
||||
if (isEventSubProcess(businessObject) && isExpanded(businessObject)) {
|
||||
|
||||
entries = filter(replaceOptions.EVENT_SUB_PROCESS, differentType);
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// expanded sub processes
|
||||
if (is(businessObject, 'bpmn:SubProcess') && isExpanded(businessObject)) {
|
||||
|
||||
entries = filter(replaceOptions.SUBPROCESS_EXPANDED, differentType);
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// collapsed ad hoc sub processes
|
||||
if (is(businessObject, 'bpmn:AdHocSubProcess') && !isExpanded(businessObject)) {
|
||||
|
||||
entries = filter(replaceOptions.TASK, function(entry) {
|
||||
|
||||
var target = entry.target;
|
||||
|
||||
var isTargetSubProcess = target.type === 'bpmn:SubProcess';
|
||||
|
||||
var isTargetExpanded = target.isExpanded === true;
|
||||
|
||||
return isDifferentType(element, target) && (!isTargetSubProcess || isTargetExpanded);
|
||||
});
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
// sequence flows
|
||||
if (is(businessObject, 'bpmn:SequenceFlow')) {
|
||||
return this._createSequenceFlowEntries(element, replaceOptions.SEQUENCE_FLOW);
|
||||
}
|
||||
|
||||
// flow nodes
|
||||
if (is(businessObject, 'bpmn:FlowNode')) {
|
||||
entries = filter(replaceOptions.TASK, differentType);
|
||||
|
||||
// collapsed SubProcess can not be replaced with itself
|
||||
if (is(businessObject, 'bpmn:SubProcess') && !isExpanded(businessObject)) {
|
||||
entries = filter(entries, function(entry) {
|
||||
return entry.label !== 'Sub Process (collapsed)';
|
||||
});
|
||||
}
|
||||
|
||||
return this._createEntries(element, entries);
|
||||
}
|
||||
|
||||
return [];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get a list of header items for the given element. This includes buttons
|
||||
* for multi instance markers and for the ad hoc marker.
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
*
|
||||
* @return {Array<Object>} a list of menu entry items
|
||||
*/
|
||||
ReplaceMenuProvider.prototype.getHeaderEntries = function(element) {
|
||||
|
||||
var headerEntries = [];
|
||||
|
||||
if (is(element, 'bpmn:Activity') && !isEventSubProcess(element)) {
|
||||
headerEntries = headerEntries.concat(this._getLoopEntries(element));
|
||||
}
|
||||
|
||||
if (is(element, 'bpmn:SubProcess') &&
|
||||
!is(element, 'bpmn:Transaction') &&
|
||||
!isEventSubProcess(element)) {
|
||||
headerEntries.push(this._getAdHocEntry(element));
|
||||
}
|
||||
|
||||
return headerEntries;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Creates an array of menu entry objects for a given element and filters the replaceOptions
|
||||
* according to a filter function.
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
* @param {Object} replaceOptions
|
||||
*
|
||||
* @return {Array<Object>} a list of menu items
|
||||
*/
|
||||
ReplaceMenuProvider.prototype._createEntries = function(element, replaceOptions) {
|
||||
var menuEntries = [];
|
||||
|
||||
var self = this;
|
||||
|
||||
forEach(replaceOptions, function(definition) {
|
||||
var entry = self._createMenuEntry(definition, element);
|
||||
|
||||
menuEntries.push(entry);
|
||||
});
|
||||
|
||||
return menuEntries;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an array of menu entry objects for a given sequence flow.
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
* @param {Object} replaceOptions
|
||||
|
||||
* @return {Array<Object>} a list of menu items
|
||||
*/
|
||||
ReplaceMenuProvider.prototype._createSequenceFlowEntries = function(element, replaceOptions) {
|
||||
|
||||
var businessObject = getBusinessObject(element);
|
||||
|
||||
var menuEntries = [];
|
||||
|
||||
var modeling = this._modeling,
|
||||
moddle = this._moddle;
|
||||
|
||||
var self = this;
|
||||
|
||||
forEach(replaceOptions, function(entry) {
|
||||
|
||||
switch (entry.actionName) {
|
||||
case 'replace-with-default-flow':
|
||||
if (businessObject.sourceRef.default !== businessObject &&
|
||||
(is(businessObject.sourceRef, 'bpmn:ExclusiveGateway') ||
|
||||
is(businessObject.sourceRef, 'bpmn:InclusiveGateway') ||
|
||||
is(businessObject.sourceRef, 'bpmn:ComplexGateway') ||
|
||||
is(businessObject.sourceRef, 'bpmn:Activity'))) {
|
||||
|
||||
menuEntries.push(self._createMenuEntry(entry, element, function() {
|
||||
modeling.updateProperties(element.source, { default: businessObject });
|
||||
}));
|
||||
}
|
||||
break;
|
||||
case 'replace-with-conditional-flow':
|
||||
if (!businessObject.conditionExpression && is(businessObject.sourceRef, 'bpmn:Activity')) {
|
||||
|
||||
menuEntries.push(self._createMenuEntry(entry, element, function() {
|
||||
var conditionExpression = moddle.create('bpmn:FormalExpression', { body: '' });
|
||||
|
||||
modeling.updateProperties(element, { conditionExpression: conditionExpression });
|
||||
}));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// default flows
|
||||
if (is(businessObject.sourceRef, 'bpmn:Activity') && businessObject.conditionExpression) {
|
||||
return menuEntries.push(self._createMenuEntry(entry, element, function() {
|
||||
modeling.updateProperties(element, { conditionExpression: undefined });
|
||||
}));
|
||||
}
|
||||
// conditional flows
|
||||
if ((is(businessObject.sourceRef, 'bpmn:ExclusiveGateway') ||
|
||||
is(businessObject.sourceRef, 'bpmn:InclusiveGateway') ||
|
||||
is(businessObject.sourceRef, 'bpmn:ComplexGateway') ||
|
||||
is(businessObject.sourceRef, 'bpmn:Activity')) &&
|
||||
businessObject.sourceRef.default === businessObject) {
|
||||
|
||||
return menuEntries.push(self._createMenuEntry(entry, element, function() {
|
||||
modeling.updateProperties(element.source, { default: undefined });
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return menuEntries;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Creates and returns a single menu entry item.
|
||||
*
|
||||
* @param {Object} definition a single replace options definition object
|
||||
* @param {djs.model.Base} element
|
||||
* @param {Function} [action] an action callback function which gets called when
|
||||
* the menu entry is being triggered.
|
||||
*
|
||||
* @return {Object} menu entry item
|
||||
*/
|
||||
ReplaceMenuProvider.prototype._createMenuEntry = function(definition, element, action) {
|
||||
var translate = this._translate;
|
||||
var replaceElement = this._bpmnReplace.replaceElement;
|
||||
|
||||
var replaceAction = function() {
|
||||
return replaceElement(element, definition.target);
|
||||
};
|
||||
|
||||
action = action || replaceAction;
|
||||
|
||||
var menuEntry = {
|
||||
label: translate(definition.label),
|
||||
className: definition.className,
|
||||
id: definition.actionName,
|
||||
action: action
|
||||
};
|
||||
|
||||
return menuEntry;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a list of menu items containing buttons for multi instance markers
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
*
|
||||
* @return {Array<Object>} a list of menu items
|
||||
*/
|
||||
ReplaceMenuProvider.prototype._getLoopEntries = function(element) {
|
||||
|
||||
var self = this;
|
||||
var translate = this._translate;
|
||||
|
||||
function toggleLoopEntry(event, entry) {
|
||||
var loopCharacteristics;
|
||||
|
||||
if (entry.active) {
|
||||
loopCharacteristics = undefined;
|
||||
} else {
|
||||
loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
|
||||
|
||||
if (entry.options.isSequential) {
|
||||
loopCharacteristics.isSequential = entry.options.isSequential;
|
||||
}
|
||||
}
|
||||
self._modeling.updateProperties(element, { loopCharacteristics: loopCharacteristics });
|
||||
}
|
||||
|
||||
var businessObject = getBusinessObject(element),
|
||||
loopCharacteristics = businessObject.loopCharacteristics;
|
||||
|
||||
var isSequential,
|
||||
isLoop,
|
||||
isParallel;
|
||||
|
||||
if (loopCharacteristics) {
|
||||
isSequential = loopCharacteristics.isSequential;
|
||||
isLoop = loopCharacteristics.isSequential === undefined;
|
||||
isParallel = loopCharacteristics.isSequential !== undefined && !loopCharacteristics.isSequential;
|
||||
}
|
||||
|
||||
|
||||
var loopEntries = [
|
||||
{
|
||||
id: 'toggle-parallel-mi',
|
||||
className: 'bpmn-icon-parallel-mi-marker',
|
||||
title: translate('Parallel Multi Instance'),
|
||||
active: isParallel,
|
||||
action: toggleLoopEntry,
|
||||
options: {
|
||||
loopCharacteristics: 'bpmn:MultiInstanceLoopCharacteristics',
|
||||
isSequential: false
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'toggle-sequential-mi',
|
||||
className: 'bpmn-icon-sequential-mi-marker',
|
||||
title: translate('Sequential Multi Instance'),
|
||||
active: isSequential,
|
||||
action: toggleLoopEntry,
|
||||
options: {
|
||||
loopCharacteristics: 'bpmn:MultiInstanceLoopCharacteristics',
|
||||
isSequential: true
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'toggle-loop',
|
||||
className: 'bpmn-icon-loop-marker',
|
||||
title: translate('Loop'),
|
||||
active: isLoop,
|
||||
action: toggleLoopEntry,
|
||||
options: {
|
||||
loopCharacteristics: 'bpmn:StandardLoopCharacteristics'
|
||||
}
|
||||
}
|
||||
];
|
||||
return loopEntries;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the menu items containing a button for the ad hoc marker
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
*
|
||||
* @return {Object} a menu item
|
||||
*/
|
||||
ReplaceMenuProvider.prototype._getAdHocEntry = function(element) {
|
||||
var translate = this._translate;
|
||||
var businessObject = getBusinessObject(element);
|
||||
|
||||
var isAdHoc = is(businessObject, 'bpmn:AdHocSubProcess');
|
||||
|
||||
var replaceElement = this._bpmnReplace.replaceElement;
|
||||
|
||||
var adHocEntry = {
|
||||
id: 'toggle-adhoc',
|
||||
className: 'bpmn-icon-ad-hoc-marker',
|
||||
title: translate('Ad-hoc'),
|
||||
active: isAdHoc,
|
||||
action: function() {
|
||||
if (isAdHoc) {
|
||||
return replaceElement(element, { type: 'bpmn:SubProcess' });
|
||||
} else {
|
||||
return replaceElement(element, { type: 'bpmn:AdHocSubProcess' });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return adHocEntry;
|
||||
};
|
||||
@@ -0,0 +1,793 @@
|
||||
export var START_EVENT = [
|
||||
{
|
||||
label: 'Start Event',
|
||||
actionName: 'replace-with-none-start',
|
||||
className: 'bpmn-icon-start-event-none',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'End Event',
|
||||
actionName: 'replace-with-none-end',
|
||||
className: 'bpmn-icon-end-event-none',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent'
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
label: 'Intermediate Throw Event',
|
||||
actionName: 'replace-with-none-intermediate-throwing',
|
||||
className: 'bpmn-icon-intermediate-event-none',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateThrowEvent'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: 'Message Start Event',
|
||||
actionName: 'replace-with-message-start',
|
||||
className: 'bpmn-icon-start-event-message',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Timer Start Event',
|
||||
actionName: 'replace-with-timer-start',
|
||||
className: 'bpmn-icon-start-event-timer',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:TimerEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Conditional Start Event',
|
||||
actionName: 'replace-with-conditional-start',
|
||||
className: 'bpmn-icon-start-event-condition',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:ConditionalEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Signal Start Event',
|
||||
actionName: 'replace-with-signal-start',
|
||||
className: 'bpmn-icon-start-event-signal',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
||||
}
|
||||
}*/
|
||||
];
|
||||
|
||||
export var INTERMEDIATE_EVENT = [
|
||||
{
|
||||
label: 'Start Event',
|
||||
actionName: 'replace-with-none-start',
|
||||
className: 'bpmn-icon-start-event-none',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Intermediate Throw Event',
|
||||
actionName: 'replace-with-none-intermediate-throw',
|
||||
className: 'bpmn-icon-intermediate-event-none',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateThrowEvent'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'End Event',
|
||||
actionName: 'replace-with-none-end',
|
||||
className: 'bpmn-icon-end-event-none',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Message Intermediate Catch Event',
|
||||
actionName: 'replace-with-message-intermediate-catch',
|
||||
className: 'bpmn-icon-intermediate-event-catch-message',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateCatchEvent',
|
||||
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Message Intermediate Throw Event',
|
||||
actionName: 'replace-with-message-intermediate-throw',
|
||||
className: 'bpmn-icon-intermediate-event-throw-message',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateThrowEvent',
|
||||
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Timer Intermediate Catch Event',
|
||||
actionName: 'replace-with-timer-intermediate-catch',
|
||||
className: 'bpmn-icon-intermediate-event-catch-timer',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateCatchEvent',
|
||||
eventDefinitionType: 'bpmn:TimerEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Escalation Intermediate Throw Event',
|
||||
actionName: 'replace-with-escalation-intermediate-throw',
|
||||
className: 'bpmn-icon-intermediate-event-throw-escalation',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateThrowEvent',
|
||||
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Conditional Intermediate Catch Event',
|
||||
actionName: 'replace-with-conditional-intermediate-catch',
|
||||
className: 'bpmn-icon-intermediate-event-catch-condition',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateCatchEvent',
|
||||
eventDefinitionType: 'bpmn:ConditionalEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Link Intermediate Catch Event',
|
||||
actionName: 'replace-with-link-intermediate-catch',
|
||||
className: 'bpmn-icon-intermediate-event-catch-link',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateCatchEvent',
|
||||
eventDefinitionType: 'bpmn:LinkEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Link Intermediate Throw Event',
|
||||
actionName: 'replace-with-link-intermediate-throw',
|
||||
className: 'bpmn-icon-intermediate-event-throw-link',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateThrowEvent',
|
||||
eventDefinitionType: 'bpmn:LinkEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Compensation Intermediate Throw Event',
|
||||
actionName: 'replace-with-compensation-intermediate-throw',
|
||||
className: 'bpmn-icon-intermediate-event-throw-compensation',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateThrowEvent',
|
||||
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Signal Intermediate Catch Event',
|
||||
actionName: 'replace-with-signal-intermediate-catch',
|
||||
className: 'bpmn-icon-intermediate-event-catch-signal',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateCatchEvent',
|
||||
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Signal Intermediate Throw Event',
|
||||
actionName: 'replace-with-signal-intermediate-throw',
|
||||
className: 'bpmn-icon-intermediate-event-throw-signal',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateThrowEvent',
|
||||
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export var END_EVENT = [
|
||||
{
|
||||
label: 'Start Event',
|
||||
actionName: 'replace-with-none-start',
|
||||
className: 'bpmn-icon-start-event-none',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'End Event',
|
||||
actionName: 'replace-with-none-end',
|
||||
className: 'bpmn-icon-end-event-none',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent'
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
label: 'Intermediate Throw Event',
|
||||
actionName: 'replace-with-none-intermediate-throw',
|
||||
className: 'bpmn-icon-intermediate-event-none',
|
||||
target: {
|
||||
type: 'bpmn:IntermediateThrowEvent'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: 'Message End Event',
|
||||
actionName: 'replace-with-message-end',
|
||||
className: 'bpmn-icon-end-event-message',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent',
|
||||
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Escalation End Event',
|
||||
actionName: 'replace-with-escalation-end',
|
||||
className: 'bpmn-icon-end-event-escalation',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent',
|
||||
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Error End Event',
|
||||
actionName: 'replace-with-error-end',
|
||||
className: 'bpmn-icon-end-event-error',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent',
|
||||
eventDefinitionType: 'bpmn:ErrorEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Cancel End Event',
|
||||
actionName: 'replace-with-cancel-end',
|
||||
className: 'bpmn-icon-end-event-cancel',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent',
|
||||
eventDefinitionType: 'bpmn:CancelEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Compensation End Event',
|
||||
actionName: 'replace-with-compensation-end',
|
||||
className: 'bpmn-icon-end-event-compensation',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent',
|
||||
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Signal End Event',
|
||||
actionName: 'replace-with-signal-end',
|
||||
className: 'bpmn-icon-end-event-signal',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent',
|
||||
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Terminate End Event',
|
||||
actionName: 'replace-with-terminate-end',
|
||||
className: 'bpmn-icon-end-event-terminate',
|
||||
target: {
|
||||
type: 'bpmn:EndEvent',
|
||||
eventDefinitionType: 'bpmn:TerminateEventDefinition'
|
||||
}
|
||||
}*/
|
||||
];
|
||||
|
||||
export var GATEWAY = [
|
||||
{
|
||||
label: 'Exclusive Gateway',
|
||||
actionName: 'replace-with-exclusive-gateway',
|
||||
className: 'bpmn-icon-gateway-xor',
|
||||
target: {
|
||||
type: 'bpmn:ExclusiveGateway'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Parallel Gateway',
|
||||
actionName: 'replace-with-parallel-gateway',
|
||||
className: 'bpmn-icon-gateway-parallel',
|
||||
target: {
|
||||
type: 'bpmn:ParallelGateway'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Inclusive Gateway',
|
||||
actionName: 'replace-with-inclusive-gateway',
|
||||
className: 'bpmn-icon-gateway-or',
|
||||
target: {
|
||||
type: 'bpmn:InclusiveGateway'
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
label: 'Complex Gateway',
|
||||
actionName: 'replace-with-complex-gateway',
|
||||
className: 'bpmn-icon-gateway-complex',
|
||||
target: {
|
||||
type: 'bpmn:ComplexGateway'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Event based Gateway',
|
||||
actionName: 'replace-with-event-based-gateway',
|
||||
className: 'bpmn-icon-gateway-eventbased',
|
||||
target: {
|
||||
type: 'bpmn:EventBasedGateway',
|
||||
instantiate: false,
|
||||
eventGatewayType: 'Exclusive'
|
||||
}
|
||||
}*/
|
||||
// Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194
|
||||
// {
|
||||
// label: 'Event based instantiating Gateway',
|
||||
// actionName: 'replace-with-exclusive-event-based-gateway',
|
||||
// className: 'bpmn-icon-exclusive-event-based',
|
||||
// target: {
|
||||
// type: 'bpmn:EventBasedGateway'
|
||||
// },
|
||||
// options: {
|
||||
// businessObject: { instantiate: true, eventGatewayType: 'Exclusive' }
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: 'Parallel Event based instantiating Gateway',
|
||||
// actionName: 'replace-with-parallel-event-based-instantiate-gateway',
|
||||
// className: 'bpmn-icon-parallel-event-based-instantiate-gateway',
|
||||
// target: {
|
||||
// type: 'bpmn:EventBasedGateway'
|
||||
// },
|
||||
// options: {
|
||||
// businessObject: { instantiate: true, eventGatewayType: 'Parallel' }
|
||||
// }
|
||||
// }
|
||||
];
|
||||
|
||||
export var SUBPROCESS_EXPANDED = [
|
||||
{
|
||||
label: 'Transaction',
|
||||
actionName: 'replace-with-transaction',
|
||||
className: 'bpmn-icon-transaction',
|
||||
target: {
|
||||
type: 'bpmn:Transaction',
|
||||
isExpanded: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Event Sub Process',
|
||||
actionName: 'replace-with-event-subprocess',
|
||||
className: 'bpmn-icon-event-subprocess-expanded',
|
||||
target: {
|
||||
type: 'bpmn:SubProcess',
|
||||
triggeredByEvent: true,
|
||||
isExpanded: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Sub Process (collapsed)',
|
||||
actionName: 'replace-with-collapsed-subprocess',
|
||||
className: 'bpmn-icon-subprocess-collapsed',
|
||||
target: {
|
||||
type: 'bpmn:SubProcess',
|
||||
isExpanded: false
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export var TRANSACTION = [
|
||||
{
|
||||
label: 'Sub Process',
|
||||
actionName: 'replace-with-subprocess',
|
||||
className: 'bpmn-icon-subprocess-expanded',
|
||||
target: {
|
||||
type: 'bpmn:SubProcess',
|
||||
isExpanded: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Event Sub Process',
|
||||
actionName: 'replace-with-event-subprocess',
|
||||
className: 'bpmn-icon-event-subprocess-expanded',
|
||||
target: {
|
||||
type: 'bpmn:SubProcess',
|
||||
triggeredByEvent: true,
|
||||
isExpanded: true
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export var EVENT_SUB_PROCESS = [
|
||||
{
|
||||
label: 'Sub Process',
|
||||
actionName: 'replace-with-subprocess',
|
||||
className: 'bpmn-icon-subprocess-expanded',
|
||||
target: {
|
||||
type: 'bpmn:SubProcess',
|
||||
isExpanded: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Transaction',
|
||||
actionName: 'replace-with-transaction',
|
||||
className: 'bpmn-icon-transaction',
|
||||
target: {
|
||||
type: 'bpmn:Transaction',
|
||||
isExpanded: true
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export var TASK = [
|
||||
{
|
||||
label: 'Task',
|
||||
actionName: 'replace-with-task',
|
||||
className: 'bpmn-icon-task',
|
||||
target: {
|
||||
type: 'bpmn:Task'
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
label: 'Send Task',
|
||||
actionName: 'replace-with-send-task',
|
||||
className: 'bpmn-icon-send',
|
||||
target: {
|
||||
type: 'bpmn:SendTask'
|
||||
}
|
||||
},*/
|
||||
{
|
||||
label: 'Receive Task',
|
||||
actionName: 'replace-with-receive-task',
|
||||
className: 'bpmn-icon-receive',
|
||||
target: {
|
||||
type: 'bpmn:ReceiveTask'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'User Task',
|
||||
actionName: 'replace-with-user-task',
|
||||
className: 'bpmn-icon-user',
|
||||
target: {
|
||||
type: 'bpmn:UserTask'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Manual Task',
|
||||
actionName: 'replace-with-manual-task',
|
||||
className: 'bpmn-icon-manual',
|
||||
target: {
|
||||
type: 'bpmn:ManualTask'
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
label: 'Business Rule Task',
|
||||
actionName: 'replace-with-rule-task',
|
||||
className: 'bpmn-icon-business-rule',
|
||||
target: {
|
||||
type: 'bpmn:BusinessRuleTask'
|
||||
}
|
||||
},
|
||||
*/
|
||||
{
|
||||
label: 'Service Task',
|
||||
actionName: 'replace-with-service-task',
|
||||
className: 'bpmn-icon-service',
|
||||
target: {
|
||||
type: 'bpmn:ServiceTask'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Script Task',
|
||||
actionName: 'replace-with-script-task',
|
||||
className: 'bpmn-icon-script',
|
||||
target: {
|
||||
type: 'bpmn:ScriptTask'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Call Activity',
|
||||
actionName: 'replace-with-call-activity',
|
||||
className: 'bpmn-icon-call-activity',
|
||||
target: {
|
||||
type: 'bpmn:CallActivity'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Sub Process (collapsed)',
|
||||
actionName: 'replace-with-collapsed-subprocess',
|
||||
className: 'bpmn-icon-subprocess-collapsed',
|
||||
target: {
|
||||
type: 'bpmn:SubProcess',
|
||||
isExpanded: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Sub Process (expanded)',
|
||||
actionName: 'replace-with-expanded-subprocess',
|
||||
className: 'bpmn-icon-subprocess-expanded',
|
||||
target: {
|
||||
type: 'bpmn:SubProcess',
|
||||
isExpanded: true
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export var BOUNDARY_EVENT = [
|
||||
{
|
||||
label: 'Message Boundary Event',
|
||||
actionName: 'replace-with-message-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-message',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Timer Boundary Event',
|
||||
actionName: 'replace-with-timer-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-timer',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:TimerEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Escalation Boundary Event',
|
||||
actionName: 'replace-with-escalation-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-escalation',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Conditional Boundary Event',
|
||||
actionName: 'replace-with-conditional-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-condition',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:ConditionalEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Error Boundary Event',
|
||||
actionName: 'replace-with-error-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-error',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:ErrorEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Cancel Boundary Event',
|
||||
actionName: 'replace-with-cancel-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-cancel',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:CancelEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Signal Boundary Event',
|
||||
actionName: 'replace-with-signal-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-signal',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Compensation Boundary Event',
|
||||
actionName: 'replace-with-compensation-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-compensation',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Message Boundary Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-message-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-non-interrupting-message',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:MessageEventDefinition',
|
||||
cancelActivity: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Timer Boundary Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-timer-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-non-interrupting-timer',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:TimerEventDefinition',
|
||||
cancelActivity: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Escalation Boundary Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-escalation-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-non-interrupting-escalation',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:EscalationEventDefinition',
|
||||
cancelActivity: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Conditional Boundary Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-conditional-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-non-interrupting-condition',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:ConditionalEventDefinition',
|
||||
cancelActivity: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Signal Boundary Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-signal-boundary',
|
||||
className: 'bpmn-icon-intermediate-event-catch-non-interrupting-signal',
|
||||
target: {
|
||||
type: 'bpmn:BoundaryEvent',
|
||||
eventDefinitionType: 'bpmn:SignalEventDefinition',
|
||||
cancelActivity: false
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export var EVENT_SUB_PROCESS_START_EVENT = [
|
||||
{
|
||||
label: 'Message Start Event',
|
||||
actionName: 'replace-with-message-start',
|
||||
className: 'bpmn-icon-start-event-message',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Timer Start Event',
|
||||
actionName: 'replace-with-timer-start',
|
||||
className: 'bpmn-icon-start-event-timer',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:TimerEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Conditional Start Event',
|
||||
actionName: 'replace-with-conditional-start',
|
||||
className: 'bpmn-icon-start-event-condition',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:ConditionalEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Signal Start Event',
|
||||
actionName: 'replace-with-signal-start',
|
||||
className: 'bpmn-icon-start-event-signal',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Error Start Event',
|
||||
actionName: 'replace-with-error-start',
|
||||
className: 'bpmn-icon-start-event-error',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:ErrorEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Escalation Start Event',
|
||||
actionName: 'replace-with-escalation-start',
|
||||
className: 'bpmn-icon-start-event-escalation',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Compensation Start Event',
|
||||
actionName: 'replace-with-compensation-start',
|
||||
className: 'bpmn-icon-start-event-compensation',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Message Start Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-message-start',
|
||||
className: 'bpmn-icon-start-event-non-interrupting-message',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:MessageEventDefinition',
|
||||
isInterrupting: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Timer Start Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-timer-start',
|
||||
className: 'bpmn-icon-start-event-non-interrupting-timer',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:TimerEventDefinition',
|
||||
isInterrupting: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Conditional Start Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-conditional-start',
|
||||
className: 'bpmn-icon-start-event-non-interrupting-condition',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:ConditionalEventDefinition',
|
||||
isInterrupting: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Signal Start Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-signal-start',
|
||||
className: 'bpmn-icon-start-event-non-interrupting-signal',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:SignalEventDefinition',
|
||||
isInterrupting: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Escalation Start Event (non-interrupting)',
|
||||
actionName: 'replace-with-non-interrupting-escalation-start',
|
||||
className: 'bpmn-icon-start-event-non-interrupting-escalation',
|
||||
target: {
|
||||
type: 'bpmn:StartEvent',
|
||||
eventDefinitionType: 'bpmn:EscalationEventDefinition',
|
||||
isInterrupting: false
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export var SEQUENCE_FLOW = [
|
||||
{
|
||||
label: 'Sequence Flow',
|
||||
actionName: 'replace-with-sequence-flow',
|
||||
className: 'bpmn-icon-connection'
|
||||
},
|
||||
{
|
||||
label: 'Default Flow',
|
||||
actionName: 'replace-with-default-flow',
|
||||
className: 'bpmn-icon-default-flow'
|
||||
},
|
||||
{
|
||||
label: 'Conditional Flow',
|
||||
actionName: 'replace-with-conditional-flow',
|
||||
className: 'bpmn-icon-conditional-flow'
|
||||
}
|
||||
];
|
||||
|
||||
export var PARTICIPANT = [
|
||||
{
|
||||
label: 'Expanded Pool',
|
||||
actionName: 'replace-with-expanded-pool',
|
||||
className: 'bpmn-icon-participant',
|
||||
target: {
|
||||
type: 'bpmn:Participant',
|
||||
isExpanded: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Collapsed Pool',
|
||||
actionName: 'replace-with-collapsed-pool',
|
||||
// TODO(@janstuemmel): maybe design new icon
|
||||
className: 'bpmn-icon-lane',
|
||||
target: {
|
||||
type: 'bpmn:Participant',
|
||||
isExpanded: false
|
||||
}
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user