<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.foji.io/index.php?action=history&amp;feed=atom&amp;title=Switch_Node</id>
	<title>Switch Node - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.foji.io/index.php?action=history&amp;feed=atom&amp;title=Switch_Node"/>
	<link rel="alternate" type="text/html" href="https://docs.foji.io/index.php?title=Switch_Node&amp;action=history"/>
	<updated>2026-06-22T03:28:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://docs.foji.io/index.php?title=Switch_Node&amp;diff=2859&amp;oldid=prev</id>
		<title>Mitchell.Hirsche: Mitchell.Hirsche moved page Documentation: Switch Node to Switch Node</title>
		<link rel="alternate" type="text/html" href="https://docs.foji.io/index.php?title=Switch_Node&amp;diff=2859&amp;oldid=prev"/>
		<updated>2025-03-05T23:10:47Z</updated>

		<summary type="html">&lt;p&gt;Mitchell.Hirsche moved page &lt;a href=&quot;/wiki/Documentation:_Switch_Node&quot; class=&quot;mw-redirect&quot; title=&quot;Documentation: Switch Node&quot;&gt;Documentation: Switch Node&lt;/a&gt; to &lt;a href=&quot;/wiki/Switch_Node&quot; title=&quot;Switch Node&quot;&gt;Switch Node&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:10, 5 March 2025&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wiki:diff::1.12:old-2671:rev-2859 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mitchell.Hirsche</name></author>
	</entry>
	<entry>
		<id>https://docs.foji.io/index.php?title=Switch_Node&amp;diff=2671&amp;oldid=prev</id>
		<title>Mitchell.Hirsche: Switch Node</title>
		<link rel="alternate" type="text/html" href="https://docs.foji.io/index.php?title=Switch_Node&amp;diff=2671&amp;oldid=prev"/>
		<updated>2025-03-05T00:18:16Z</updated>

		<summary type="html">&lt;p&gt;Switch Node&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;Switch&amp;#039;&amp;#039;&amp;#039; node in Pathways is used to evaluate an expression and execute one of multiple defined branches based on the result. Each branch represents a possible case for the evaluated expression.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;Node Name&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;: Assign a unique and descriptive name to the Switch node for identification purposes.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Expression&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* Type an expression that the node will evaluate.&lt;br /&gt;
#* &amp;#039;&amp;#039;&amp;#039;Expression Type&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
#** &amp;#039;&amp;#039;&amp;#039;Script&amp;#039;&amp;#039;&amp;#039;: Use JavaScript or similar scripting logic for complex computations.&lt;br /&gt;
#** &amp;#039;&amp;#039;&amp;#039;Handlebars Template&amp;#039;&amp;#039;&amp;#039;: Use Handlebars syntax for templating expressions, often useful for simple conditional logic.&lt;br /&gt;
#* This field is required.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Cases&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* Add cases that represent the possible outcomes of the expression evaluation.&lt;br /&gt;
#* Each &amp;#039;&amp;#039;&amp;#039;Case&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
#** Must be named (e.g., &amp;quot;Case 1,&amp;quot; &amp;quot;Case 2&amp;quot;).&lt;br /&gt;
#** Should define the condition to match the result of the expression.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Default Case&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* If none of the defined cases match, the default branch will execute. You must specify this as the fallback logic.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;Behavior&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* The &amp;#039;&amp;#039;&amp;#039;Switch&amp;#039;&amp;#039;&amp;#039; node evaluates the given expression and matches it against the conditions specified in the cases.&lt;br /&gt;
* Only the branch corresponding to the matching case is executed. If no cases match, the default case is executed.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;Example Use Case&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
If you need to route tasks based on user roles or system states, the &amp;#039;&amp;#039;&amp;#039;Switch&amp;#039;&amp;#039;&amp;#039; node can be configured to execute different workflows for &amp;quot;Admin,&amp;quot; &amp;quot;User,&amp;quot; and &amp;quot;Guest.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;Steps to Configure&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
# Name the Switch node for easy identification.&lt;br /&gt;
# Define the &amp;#039;&amp;#039;&amp;#039;Expression&amp;#039;&amp;#039;&amp;#039; using either Script or Handlebars Template based on the complexity of your logic.&lt;br /&gt;
# Add branches under &amp;#039;&amp;#039;&amp;#039;Cases&amp;#039;&amp;#039;&amp;#039;, specifying their names and respective conditions.&lt;br /&gt;
# Add a default case to handle unmatched scenarios.&lt;br /&gt;
&lt;br /&gt;
This setup ensures dynamic task execution based on evaluated results, providing flexibility in your workflows.&lt;br /&gt;
[[Category:ForgeAI]]&lt;br /&gt;
[[Category:Pathways]]&lt;/div&gt;</summary>
		<author><name>Mitchell.Hirsche</name></author>
	</entry>
</feed>