-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
None
-
False
-
---
-
---
-
2022 Week 17-19 (from Apr 25), 2023 Week 12-14 (from Mar 20), 2023 Week 15-17 (from Apr 10), 2023 Week 18-20 (from May 1), 2023 Week 21-23 (from May 22)
Goal
Expose the Stunner's editor API [1] at the tooling's Envelope scope, so making it available for communication across different application shells (relying the the envelope bus)
Details
Consider the following schema for the different layers for the SWF Diagram Editor:
Actions:
- Expose the J2CL Stunner Editor API into typescript => TS Stunner Editor API
- Create the SWF Diagram Editor Envelope API and implementations
- Create an SWF Diagram Editor API in the Combined Editor layer, for the use of third parties
[1] See Stunner editor's J2CL API at KOGITO-7999
[*] See SWF Diagram Editor presentation here.
Supported functions
Only the subset of functions implemented in KOGITO-7999 will be exposed. The supported functions follows:
// Session API editor.session.getAllNodesUUID() : Promise<string[]>; editor.session.getEdgeByUUID(uuid: string) : Promise<Edge>; editor.session.getNodeByUUID(uuid: string) : Promise<Node>; editor.session.getDefinitionByElementUUID(uuid: string) : Promise<Object>; editor.session.getNodeByName(name: string) : Promise<Node>; editor.session.getNodeName(node: Node) : Promise<string>; editor.session.getSelectedElementUUID() : Promise<string>; editor.session.getSelectedNode() : Promise<Node>; editor.session.getSelectedEdge() : Promise<Edge>; editor.session.getSelectedDefinition() : Promise<Object>; editor.session.selectByUUID(uuid: string) : Promise<void>; editor.session.selectByName(name: string) : Promise<void>; editor.session.clearSelection() : Promise<void>; // Canvas API editor.canvas.getShapeIds() : Promise<string[]>; editor.canvas.getBackgroundColor(uuid: string) : Promise<string>; editor.canvas.setBackgroundColor(uuid: string, backgroundColor: string): Promise<void>; editor.canvas.getBorderColor(uuid: string) : Promise<string>; editor.canvas.setBorderColor(uuid: string, backgroundColor: string) : Promise<void>; editor.canvas.getLocation(uuid: string) : Promise<number[]>; editor.canvas.getAbsoluteLocation(uuid: string) : Promise<number[]>; editor.canvas.getDimensions(uuid: string) : Promise<number[]>; editor.canvas.center(uuid: string): Promise<void>; editor.canvas.draw() : Promise<void>;
Acceptance criteria
The API is exposed to SWF Combined Editor.
See supported functions above.
- causes
-
KOGITO-9201 SWF - getSelectedDefinition API function doesn't translate all fields
- Open
- is triggered by
-
KOGITO-7999 Stunner - Editor API Canvas/Session/Domain Definitions exposed in JS
- Resolved
- relates to
-
KOGITO-9127 SWF - Create Blogpost on how to access Stunner API through the Envelope API
- Open