Skip to content

WorkflowBuilderIntegration

WorkflowBuilderIntegration = { strategy?: "localStorage"; } | { endpoints: { load: string; save: string; }; strategy: "api"; } | { onDataSave: OnSaveExternal; strategy: "props"; }

Persistence strategy for a <WorkflowBuilder.Root> instance. Exactly one variant applies. integration is itself optional — omitting it picks the localStorage default.

{ strategy?: "localStorage"; }

Default — save to browser localStorage under 'workflowBuilderDiagram'. Selected when integration is omitted entirely or set to {}.


{ endpoints: { load: string; save: string; }; strategy: "api"; }

REST persistence — SDK issues GET endpoints.load and POST endpoints.save on every save event.


{ onDataSave: OnSaveExternal; strategy: "props"; }

Host-managed — SDK invokes onDataSave with the diagram payload on every save event; the host owns where it lands.