javascriptbpmnbpmn-jsbpmn-moddle

Set label and id on BPMN lane programmatically


How can I change the label/name and id of a lane in bpmn-js or bpmn-moddle.


Solution

  • Set it just on the business object of the lane.

    import { getBusinessObject } from 'bpmn-js/lib/util/ModelUtil';
    
    const bo = getBusinessObject(laneElement);
    bo.id = 'someId';
    bo.name = 'Some Name';