Exporting State Machines
Export to JSON
Exports the full State Machine model graph—including elements, Submachines, and Behaviors. Ideal for custom execution runtimes or automated verification tools. The JSON is structured to the official Logiop Schema.
View or Download:
Sample JSON Structure
The following curated snippet demonstrates how global Behaviors, States, Transitions, Submachines, and Connection Points are defined and cross-referenced:
{
"$schema": "https://logiop.com/docs/schema/logiop-v1.schema.json",
"Id": "8257666c-6e95-40d6-982f-6f86119d471f",
"Name": "Order Lifecycle",
"SchemaVersion": "1.0.0",
"BehaviorRegistry": [
{
"BehaviorType": "Action",
"Id": "3411bd7b-5163-4d9b-acae-804005732024",
"Name": "mor_intent"
},
{
"BehaviorType": "Action",
"Id": "881f7a4d-8c9f-4783-a63b-a3fbd5a28aa9",
"Name": "log_auth"
}
],
"Vertices": [
{
"Type": "State",
"Id": "d1090ee6-1dcc-42aa-9003-f836570e41c9",
"Name": "Authorizing",
"EntryActions": [
{
"ExecutionOrder": 0,
"BehaviorId": "3411bd7b-5163-4d9b-acae-804005732024",
"Id": "29d99d36-4f8a-4ee3-97e1-0b99b09e8d3d"
}
],
"OutgoingTransitions": [
{
"Id": "0da47be8-cd39-4373-aa5f-fef6f19f6444",
"Name": "T9",
"TargetId": "77ce0e99-7fee-4ff6-9032-8cfda640c44a",
"Effect": [
{
"ExecutionOrder": 0,
"BehaviorId": "881f7a4d-8c9f-4783-a63b-a3fbd5a28aa9",
"Id": "cca69503-5e92-41ea-9c5a-eb38abe6805c"
}
]
}
]
},
{
"Type": "State",
"Id": "77ce0e99-7fee-4ff6-9032-8cfda640c44a",
"Name": "Settled"
},
{
"Type": "SubmachineState",
"Id": "72d8db1a-58e0-4c5b-8eb7-e722f26a49c0",
"Name": "R1",
"SubmachineId": "2ebcbc21-14ae-4dc7-ab86-85b8008693f0",
"ConnectionPoints": [
{
"Type": "EntryPoint",
"Id": "f1e351f8-2d0c-4102-ad47-dfeba52da64f",
"Name": "En1",
"ReferencedConnectionPoint": {
"Id": "596ad8c4-2246-41d9-9d94-4fe1acd8f3ac",
"SubmachineId": "2ebcbc21-14ae-4dc7-ab86-85b8008693f0"
}
}
]
}
],
"Submachines": [
{
"Id": "2ebcbc21-14ae-4dc7-ab86-85b8008693f0",
"Name": "Reserving",
"Vertices": [
{
"Type": "SubmachineMainState",
"Id": "86a27c17-6395-40dc-9ec7-efb7f15d9d0b",
"Name": "Reserving",
"ConnectionPoints": [
{
"Type": "EntryPoint",
"Id": "596ad8c4-2246-41d9-9d94-4fe1acd8f3ac",
"Name": "En1"
}
]
}
]
}
]
}
Relational Model & Referencing
The Logiop JSON schema uses GUID-based relational cross-referencing to maintain graph normalization and prevent duplicate data structures:
-
Behavior Binding via BehaviorId:
Execution attachments do not embed Behavior logic directly. In the sample above, State Authorizing references Action mor_intent in its EntryActions collection by matching its BehaviorId (3411bd7b...) to the Behavior's unique Id in the BehaviorRegistry. Similarly, Transition T9 references log_auth (881f7a4d...) in its Effect array. -
Transition Routing via TargetId:
An Outgoing Transition identifies its destination Vertex using TargetId. Transition T9 sets its TargetId to 77ce0e99..., targeting the Settled State Vertex. -
Submachine & Connection Binding via SubmachineId:
The Submachine State Vertex R1 links to its reusable State Machine definition by setting SubmachineId to 2ebcbc21..., matching the Reserving machine in the Submachines array. Its Connection Point En1 uses ReferencedConnectionPoint to map to the internal Entry Point (596ad8c4...) defined inside the Submachine.
Operations
-
Exporting:
Click theExportbutton on the left side of the Main Toolbar at the top. Then selectJSONfrom the dropdown menu.
Export to SVG
Exports a Scalable Vector Graphic (SVG) image of the active Canvas diagram preserved with exact visual styling.
Operations
-
Exporting:
Click theExportbutton on the left side of the Main Toolbar at the top. Then selectSVGfrom the dropdown menu.
Note:
Currently, there are no configuration options for the SVG export. However, you can edit the SVG in a vector graphics or text editor to make minor style changes. For example, to remove the background fill, locate and delete the initial background rectangle element:<rect x="0" y="0" width="1164" height="700" fill="rgb(255, 255, 255)"/>