We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to dynamically add a BPMN Pool to a diagram?

Thread ID:





147578 Sep 17,2019 07:53 AM UTC Sep 19,2019 12:29 PM UTC Angular - EJ 2 3
Tags: Diagram
Charlie BengerStevenson
Asked On September 17, 2019 07:53 AM UTC

How would I add a pool, with say 3 lanes, dynamically to the diagram?

I am trying the following code to add the pool, so in theory I can call the addLanes method on the diagram object, but I am getting errors in the console

      shape: { type: 'SwimLane',
      header: {
        annotation: { content: 'Pool', },
        height: 70style: { fontSize: 11 , fill: 'pink' },
        orientation: 'Horizontal',
      id: "pool",
      offsetX: 200,
      offsetY: 200


Error: <rect> attribute x: Expected length, "NaN".
Error: <rect> attribute width: Expected length, "NaN".
Error: <rect> attribute transform: Trailing garbage, "rotate(0,NaN,200.5)".
ej2-diagrams.es2015.js:16310 Error: <text> attribute transform: Trailing garbage, "rotate(0,NaN,200.5)transl…".

Shyam G [Syncfusion]
Replied On September 18, 2019 05:16 AM UTC

Hi Charlie, 

You didn't set swimlane width and height in your code example, so only the swimlane is not rendered during runtime. We have modified your code example and provided below. 

Code example: 
    //add swimlane 
      shape: { type: 'SwimLane', 
      header: { 
        annotation: { content: 'Pool', }, 
        height: 70, style: { fontSize: 11 , fill: 'pink' }, 
        orientation: 'Horizontal', 
      id: "pool", 
      offsetX: 200, 
      offsetY: 200, width: 300, height: 500 

Please refer to below help documentation to know more about swimlane. 

Shyam G 

Swetha Srikumar [Syncfusion]
Replied On September 18, 2019 08:53 AM UTC

Can I request a feature in which case to give a friendly error message rather than the error I received which was not as informative as your good selves?  
It may also prevent further such support tickets from us Rookies :)  

Shyam G [Syncfusion]
Replied On September 19, 2019 12:29 PM UTC

Hi Charlie, 
Reported Issue : Exception raised while not setting its size in swimlane rendering 
We have confirmed this as a defect. We have logged a defect report for this issue. We will fix this issue and include it in our volume 3, 2019 release which is scheduled to release by end of September, 2019. 
Now, you can track the status of your request through below feedback link. 
Shyam G 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon