Be able to create second process in collaboration diagram
- Dominant language
- JavaScript
- Stars
- 58
- Forks
- 12
- Avg merge
- 11h 15m
- Merged PRs (30d)
- 1
Description
### Is your feature request related to a problem? Please describe.
I'm unable to create multiple processes using the CLI tool. By default, say there already exists a process, then creating a new participant would simply attach a participant to that process, which is fine. This also has a secondary effect, where in the elements list, it replaces a process with a collaboration and a participant. Now to create a second participant, we would call create again with type participant and pass it id of the collaboration as the parent. However, this only creates a participant in that collaboration and not a process, which leads to irregular diagram behavior.
### Describe the solution you'd like
When creating a new participant, also create a new process and link it to the participant.
### Describe alternatives you've considered
None.
### Additional context
Here is the initial XML I use to feed into the modeller
```xml
```
Here is what I see originally, which is expected

Then on running the following commands in the console
```js
cli.elements() // ['Collaboration', 'Participant_1']
cli.create('bpmn:Participant', '0,300', 'Collaboration')
```
I get this in the diagram, where the participant seems to be incorrectly diagrammed

On viewing the current XML:
```xml
```
We can see that it has created a participant in the collaboration element, but it has not created a new process and linked to it. I'm not sure how we can achieve that through the CLI as well.
Contributor guide
Research direction
Start at the CLI create('bpmn:Participant', '0,300', 'Collaboration') entry point and compare it with the initial XML and cli.elements() output. Reproduce the command, then trace participant creation to determine how a new process and processRef should be represented. Done means the second participant is linked to its own process and the resulting collaboration diagram and XML are valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100