mirror of
https://github.com/yudaocode/yudao-ui-admin-vue3.git
synced 2026-04-22 08:58:38 +00:00
feat:bpmn流程设计器增加http任务组件
This commit is contained in:
@@ -89,6 +89,26 @@ F.prototype.getPaletteEntries = function () {
|
||||
create.start(event, elementFactory.createParticipantShape())
|
||||
}
|
||||
|
||||
function createHttpServiceTask(event) {
|
||||
const httpTask = elementFactory.createShape({
|
||||
type: 'bpmn:ServiceTask'
|
||||
})
|
||||
|
||||
const businessObject = httpTask.businessObject
|
||||
|
||||
if (typeof businessObject.set === 'function') {
|
||||
businessObject.set('flowable:type', 'http')
|
||||
} else {
|
||||
businessObject['flowable:type'] = 'http'
|
||||
}
|
||||
|
||||
if (!businessObject.name) {
|
||||
businessObject.name = translate('HTTP Task')
|
||||
}
|
||||
|
||||
create.start(event, httpTask)
|
||||
}
|
||||
|
||||
assign(actions, {
|
||||
'hand-tool': {
|
||||
group: 'tools',
|
||||
@@ -177,6 +197,15 @@ F.prototype.getPaletteEntries = function () {
|
||||
'bpmn-icon-service',
|
||||
translate('Create Service Task')
|
||||
),
|
||||
'create.http-service-task': {
|
||||
group: 'activity',
|
||||
className: 'bpmn-icon-service',
|
||||
title: translate('Create HTTP Task'),
|
||||
action: {
|
||||
dragstart: createHttpServiceTask,
|
||||
click: createHttpServiceTask
|
||||
}
|
||||
},
|
||||
'create.data-object': createAction(
|
||||
'bpmn:DataObjectReference',
|
||||
'data-object',
|
||||
|
||||
Reference in New Issue
Block a user