<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Syntax</title><link>https://sourceforge.net/p/weeworkflow/wiki/Syntax/</link><description>Recent changes to Syntax</description><atom:link href="https://sourceforge.net/p/weeworkflow/wiki/Syntax/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 28 Jun 2012 17:52:44 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/weeworkflow/wiki/Syntax/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Syntax modified by Bruce Kissinger</title><link>https://sourceforge.net/p/weeworkflow/wiki/Syntax/</link><description>&lt;pre&gt;--- v2
+++ v3
@@ -22,135 +22,3 @@
 This defines a context variable named &lt;i&gt;persons&lt;/i&gt; which is assigned an initial value of 0.
 Next, the controlflow includes a step that manipulates the context variable and sets the value of &lt;i&gt;persons&lt;/i&gt; to 2.
 
-***
-
-Loop Example
----
-
-In this example, a variable named &lt;i&gt;counter&lt;/i&gt; is defined and assigned the initial value of 1. An endpoint is also defined that displays the current date/time.  The control flow consists of three activities.
-
-&lt;ol&gt;
-&lt;li&gt;An &lt;i&gt;activity&lt;/i&gt; statement calls an endpoint that displays the current time.&lt;/li&gt;
-&lt;li&gt;A &lt;i&gt;cycle&lt;/i&gt; statement defines the begining of a loop which will execute while the counter value is less than 10000.&lt;/li&gt;
-&lt;li&gt;An &lt;i&gt;activity&lt;/i&gt; statement increments the value of the counter variable&lt;/li&gt;
-&lt;li&gt;When the cycle completes, the timer endpoint is called again&lt;/li&gt;
-&lt;/ol&gt;
-
-    %
-    % Test performance of large loops
-    %
-    endpoint :simpletimer =&gt; erl://simpletimer:display
-    context :counter =&gt; 1
-
-    controlflow do
-    
-    	% call the timer endpoint to display the current time
-    	activity :starttime, :call, simpletimer
-    	end
-    
-    	% main loop
-    	cycle (@counter &lt; 10000) do
-    		activity :increment, :manipulate do
-    			@counter += 1
-    		end
-    	end
-    
-    	% call the timer endpoint to display the current time
-    	activity :endtime, :call, simpletimer
-    	end
-    end
-
-
-***
-
-Parallel Activities
----
-In this example, three HTTP endpoints are defined. A parallel activity is specified and the ":wait" clause tells the engine to wait until all parallel branches have completed.
-
-
-    endpoint :endpoint1 =&gt; http://localhost/endpoint1
-    endpoint :endpoint2 =&gt; http://localhost/endpoint2
-    endpoint :endpoint3 =&gt; http://localhost/endpoint3
-    
-    controlflow do
-    	
-    	parallel :wait do
-    	
-    		% operates in a seperate thread -- this should complete first
-    		parallel branch do
-    			activity :branch1a1, :call, endpoint1
-    			end
-    			
-    			activity :branch1a2, :call, endpoint2
-    			end
-    		end
-    		
-    		% operates in a seperate thread - this should complete last because 
-    		% endpoint3 takes a long time to execute
-    		parallel branch do
-    			activity :branch2a1, :call, endpoint3
-    			end
-    		end
-    
-    	end
-    	
-    	% this should not be run until both parallel branches have completed
-    	activity :trace, :manipulate do
-    		show runtime_context
-    	end
-    
-    end
-
-Note that the statement &lt;i&gt;show runtime_context&lt;/i&gt; causes the values of any context variables to be displayed.
-
-***
-
-Web Service Example
----
-
-In this example, a Google currency conversion service is called. The control flow consists of three activities.
-
-&lt;ul&gt;
-&lt;li&gt;First, the query for the URL is constructed by several manipulate activities.&lt;/li&gt;
-&lt;li&gt;Next, the web service is invoked and the query is passed as parameter. The query results are copied to a variable named "returnValue".&lt;/li&gt;
-&lt;li&gt;Finally, some processing of the returned values would be performed.&lt;/li&gt;
-&lt;/ul&gt;
-
-    % 
-    % Demonstrate currency conversion using a Google service
-    %
-
-    endpoint :currencyConversion =&gt; http://www.google.com/ig/calculator
-    
-    context :amount =&gt; '100'
-    context :fromCurrencyCode =&gt; 'USD'
-    context :toCurrencyCode =&gt; 'INR'
-    context :urlQuery =&gt; nil
-    context :returnValue =&gt; nil
-    
-    controlflow do
-    	%
-    	% build the URL query string which should look like
-    	%   hl=en&amp;q=100USD=?INR
-    	%
-    	activity :build1, :manipulate do
-    		@urlQuery = 'hl_en&amp;q=' + @amount
-    	end
-    	activity :build2, :manipulate do
-    		@urlQuery = @urlQuery + @fromCurrencyCode
-    	end
-    	activity :build3, :manipulate do
-    		@urlQuery = @urlQuery + '=?'
-    	end
-    	activity :build3, :manipulate do
-    		@urlQuery = @urlQuery + @toCurrencyCode
-    	end
-    	
-    	% call the currency conversion service
-    	activity :getConversion, :call, currencyConversion, @urlQuery do |results| 
-    		@returnValue = results
-    	end
-    	
-    	% do something with the currency return results
-    end
-
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bruce Kissinger</dc:creator><pubDate>Thu, 28 Jun 2012 17:52:44 -0000</pubDate><guid>https://sourceforge.net0721ac6f10e1da55eb985ee374c354325d6fcb87</guid></item><item><title>WikiPage Syntax modified by Bruce Kissinger</title><link>https://sourceforge.net/p/weeworkflow/wiki/Syntax/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -102,3 +102,55 @@
     end
 
 Note that the statement &lt;i&gt;show runtime_context&lt;/i&gt; causes the values of any context variables to be displayed.
