Skip to content

Commit 0895559

Browse files
committed
Closes #95
1 parent 2488955 commit 0895559

23 files changed

+670
-385
lines changed

Doc/LinuxInstallation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sudo apt -y install wine
1616
sudo apt install ttf-mscorefonts-installer
1717
```
1818
- Acknowledge the terms of the EULA in your terminal when prompted.
19-
3. [Download ScxmlEditor](https://www.dropbox.com/sh/fjzm9ejdrtra1c0/AAB_ASgIPRFLX57x7rWPEv3Ta?dl=0) and unpack it in any target location
19+
3. Download from latest Release page and unpack it in any target location
2020
4. Run program
2121
```batch
2222
cd /path/to/ScxmlEditor

Doc/VisualStateChartSplitting.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,70 @@ After run all entered states will be highlighted
6262
You may double click on virtual shape to switch to the its source unit
6363
![debug2](../Images/VisualSplitting_Debug2.png)
6464

65+
## Virtual Invoke
66+
Since ScxmlEditor 2.5 there is an option to include state chart parts multiple times
67+
68+
**Inspired by discussion how could we avoid [invoke](https://alexzhornyak.github.io/SCXML-tutorial/Doc/invoke.html) element in systems that do not support it:**
69+
70+
![](https://user-images.githubusercontent.com/18611095/245057732-cf87a403-c5a3-4771-9aa6-90dad7e6a606.png)
71+
72+
**Let's take a look at the next example:**
73+
74+
![](https://github.com/alexzhornyak/SCXML-tutorial/raw/master/Images/simple_tasks_example.gif)
75+
76+
The principle is based on the fact that we find repeated prefixes in the state identifiers or other scxml attributes such as data identifiers or values. According to scxml standard we can not use states with the same names in one scxml chart, so we will use Alias which is filled with value assigned in parent Virtual State.
77+
78+
1. Convert **`State_1`** to Virtual State
79+
80+
![](../Images/Virtual_ConvertTo.png)
81+
82+
2. Replace state identifiers with Alias variable **`%1`**
83+
84+
![](../Images/Virtual_Replace.png)
85+
86+
3. Set Virtual State Alias
87+
88+
![](../Images/Virtual_Alias.png)
89+
90+
4. Set Aliases to other virtual states
91+
92+
![](../Images/Virtual_AliasOthers.png)
93+
94+
### Result
95+
ScxmlEditor will perform substition of Alias variable **`%1`** to Alias value which is set in Virtual State. So in target scxml file you will get different state identifiers
96+
97+
```xml
98+
<state id="State_1" initial="Off_1">
99+
...
100+
<state id="State_2" initial="Off_2">
101+
...
102+
<state id="State_3" initial="Off_3">
103+
...
104+
<state id="State_4" initial="Off_4">
105+
<onexit>
106+
<cancel sendid="ID.Do.Timer"/>
107+
</onexit>
108+
<state id="Off_4">
109+
<onentry>
110+
<send delay="1s" event="Do.Timer" id="ID.Do.Timer"/>
111+
<log expr="&quot;OFF &quot; .. 4" label="INFO"/>
112+
</onentry>
113+
<transition event="Do.Timer" target="On_4" type="external"/>
114+
</state>
115+
<state id="On_4">
116+
<onentry>
117+
<send delay="1s" event="Do.Timer" id="ID.Do.Timer"/>
118+
<log expr="&quot;ON &quot; .. 4" label="INFO"/>
119+
</onentry>
120+
<transition event="Do.Timer" target="Off_4" type="external"/>
121+
</state>
122+
<transition event="Go.Next" target="State_3" type="external"/>
123+
</state>
124+
```
125+
126+
| ![](../Images/Virtual_Invoke.gif) |
127+
|---|
128+
| |
129+
65130
| [TOP](#top-anchor) | [Contents](../README.md#table-of-contents) | [SCXML Wiki](https://alexzhornyak.github.io/SCXML-tutorial/) | [Forum](https://github.com/alexzhornyak/ScxmlEditor-Tutorial/discussions) |
66131
|---|---|---|---|

Images/Virtual_Alias.png

46.7 KB
Loading

Images/Virtual_AliasOthers.png

74.6 KB
Loading

Images/Virtual_ConvertTo.png

17.6 KB
Loading

Images/Virtual_Invoke.gif

113 KB
Loading

Images/Virtual_Replace.png

20.6 KB
Loading

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
**[Video overview - v.2.2](https://youtu.be/30dyXAs-m1A)**
1515

16-
# Scxml Editor 2.4
16+
# Scxml Editor 2.5
1717
Powerful tool for creating, editing and debugging SCXML charts.
1818

1919
![MainExample](Images/Inheritance_TV_example.gif)
@@ -24,6 +24,7 @@ Powerful tool for creating, editing and debugging SCXML charts.
2424
[![Discord](Images/Discord.svg)](https://discord.gg/5XWDsbEXzn)
2525

2626
### Changelog
27+
**2.5:** [Virtual Invoke](Doc/VisualStateChartSplitting.md#virtual-invoke) <br>
2728
**2.4:** [Post Save Commands](Doc/ProjectTree.md#post-save-unit-actions), [Self-Transitions Inside](Doc/Transitions.md#self-transitions-inside-states) <br>
2829
**2.3:** Highlight Transitions <br>
2930
**2.2.4:** [Import QtCreator state charts](Doc/ImportStateCharts.md) <br>
@@ -48,7 +49,7 @@ Powerful tool for creating, editing and debugging SCXML charts.
4849
## Installation
4950
You can find portable version as attached Zip in ScxmlEditor Github Release page
5051

51-
Latest version: **[2.4.0.1734]**
52+
Latest version: **[2.5.0.1743]**
5253

5354
### Windows Installation
5455
#### First Install
@@ -130,6 +131,7 @@ Current binaries are compiled with single development licensies registered by th
130131
- Projects
131132
- [Building a Project](Doc/ProjectBuild.md)
132133
- [Visual State Chart Splitting](Doc/VisualStateChartSplitting.md)
134+
- [Virtual Invoke](Doc/VisualStateChartSplitting.md#virtual-invoke)
133135
- [Conditional Project Definitions](Doc/ConditionalDefines.md)
134136
- State chart
135137
- Interface

0 commit comments

Comments
 (0)