Extensible Metadata for Diagrams, Nodes, and Connectors

Hello. I am new to the BPMN-JS community and would like to make a feature request.

I am interested in enabling end-users to be able to create and edit extensible metadata for diagrams, nodes, and connectors, using, for example, JSON-LD.

With respect to UX topics for adding extensible metadata to diagrams, there could be a menu option for users to view and edit a text resource associated with the diagram.

As considered, end-users creating or editing structured-knowledge annotations for diagrams would need URIs for those diagrams. In theory, a special URI could be utilized for these purposes, e.g., this:diagram, and the JSON-LD resource could be later transformed, as needed.

{
  "@context": "https://www.example.org/schema.json",
  "@id": "this:diagram",
  "authoredBy": "Bob Smith",
  "dateCreated": "2024-12-14"
}

With respect to UX topics for adding extensible metadata to nodes and connectors, this could resemble adding a text annotation to them but utilizing JSON-LD instead of natural-language text.

As considered, a node or connector would need a unique ID or URI to be provided to the end-user. In theory, special URIs could be used, e.g., this:node and this:connector, and JSON-LD resources could be later transformed, as needed.

{
  "@context": "https://www.example.org/schema.json",
  "@id": "this:node",
  "estimatedDuration": "30m"
}

For scenarios where all end-users aren’t desired to enter JSON-LD, other possibilities include that developers or other advanced users could simply specify a schema or ontology (e.g., by URL) for a diagram, node, or connector type such that end-users would be able to make use of an extensible “property grid” widget, automatically populated using that schema or ontology, to visually interact with a set of properties and values for the diagram, node, or connector.

I am interested in enabling extensible metadata and how this could be stored into and loaded from BPMN 2.0 files as well as Semantic Web formats, e.g., utilizing the BPMN-Based Ontology (BBO).

While, visually, editable metadata could surface as JSON-LD annotations, metadata might be stored differently in BPMN 2.0 files.

Thank you.

@AdamSobieski As I understand you want to marry JSON-LD and BPMN diagrams?

I have limited context in JSON-LD, hence I cannot judge how useful this would be. Your explanation also does not help me much to learn that. What would be the benefits of integrating JSON-LD within the library?

If your concern is of more general nature, i.e. “generally edit additional properties relevant to a BPMN diagram”, then checkout properties panel but also our our commenting example. These show how “editing of structured information” typically works in the context of bpmn-js.

If your concern is “how to store meta-data inside a BPMN diagram”, then you may find this insightful, in particular the section how to store custom data inside a BPMN 2.0 file.

1 Like

@nikku, hello. Thank you for the links to the properties panel and commenting examples and for that link describing custom elements and how to store custom data inside of BPMN 2.0 files.

The ideas, sketched above, could pertain more to general-purpose diagramming than to BPMN 2.0 as intended benefits include ease of extensibility. With respect to BPMN 2.0, however, maybe a user would want to create a new type of annotation component specifically for AI interoperability.

I was thinking about users (rather than only developers) being able to type or to paste something (maybe JSON or JSON-LD) into text-input boxes to add new components to palettes. Brainstorming, users could alternatively enter URLs into text input boxes and systems could download something to add new components to palettes.

@AdamSobieski I’m generally careful to jump on solutions in search for a problem, and you could not convince me about a problem that exists.

Given the pointers that I provided you’ll be able to dig deeper, extend the toolkit, and maybe, some day, show a prototype of a diagram toolkit with embedded, extensible meta-data.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.