+
+***
+
+Web Service Example
+---
+
+In this example, a Google currency conversion service is called. The control flow consists of three activities.
+
+&lt;ul&gt;
+&lt;li&gt;First, the query for the URL is constructed by several manipulate activities.&lt;/li&gt;
+&lt;li&gt;Next, the web service is invoked and the query is passed as parameter. The query results are copied to a variable named "returnValue".&lt;/li&gt;
+&lt;li&gt;Finally, some processing of the returned values would be performed.&lt;/li&gt;
+&lt;/ul&gt;
+
+    % 
+    % Demonstrate currency conversion using a Google service
+    %
+
+    endpoint :currencyConversion =&gt; http://www.google.com/ig/calculator
+    
+    context :amount =&gt; '100'
+    context :fromCurrencyCode =&gt; 'USD'
+    context :toCurrencyCode =&gt; 'INR'
+    context :urlQuery =&gt; nil
+    context :returnValue =&gt; nil
+    
+    controlflow do
+    	%
+    	% build the URL query string which should look like
+    	%   hl=en&amp;q=100USD=?INR
+    	%
+    	activity :build1, :manipulate do
+    		@urlQuery = 'hl_en&amp;q=' + @amount
+    	end
+    	activity :build2, :manipulate do
+    		@urlQuery = @urlQuery + @fromCurrencyCode
+    	end
+    	activity :build3, :manipulate do
+    		@urlQuery = @urlQuery + '=?'
+    	end
+    	activity :build3, :manipulate do
+    		@urlQuery = @urlQuery + @toCurrencyCode
+    	end
+    	
+    	% call the currency conversion service
+    	activity :getConversion, :call, currencyConversion, @urlQuery do |results| 
+    		@returnValue = results
+    	end
+    	
+    	% do something with the currency return results
+    end
+
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bruce Kissinger</dc:creator><pubDate>Tue, 19 Jun 2012 15:36:40 -0000</pubDate><guid>https://sourceforge.netdbc2012ccb69a74f5e7bd11604b7ff16ea4a1e97</guid></item><item><title>WikiPage Syntax modified by Bruce Kissinger</title><link>https://sourceforge.net/p/weeworkflow/wiki/Syntax/</link><description>General
---
Workflow steps are contained within a single text file.  Each text file consists of one or more lines that define:

