Add custom Task

Hi,

In Task we have bpmn:serviceTask, bpm:userTask, bpmn:subprocess and so on.

I want to add a new task in that list Mobile Task. Can you please provide me any resources for this.

I dont want this to add to palette for drag & drop.

In ReplaceOptions.js i deleted the tasks which i dont want and added one.

export var TASK = [
{
label: ‘Task’,
actionName: ‘replace-with-task’,
className: ‘bpmn-icon-task’,
target: {
type: ‘bpmn:Task’
}
},
{
label: ‘Service Task’,
actionName: ‘replace-with-service-task’,
className: ‘bpmn-icon-service’,
target: {
type: ‘bpmn:ServiceTask’
}
},
{
label: ‘Sub-Process’,
actionName: ‘replace-with-collapsed-subprocess’,
className: ‘bpmn-icon-subprocess-collapsed’,
target: {
type: ‘bpmn:SubProcess’,
isExpanded: false
}
},
{
label: ‘Mobile Task’,
actionName: ‘replace-with-user-task’,
className: ‘bpmn-icon-user’,
target: {
type: ‘bpmn:MobileTask’
}
}
];

So i should have a type called bpmn:MobileTask

Hi @Vijaykch47,

firstly, can you please format your code? It’s hard to read.

bpmn:MobileTask is no valid BPMN element type. You have to implement it yourself as custom element. Please refer to this example for guidance.