-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jayson Vantuyl
committed
Mar 6, 2009
1 parent
76d0132
commit bf2a056
Showing
3 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ html body { | |
overflow:auto; | ||
} | ||
|
||
#commentaccordian { | ||
#commentpane { | ||
position:absolute; | ||
top:0; | ||
bottom:0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ <h1 class="title">Example Workflow</h1> | |
<div><div class="comment indent"><!--<div class="indent"> Example Workflow for Vertebra</div>--></div></div><div><div class="element hotzone indent" target="workflow"><<span class="tag">workflow</span> <span class="attrkey">name</span>=<span class="attrval">"/sales/accept_order"</span> <span class="attrkey">start</span>=<span class="attrval">"get_data"</span>><div class="indent"> Sales: Receive Order</div><div class="indent"></div><div class="indent"> Receives an order and gets things rolling.</div><div class="indent"></div><div class="element hotzone indent" target="global,import"><<span class="tag">import</span>><div class="element hotzone indent" target="type,res,assert"><<span class="tag">res</span> <span class="attrkey">assert</span>=<span class="attrval">"company"</span>>/company/engineyard"</<span class="tag">res</span>></div><div class="element hotzone indent" target="type,res,assert"><<span class="tag">res</span> <span class="attrkey">assert</span>=<span class="attrval">"location"</span>>/us</<span class="tag">res</span>></div><div class="element hotzone indent" target="type,i4,assert"><<span class="tag">i4</span> <span class="attrkey">assert</span>=<span class="attrval">"api_version"</span>>5</<span class="tag">i4</span>></div><div class="indent"></div><div class="element hotzone indent" target="type,string,import_from"><<span class="tag">string</span> <span class="attrkey">from</span>=<span class="attrval">"name"</span>>Id of Customer</<span class="tag">string</span>></div><div class="element hotzone indent" target="type,string,import_from"><<span class="tag">string</span> <span class="attrkey">from</span>=<span class="attrval">"location"</span>>Resource Giving Location Information</<span class="tag">string</span>></div><div class="element hotzone indent" target="type,list,import_from"><<span class="tag">list</span> <span class="attrkey">from</span>=<span class="attrval">"items"</span>>Line Items Ordered</<span class="tag">list</span>></div><div class="indent"></div><div class="element hotzone indent" target="type,i4,stuffed"><<span class="tag">i4</span> <span class="attrkey">key</span>=<span class="attrval">"lucky_number"</span>>42</<span class="tag">i4</span>></div></<span class="tag">import</span>></div><div class="indent"></div><div class="comment indent"><!-- We don't have any global <export /> tag --></div><div class="indent"></div><div class="element hotzone indent" target="state"><<span class="tag">state</span> <span class="attrkey">id</span>=<span class="attrval">"get_data"</span>><div class="indent"> First, we have to load the contact data from our CRM.</div><div class="indent"></div><div class="element hotzone indent" target="op"><<span class="tag">op</span> <span class="attrkey">type</span>=<span class="attrval">"/sales/crm/find_contact_data"</span> <span class="attrkey">scope</span>=<span class="attrval">"single"</span>><div class="element hotzone indent" target="op_input"><<span class="tag">import</span>><div class="element indent"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"contact"</span> <span class="attrkey">from</span>=<span class="attrval">"name"</span> /></div><span class="element"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"type"</span>>customer</<span class="tag">string</span>></span><div class="comment indent"><!-- hardcoded value --></div></<span class="tag">import</span>></div><div class="element hotzone indent" target="op_export"><<span class="tag">export</span>><div class="element indent"><<span class="tag">first</span> <span class="attrkey">key</span>=<span class="attrval">"contact_id"</span> <span class="attrkey">to</span>=<span class="attrval">"cust_id"</span> /></div><span class="element"><<span class="tag">bool</span> <span class="attrkey">assert</span>=<span class="attrval">"error"</span>>false</<span class="tag">bool</span>></span><div class="comment indent"><!-- asserted output --></div></<span class="tag">export</span>></div></<span class="tag">op</span>></div><div class="element indent"><<span class="tag">emit</span>><div class="element indent"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"message"</span>>Located customer data...</<span class="tag">string</span>></div><div class="element indent"><<span class="tag">string</span> <span class="attrkey">from</span>=<span class="attrval">"contact_id"</span> /></div></<span class="tag">emit</span>></div><div class="element indent"><<span class="tag">trans</span>><div class="element indent"><<span class="tag">state</span>>process_data</<span class="tag">state</span>></div></<span class="tag">trans</span>></div></<span class="tag">state</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">state</span> <span class="attrkey">id</span>=<span class="attrval">"process_data"</span>><div class="indent"> Now we dispatch the order to the CRM. emit some status, and a log.</div><div class="indent"></div><div class="element indent"><<span class="tag">op</span> <span class="attrkey">type</span>=<span class="attrval">"/sales/crm/add_order"</span> <span class="attrkey">scope</span>=<span class="attrval">"single"</span>><div class="element indent"><<span class="tag">import</span>><div class="element indent"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"contact_id"</span> <span class="attrkey">from</span>=<span class="attrval">"cust_id"</span> /></div><span class="element"><<span class="tag">list</span> <span class="attrkey">from</span>=<span class="attrval">"items"</span> /></span><div class="comment indent"><!-- key defaults to imported key --></div></<span class="tag">import</span>></div><div class="element indent"><<span class="tag">export</span>><div class="element indent"><<span class="tag">first</span> <span class="attrkey">key</span>=<span class="attrval">"order_id"</span> /></div><div class="element indent"><<span class="tag">first</span> <span class="attrkey">key</span>=<span class="attrval">"confirmation_code"</span> <span class="attrkey">to</span>=<span class="attrval">"ccode"</span> /></div></<span class="tag">export</span>></div></<span class="tag">op</span>></div><div class="element indent"><<span class="tag">emit</span> <span class="attrkey">log_keys</span>=<span class="attrval">"app,location,cust_id,order_id"</span> <span class="attrkey">log_vals</span>=<span class="attrval">"ccode"</span>><div class="element indent"><<span class="tag">res</span> <span class="attrkey">key</span>=<span class="attrval">"app"</span>>/sales/crm</<span class="tag">res</span>></div><div class="element indent"><<span class="tag">string</span> <span class="attrkey">from</span>=<span class="attrval">"cust_id"</span> /></div><div class="element indent"><<span class="tag">string</span> <span class="attrkey">from</span>=<span class="attrval">"location"</span> /></div><div class="element indent"><<span class="tag">string</span> <span class="attrkey">from</span>=<span class="attrval">"order_id"</span> /></div><div class="element indent"><<span class="tag">string</span> <span class="attrkey">from</span>=<span class="attrval">"ccode"</span> /></div><div class="element indent"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"message"</span>>Order accepted. Finding contacts.</<span class="tag">string</span>></div></<span class="tag">emit</span>></div><div class="element indent"><<span class="tag">trans</span>><div class="element indent"><<span class="tag">state</span>>build-notify-list</<span class="tag">state</span>></div></<span class="tag">trans</span>></div></<span class="tag">state</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">state</span> <span class="attrkey">id</span>=<span class="attrval">"build-notify-list"</span>><div class="indent"> Here, we lookup who needs to be notified.</div><div class="indent"></div><div class="element indent"><<span class="tag">op</span> <span class="attrkey">type</span>=<span class="attrval">"/data/lookup"</span> <span class="attrkey">scope</span>=<span class="attrval">"all"</span>><div class="element indent"><<span class="tag">import</span>><div class="element indent"><<span class="tag">res</span> <span class="attrkey">key</span>=<span class="attrval">"list"</span>>/notify/orders</<span class="tag">res</span>></div><div class="element indent"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"customer"</span> <span class="attrkey">from</span>=<span class="attrval">"cust_id"</span> /></div></<span class="tag">import</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">export</span>><div class="comment indent"><!-- Here we actually concatenate multiple lists --></div><div class="element indent"><<span class="tag">list</span> <span class="attrkey">extend</span>=<span class="attrval">"contacts"</span>><span class="element"><<span class="tag">email</span>>[email protected]</<span class="tag">email</span>></span></<span class="tag">list</span>></div></<span class="tag">export</span>></div></<span class="tag">op</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">op</span> <span class="attrkey">type</span>=<span class="attrval">"/data/lookup"</span> <span class="attrkey">scope</span>=<span class="attrval">"all"</span>><div class="comment indent"><!-- This op runs in parallel --></div><div class="element indent"><<span class="tag">import</span>><div class="element indent"><<span class="tag">res</span> <span class="attrkey">key</span>=<span class="attrval">"list"</span>>/notify/orders</<span class="tag">res</span>></div><div class="element indent"><<span class="tag">res</span> <span class="attrkey">key</span>=<span class="attrval">"department"</span>>/sales</<span class="tag">res</span>></div><div class="element indent"><<span class="tag">res</span> <span class="attrkey">from</span>=<span class="attrval">"location"</span> /></div></<span class="tag">import</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">export</span>><div class="comment indent"><!-- and we keep adding to the same list --></div><div class="element indent"><<span class="tag">list</span> <span class="attrkey">extend</span>=<span class="attrval">"contacts"</span>><span class="element"><<span class="tag">email</span> /></span></<span class="tag">list</span>></div></<span class="tag">export</span>></div></<span class="tag">op</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">emit</span>><div class="element indent"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"message"</span>>Notifying contacts.</<span class="tag">string</span>></div></<span class="tag">emit</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">trans</span>><div class="element indent"><<span class="tag">state</span>>notify</<span class="tag">state</span>></div></<span class="tag">trans</span>></div></<span class="tag">state</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">state</span> <span class="attrkey">id</span>=<span class="attrval">"notify"</span>><div class="indent"> And we send the notifications.</div><div class="indent"></div><div class="element indent"><<span class="tag">op</span> <span class="attrkey">type</span>=<span class="attrval">"/comms/mailer"</span> <span class="attrkey">scope</span>=<span class="attrval">"single"</span>><div class="element indent"><<span class="tag">import</span>><div class="element indent"><<span class="tag">list</span> <span class="attrkey">each</span>=<span class="attrval">"contacts"</span> /></div><div class="element indent"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"message"</span>>...</<span class="tag">string</span>></div></<span class="tag">import</span>></div></<span class="tag">op</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">emit</span>><div class="element indent"><<span class="tag">string</span> <span class="attrkey">key</span>=<span class="attrval">"Message"</span>><div class="indent"> Order complete.</div><div class="indent"> .... (some sort of string interpolation potentially) ...</div></<span class="tag">string</span>></div></<span class="tag">emit</span>></div><div class="indent"></div><div class="element indent"><<span class="tag">trans</span>><div class="element indent"><<span class="tag">done</span> /></div></<span class="tag">trans</span>></div></<span class="tag">state</span>></div></<span class="tag">workflow</span>></div></div><div><span class="comment"><!-- funny test &gt; --></span></div> | ||
</div> | ||
</div></div> | ||
<div id="commentaccordian"><div class="pad"> | ||
<div id="commentpane"><div class="pad"> | ||
<div class="commenthdr" id="header"><p>Click title to see all comments.</p><p>Click individual element text to reveal comments limited to a certain location.</p></div> | ||
<div class="commenthdr" id="toc"><h3 id="toctitle">Contents</h3><ul id="toclist"></ul></div> | ||
<div class="commentbox" id="comment_workflow"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters