Diagram - BPMN Graph Reuse

Copy or save semantic graph fragments with dependencies, explicit rejection and one shared history operation.

#Usage

Select a self-contained BPMN graph before Copy/Paste. Both stores need the BPMN module and the destination must allow its dependencies.

Reuse a complete semantic fragment rather than rebinding foreign IDs to unrelated destination records. The normal clipboard/palette pipeline captures the graph and asks the installed BPMN module to prepare and remap its required page metadata.

Use the BPMN setup with the module installed in the store. Keep the matching semantic root and copied inspector under Diagram.Root. The examples below include their complete model and controls.

#Copy a graph with its dependencies

Loading Demo...

Choose Select source graph, Copy, then Paste into destination. Insertion waits for Approve insertion or Reject insertion. Compare the destination summary: its nodes, associations, type, definition and category membership commit together. One destination Undo removes that insertion. Reject leaves it unchanged. The transport is application-owned memory, with no browser clipboard permission.

Use Cut or duplicate source for those distinct operations. Copy does not mutate the source. Cut waits for successful transport write before deleting and cleaning category membership in one source transaction. Failed transport, cancellation, stale state or disposal before completion cannot remove it. Source Undo restores cut geometry and metadata. Duplicate makes an independent graph in the same model. Destination Read only blocks insertion and current-policy history edits.

#Save the graph to a palette

Loading Demo...

Select the source graph and Save selection to palette. The demo captures, serializes and parses the item rather than retaining a live editor object. Choose Review graph in the destination palette by click, Enter/Space or drag placement, then approve it. It uses the same graph/metadata transaction and destination history.

captureDiagramPaletteItem(store, session, registry, options) captures the selected records and supporting symbols. serializeDiagramPalette/parseDiagramPalette round-trip inert saved content. DiagramPaletteCollection.replace installs it; the destination target supplies page/layer/parent geometry. Native whole-model JSON remains the path for saving the entire model.

#Dependency capture and remapping reference

Source relationshipWhat reuse retains
Bound data referencesRequired object/store definitions and their referenced item definitions; shared references get one shared fresh definition.
Captured participant/subprocessObject definitions owned by that scope even before a visual reference exists; duplicate dependencies are copied once.
Captured owner-local IO/process IOReferenced item definitions; local IO names stay local and associations remap their owner/endpoints.
Captured frame or categorized memberRequired categories/values with only captured memberships. Several frames can share one new value; frame-only copy has empty membership.
Symbols, state, collection, capacitySafe saved presentation/model data retained alongside graph and metadata identities.

Unrelated definitions and category members are not required in a partial fragment. Required missing dependencies reject. Metadata IDs have their own allocation map; they do not adopt matching foreign canvas or destination IDs. A copied member without a frame still receives fresh categorization. Original memberships never point to copies. Explicit duplicateDataReference/duplicateGroup instead share existing same-page metadata by design.

Copied local object definitions follow their copied scope. If the defining scope is absent, a root definition maps to the destination process and a local definition to the chosen destination scope. Shared references must have one compatible ownership mapping. Groups remain page-root artifacts; structural-parent placement rejects. Cut preserves still-owned/shared definitions and removes declarations whose process/ subprocess owner is cut, plus cut IDs from category values.

#Cross-process and reference boundaries

Whole participants paste into a collaboration page. Process content needs an existing compatible pool/lane destination. A normal sequence or association cannot be split across different process/scope destinations. Data references cannot silently escape their visibility rules. Validation checks catalog limits and the complete copied graph before committing.

A resolved Call Activity preserves its called page only within the same model. Cross-model reuse requires clearing its target first and choosing the new target explicitly afterward; no process pages or external declarations are fetched. A resolved Link throw requires its catch in the fragment; copied catches/throws get a shared fresh name. Compensation throws require referenced activities, and boundaries require attached hosts. Copying only a connector requires its captured endpoints. The Link example demonstrates observable rejection for an incomplete required pair.

#Transaction, status and policy reference

session.clipboard.run('copy' | 'cut' | 'paste', transport, target?) uses the asynchronous clipboard transport. duplicate(selectedIds) copies locally. Palette placement and paste can require connection approval, followed by host acceptance in controlled mode. Resolve the current request with connections.resolve(request.id, accepted); do not reuse a stale request ID. See Controlled State for the two approval steps.

Paste adds the graph and updates page catalogs in one transaction and one Undo step. Permissions, layer/parent locks, vetoes and required approvals still apply, including to Undo/Redo. Show pending status until the edit commits, and show diagnostics when it is rejected. Rejection leaves nodes, connectors, catalogs and revision unchanged.

Without the installed module, payloads remain opaque/unresolved for recovery and must not reactivate references implicitly. See notation setup and clipboard ownership for the generic contracts.