Closed corocoto closed 2 months ago
Maybe it will be helpful to represent and visualize this schema. So, it looks like the next one:
1) The main structure:
2) subProcess (Task_01g18mq ) internal structure:
I dropped the unmaintained example via https://github.com/bpmn-io/bpmn-auto-layout/commit/fbb021dcc759c2df089610b335e5bc9766ada54a.
If it was not working (layouting fails) then I'd assume it would be great to reproduce the error in a failing test case. We could take it from there.
I'd assume it would be great to reproduce the error in a failing test case
@nikku, done! https://github.com/bpmn-io/bpmn-auto-layout/pull/44
Thanks. A good start to fix this, some day, maybe.
Hi! I am currently testing the BPMN copilot prototype. I came across this error when the AI model returned an empty subprocess as part of the process XML.
This part of the code is the issue:
createGridLayout(root) {
const grid = new Grid();
const flowElements = root.flowElements;
const startingElements = flowElements.filter(el => {
return !isConnection(el) && !isBoundaryEvent(el) && (!el.incoming || el.length === 0);
});
...
}
When entering the scope of the empty subprocess, no flowElements exist. The issue might be solved by checking for existing flowElements, and simply returning the grid (?) if none exist. But there might be more issues down the line which might require more checks.
It would be great to have this issue fixed soon! Otherwise my tests will fail as soon as the AI model returns an empty subprocess! :/
Describe the Bug
I refactored
example.js
imports. In the end, I run the script to see how thelayoutProcess
function will set di elements for the bpmn structure. But unfortunately, it throws an error:Steps to Reproduce
Expected Behavior
The script will print a new bpmn structure into a console and also will write it into
layouted.bpmn
file.Environment