<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.9.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:scr="clr-namespace:Bonsai.Scripting.Expressions;assembly=Bonsai.Scripting.Expressions"
xmlns:gui="clr-namespace:Bonsai.Gui;assembly=Bonsai.Gui"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Timer">
<rx:DueTime>PT0S</rx:DueTime>
</Combinator>
</Expression>
<Expression xsi:type="scr:ExpressionTransform">
<scr:Expression>new(
false as Checked,
true as Enabled)</scr:Expression>
</Expression>
<Expression xsi:type="PropertyMapping">
<PropertyMappings>
<Property Name="Checked" Selector="Checked" />
</PropertyMappings>
</Expression>
<Expression xsi:type="gui:ToggleButtonBuilder">
<gui:Name>LoggingToggleButton</gui:Name>
<gui:Enabled>true</gui:Enabled>
<gui:Visible>true</gui:Visible>
<gui:Text>Logging</gui:Text>
<gui:Checked>true</gui:Checked>
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
The following workflow goes into an infinite loop when the button is checked and the workflow is restarted:
Workflow