Multi Instance Task - Extension Element

Hi,

I want to create a multi instance task like message start in Start notation.

I have hidden the popup header and want to add Multiple Instances Task in the popup menu.

I modified ReplaceOptions.js file to add MultiInstance Task. But it is not working.

image

Any inputs will be appreciated.

Message Start:

{
label: ‘Change to Message Start’,
actionName: ‘replace-with-message-start’,
className: ‘bpmn-icon-start-event-message’,
target: {
type: ‘bpmn:StartEvent’,
eventDefinitionType: ‘bpmn:MessageEventDefinition’
}
}

I created MultiInstanceTask like below but not working
{
label: ‘Change to Multiple Instances Task’,
actionName: ‘replace-with-task’,
className: ‘bpmn-icon-task’,
target: {
type: ‘bpmn:ServiceTask’,
eventDefinitionType: ‘bpmn:multiInstanceLoopCharacteristics’
}
},

https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks

You’re welcome.

Thanks Philip

I want to add multi instance parallel task in the task wrench options not as an option in the popup header.

Please have a look at uploaded image. Can you tell me how to do this.

Please have a look on how we generate the loopCharacteristics in the ReplaceMenuProvider. Declaring them as eventDefinitionType as you shown above is not the right way.

Thanks for your reply.

If the above way of implementation is not correct than can you help me to create a new task.

 {
    label: 'Change to Multiple Instances Task',
    actionName: 'replace-with-multiinstance-task',
    className: 'bpmn-icon-multiinstancetask',
    target: {
      type: 'bpmn:MultiInstanceTask'
    }
  },

This way i will get bpmn:MultiInstanceTask is not a valid bpmn type.

Can you help me to create a new task like bpmn:MultiInstanceTask.

Please have a look at the BPMN spec to find out what qualifies a multi-instance task. bpmn:MultiInstanceTask is not a BPMN element.

Hi Philip,

Thank you for your quick response.

I understand the Multi Instance task and what qualifies Multi-Instance task.

My application requirement is I need to have bpmn:MultipleInstances task just like bpmn:Usertask, bpmn:ServiceTask, bpmn:SubProcess.

So I see two ways to achieve this.

  1. Rely on loop characteristics and bpmn multi-instance task.
  2. Create a new task type like bpmn:ExampleTask or abc:ExampleTask (abc is my company name)

I need your suggestion which approach i should go for and also how.

Thanks in advance for your help.
Vijay

Can you describe why you need a multi-instance task? Do you want to add it to the palette?

Thanks again for your quick response.

I don’t need this multi-instance task in palette. When a user clicks on wrench icon for Task, user gets options like Send Task, Receive Task, User Task…Sub Process(expanded). These are default settings we have bpmn.io.

image

My requirement is to customize and display only four tasks Task, Service Task, Sub-Process and Multiple Instances Task and also i don’t need a header to display parallel multi instance, sequential multi instance and loop.

I modified ReplaceOptions.js file to remove unwanted options but I finding it difficult to add a new option in the popup menu.

Please look at the attachment.

image .

I want multiple instances task just like other items in popup menu like Change to ServiceTask, subprocess and usertask.

Please let me know if this is clear.

Again thanks for your quick response, i have been trying to find a solution for this since three days.

1 Like