syntax = "proto3"; package statechart; message Document { string name = 1; repeated State states = 2; repeated Transition transitions = 3; string datamodel = 4; map meta = 5; } message State { enum Type { compound = 0; atomic = 1; parallel = 2; history_shallow = 3; history_deep = 4; initial = 5; final = 6; } Type type = 1; uint32 idx = 2; string id = 3; repeated Expression on_enter = 4; repeated Expression on_exit = 5; repeated Invocation invocations = 6; repeated Data data = 7; uint32 parent = 8; bytes children = 9; bytes ancestors = 10; bytes completion = 11; bytes transitions = 12; bool has_history = 13; } message Transition { enum Type { external = 0; targetless = 1; internal = 3; spontaneous = 4; history = 5; initial = 6; } Type type = 1; uint32 idx = 2; uint32 source = 3; repeated string events = 4; Expression condition = 5; repeated Expression on_transition = 6; bytes targets = 7; bytes conflicts = 8; bytes exits = 9; } message Expression { enum Type { raise = 0; cond = 1; clause = 2; foreach = 3; log = 4; assign = 5; param = 6; script = 7; send = 8; cancel = 9; expr = 10; literal = 11; location = 12; script_ext = 13; } Type type = 1; string value = 2; map props = 3; repeated Expression children = 4; } message Invocation { Expression type = 1; Expression src = 2; Expression id = 3; repeated Expression params = 4; Expression content = 5; repeated Expression on_exit = 6; bool autoforward = 7; } message Data { string id = 1; Expression value = 2; string src = 3; }