Add Edge label when using Fluent Builder?

Is there a way to label a edge when using the Fluent Builder? If not, any thoughts / suggestions about how to achieve this?

Thanks

Brian

Which specific labels are you trying to add? Usually you only need a label on a sequence flow when its a outbound sequence flow from a gateway:

BpmnModelInstance modelInstance = Bpmn.createProcess()
  .startEvent()
  .userTask()
  .exclusiveGateway()
  .name("What to do next?")
    .condition("Call an agent", "#{action = 'call'}")
    .scriptTask()
    .endEvent()
  .moveToLastGateway()
    .condition("Create a task", "#{action = 'task'}")
    .serviceTask()
    .endEvent()
  .done();

If you needed to really inject the flows, you could write a post-parser, that would cycle over the build model (from the fluent api), and then find the task_id and get their sequence flows, and modify the Name property.

See this example of adding extension properties after the model was already created becase of the IDs of the tasks.

would be the same idea but with sequence flows

I think the second example is what I am looking for here. I tried to pull all the Edges from the model and attach names, but this looks like a better approach.