tinyactors transitions
List each chart's transitions with events, conditions and targets.
Usage
tinyactors transitions [options] INPUT...Lists each chart's transitions: kind, source, events, condition, targets, type and whether each has actions. Reads one image (.tai), one snapshot, one system manifest or SCXML charts, compiled together into one image first. --segment picks a snapshot's image, and - reads standard input.
Options
-W, --warnings-as-errorsRefuse a chart that compiles with a warning.-I, --include DIRSearchDIRfor a src that is not beside the file naming it, in the order given. Repeatable.-c, --chart NAMELook at the chart namedNAMEonly. Repeatable.-s, --segment NRead the image that segment N of a snapshot runs. Default: the newest live segment.
Configure output formats like -f json using the shared options on the command reference.
Examples
tinyactors transitions order.scxml# Transitions
## Charts
### Chart 1: order
- **Name**: order
#### Transitions
| Index | Kind | Source | Events | Condition | Targets | Type | Actions |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | transition | open | item.added | _event.data.price > 0 | | external | yes |
| 1 | transition | open | checkout | total > 0 | paying | external | no |
| 2 | transition | open | cancel | | cancelled | external | no |
| 3 | transition | paying | charge.ok | | paid | external | yes |
| 4 | transition | paying | charge.declined error.communication payment.timeout | `attempts < 3` | paying | external | no |
| 5 | transition | paying | charge.declined error.communication payment.timeout | | cancelled | external | no |
| 6 | transition | paid | shipped | | shipped | external | no |
| 7 | initial | /scxml | | | open | external | no |List the transitions of a chart.
tinyactors transitions -f json order.tai{
"charts": [
{
"name": "order",
"transitions": [
{
"index": 0,
"kind": "transition",
"source": "open",
"events": "item.added",
"condition": "_event.data.price > 0",
"targets": "",
"type": "external",
"actions": true
},
{
"index": 1,
"kind": "transition",
"source": "open",
"events": "checkout",
"condition": "total > 0",
"targets": "paying",
"type": "external",
"actions": false
},
{
"index": 2,
"kind": "transition",
"source": "open",
"events": "cancel",
"condition": "",
"targets": "cancelled",
"type": "external",
"actions": false
},
{
"index": 3,
"kind": "transition",
"source": "paying",
"events": "charge.ok",
"condition": "",
"targets": "paid",
"type": "external",
"actions": true
},
{
"index": 4,
"kind": "transition",
"source": "paying",
"events": "charge.declined error.communication payment.timeout",
"condition": "attempts < 3",
"targets": "paying",
"type": "external",
"actions": false
},
{
"index": 5,
"kind": "transition",
"source": "paying",
"events": "charge.declined error.communication payment.timeout",
"condition": "",
"targets": "cancelled",
"type": "external",
"actions": false
},
{
"index": 6,
"kind": "transition",
"source": "paid",
"events": "shipped",
"condition": "",
"targets": "shipped",
"type": "external",
"actions": false
},
{
"index": 7,
"kind": "initial",
"source": "/scxml",
"events": "",
"condition": "",
"targets": "open",
"type": "external",
"actions": false
}
]
},
{
"name": "payment",
"transitions": [
{
"index": 0,
"kind": "transition",
"source": "pending",
"events": "authorize",
"condition": "",
"targets": "authorized",
"type": "external",
"actions": false
},
{
"index": 1,
"kind": "transition",
"source": "pending",
"events": "decline",
"condition": "",
"targets": "declined",
"type": "external",
"actions": false
},
{
"index": 2,
"kind": "transition",
"source": "authorized",
"events": "capture",
"condition": "",
"targets": "settled",
"type": "external",
"actions": false
},
{
"index": 3,
"kind": "transition",
"source": "authorized",
"events": "void",
"condition": "",
"targets": "declined",
"type": "external",
"actions": false
},
{
"index": 4,
"kind": "initial",
"source": "/scxml",
"events": "",
"condition": "",
"targets": "pending",
"type": "external",
"actions": false
}
]
}
]
}List the transitions of an image as JSON.
Exit status
1An input is refused: it does not compile or verify, or it is damaged or of an unknown format.3A file cannot be read or written, or memory runs out.
Related pages
tinyactors statesList each chart's states as a tree in document order.tinyactors eventsList every event name and the transitions, raises and sends using it.tinyactors dataList each chart's data declarations.tinyactors expressionsList each chart's expressions and scripts with where they are.tinyactors pathFind the shortest path to a state: events, conditions and transitions.tinyactors graphDraw each chart, or list its boxes and edges.tinyactors disassembleList each chart's executable content instruction by instruction.tinyactors inspectShow what an image, a snapshot or a blob holds.