&lt;ul&gt;
&lt;li&gt;handlers &lt;i&gt;(optional)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;endpoints &lt;i&gt;(optional)&lt;/i&gt;&lt;/li&gt; 
&lt;li&gt;context variables &lt;i&gt;(optional)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;control flow statements &lt;i&gt;(required)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;

For example, a simple workflow might look like this:

    context :persons =&gt; 0
    
    controlflow do
    	activity :step1, :manipulate do
    		@persons = 2
    	end
    end 

This defines a context variable named &lt;i&gt;persons&lt;/i&gt; which is assigned an initial value of 0.
Next, the controlflow includes a step that manipulates the context variable and sets the value of &lt;i&gt;persons&lt;/i&gt; to 2.

***

Loop Example
---

In this example, a variable named &lt;i&gt;counter&lt;/i&gt; is defined and assigned the initial value of 1. An endpoint is also defined that displays the current date/time.  The control flow consists of three activities.

&lt;ol&gt;
&lt;li&gt;An &lt;i&gt;activity&lt;/i&gt; statement calls an endpoint that displays the current time.&lt;/li&gt;
&lt;li&gt;A &lt;i&gt;cycle&lt;/i&gt; statement defines the begining of a loop which will execute while the counter value is less than 10000.&lt;/li&gt;
&lt;li&gt;An &lt;i&gt;activity&lt;/i&gt; statement increments the value of the counter variable&lt;/li&gt;
&lt;li&gt;When the cycle completes, the timer endpoint is called again&lt;/li&gt;
&lt;/ol&gt;

    %
    % Test performance of large loops
    %
    endpoint :simpletimer =&gt; erl://simpletimer:display
    context :counter =&gt; 1

    controlflow do
    
    	% call the timer endpoint to display the current time
    	activity :starttime, :call, simpletimer
    	end
    
    	% main loop
    	cycle (@counter &lt; 10000) do
    		activity :increment, :manipulate do
    			@counter += 1
    		end
    	end
    
    	% call the timer endpoint to display the current time
    	activity :endtime, :call, simpletimer
    	end
    end


***

Parallel Activities
---
In this example, three HTTP endpoints are defined. A parallel activity is specified and the ":wait" clause tells the engine to wait until all parallel branches have completed.


    endpoint :endpoint1 =&gt; http://localhost/endpoint1
    endpoint :endpoint2 =&gt; http://localhost/endpoint2
    endpoint :endpoint3 =&gt; http://localhost/endpoint3
    
    controlflow do
    	
    	parallel :wait do
    	
    		% operates in a seperate thread -- this should complete first
    		parallel branch do
    			activity :branch1a1, :call, endpoint1
    			end
    			
    			activity :branch1a2, :call, endpoint2
    			end
    		end
    		
    		% operates in a seperate thread - this should complete last because 
    		% endpoint3 takes a long time to execute
    		parallel branch do
    			activity :branch2a1, :call, endpoint3
    			end
    		end
    
    	end
    	
    	% this should not be run until both parallel branches have completed
    	activity :trace, :manipulate do
    		show runtime_context
    	end
    
    end

Note that the statement &lt;i&gt;show runtime_context&lt;/i&gt; causes the values of any context variables to be displayed.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bruce Kissinger</dc:creator><pubDate>Tue, 19 Jun 2012 15:33:25 -0000</pubDate><guid>https://sourceforge.net6f7c363e9de4d866a91af7ccebc085b9eff64a39</guid></item></channel></rss>