<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>A.Bekiaris's .Net / XAF Blog</title><link>http://apobekiaris.blogspot.com/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AbekiarisBlog" /><description>Download &lt;a href="http://expandframework.com/download.html"&gt;eXpand&lt;/a&gt;--&amp;gt;First Real World Open Source framework&lt;br&gt;&lt;a href="http://expandframework.com/contributors.html"&gt;How to support eXpand Framework&lt;/a&gt;&lt;br&gt;
eXpand is an open source extension framework for DevExpress eXpressApp Framework.&lt;br&gt; XAF and can be &lt;a href="https://www.devexpress.com/ClientCenter/Downloads"&gt;evaluated&lt;/a&gt; free of charge (30 day trial)&lt;br&gt;
&lt;b&gt;&lt;a href="http://www.expandframework.com"&gt;www.expandframework.com&lt;/a&gt;&lt;/b&gt;</description><language>en</language><managingEditor>noreply@blogger.com (Apostolis Bekiaris)</managingEditor><lastBuildDate>Tue, 22 May 2012 16:25:40 PDT</lastBuildDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">147</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">25</openSearch:itemsPerPage><feedburner:info uri="abekiarisblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><itunes:explicit>no</itunes:explicit><itunes:subtitle>Download eXpand--&amp;gt;First Real World Open Source framework How to support eXpand Framework eXpand is an open source extension framework for DevExpress eXpressApp Framework. XAF and can be evaluated free of charge (30 day trial) www.expandframework.com</itunes:subtitle><itunes:summary>Download eXpand--&amp;gt;First Real World Open Source framework How to support eXpand Framework eXpand is an open source extension framework for DevExpress eXpressApp Framework. XAF and can be evaluated free of charge (30 day trial) www.expandframework.com</itunes:summary><feedburner:emailServiceId>AbekiarisBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><title>April news</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/g6tOIF_Uxnc/april-news.html</link><category>Montly_News</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Tue, 22 May 2012 14:38:22 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-3117092470759510723</guid><description>&lt;p&gt;April was devoted to improving our continuous integration process. I am happy to announce that eXpand now has a dedicated build server. Many of you already notice its availability in our main download page, the rest are welcome to explore it and get access to all our builds and tests! Teamcity is a great integration platform and for sure will make our dev life easier. Please do not forget to say a big thanks to &lt;a href="http://www.mash2.com/" target="_blank"&gt;Dima Janzen&lt;/a&gt; since he is our CI guru!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-1714rjwEgJ0/T7wFrCvaoFI/AAAAAAAABQo/0HlB_V_aLfY/image%25255B4%25255D.png?imgmax=800"&gt;&lt;img style="display: inline" title="image" alt="image" src="http://lh6.ggpht.com/-XWGmNvhvdgo/T7wFx2wicwI/AAAAAAAABQw/dhoHuXNXNvY/image_thumb%25255B2%25255D.png?imgmax=800" width="418" height="363" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-rEYdVbEcDHE/T7wFzZ3isYI/AAAAAAAABQ0/qPiAySa64LA/image%25255B9%25255D.png?imgmax=800"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-s4Z_Jw_WF7Y/T7wF53VrSoI/AAAAAAAABRA/f7lYs6oIlRg/image_thumb%25255B5%25255D.png?imgmax=800" width="765" height="620" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Latest Collaborations&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Import wizard     &lt;br /&gt;It is now fully localized! (Big thanks one more time to &lt;a href="http://mdworkstuff.blogspot.com/" target="_blank"&gt;Martynas Dauciunas&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Master Detail      &lt;br /&gt;Controls Disappearing (see &lt;a title="http://goo.gl/M9s2g" href="http://goo.gl/M9s2g"&gt;http://goo.gl/M9s2g&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Modifications in logic module      &lt;br /&gt;To avoid exceptions when view is dashboard (see &lt;a title="http://goo.gl/dL8kZ" href="http://goo.gl/dL8kZ"&gt;http://goo.gl/dL8kZ&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Modification in core web module     &lt;br /&gt;GridViewOptionsModelSynchroniz​er incorrectly clears the grid's StatusBar template (see &lt;a title="http://goo.gl/eev8H" href="http://goo.gl/eev8H"&gt;http://goo.gl/eev8H&lt;/a&gt;)&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;As always big thanks for raising your questions and reporting bugs!   &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-3117092470759510723?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/I86ToT28UaHb2lenqMLsrYFKImA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I86ToT28UaHb2lenqMLsrYFKImA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/I86ToT28UaHb2lenqMLsrYFKImA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I86ToT28UaHb2lenqMLsrYFKImA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/g6tOIF_Uxnc" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-23T00:38:22.078+03:00</app:edited><media:thumbnail url="http://lh6.ggpht.com/-XWGmNvhvdgo/T7wFx2wicwI/AAAAAAAABQw/dhoHuXNXNvY/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2012/05/april-news.html</feedburner:origLink></item><item><title>March news</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/mT7TsYhfVjQ/march-news.html</link><category>Montly_News</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Tue, 10 Apr 2012 04:54:33 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-118107910188124463</guid><description>&lt;p&gt;For March we addressed many bugs and&amp;#160; added new stuff taken from your cases. Thank you for participating in our forums!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Latest collaborations&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Option to reload Sequence objects after objectspace commit      &lt;br /&gt;Useful in MiddleTier, when server modifies an object. You can enable this attribute via Model/Opetions node see (&lt;a title="http://goo.gl/Mvt5Y" href="http://goo.gl/Mvt5Y"&gt;http://goo.gl/Mvt5Y&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;Wizard module (by noxe) ,now has its own place in Xpand’s FeatureCenter. See it in action under DetailViewControls navigation menu. In addition it is possible to show a wizard detail view directly from the navigation menu. Finally there is special support for FocusDefaultDetailViewItemController &lt;/li&gt;    &lt;li&gt;Upgrade to 11.2.10 &lt;/li&gt;    &lt;li&gt;Logic modules      &lt;br /&gt;Renter bug big thanks to noxe (see &lt;a title="http://goo.gl/7f5aW" href="http://goo.gl/7f5aW"&gt;http://goo.gl/7f5aW&lt;/a&gt;). It is now possible to execute rules when an Action is executed (see &lt;a title="http://goo.gl/g2CFT" href="http://goo.gl/g2CFT"&gt;http://goo.gl/g2CFT&lt;/a&gt;). &lt;/li&gt;    &lt;li&gt;Design time errors&amp;#160; &lt;br /&gt;BaseimPle Copy local=true exceptions have been minimized now. Each module loads its own objects thus minimizing the references you need from your application project &lt;/li&gt;    &lt;li&gt;VS New project Item templates and installer      &lt;br /&gt;Martynas and Dima worked on this a lot making sure installer and templates are in a very good shape! &lt;/li&gt;    &lt;li&gt;Added generic box implementation as posted in DX forums (see &lt;a title="http://goo.gl/Gj9LD" href="http://goo.gl/Gj9LD"&gt;http://goo.gl/Gj9LD&lt;/a&gt; big thanks to &lt;a href="http://community.devexpress.com/members/Alain-Bismark.aspx"&gt;Alain Bismark&lt;/a&gt; )&lt;/li&gt;    &lt;li&gt;ModelDifference      &lt;br /&gt;Better support for compile error exceptions (see &lt;a title="http://goo.gl/NRxll" href="http://goo.gl/NRxll"&gt;http://goo.gl/NRxll&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;IO      &lt;br /&gt;Add missing reference to ModelArtifact state module. &lt;/li&gt;    &lt;li&gt;Add commented connection strings for standard authentication with SqlServer (see &lt;a title="http://goo.gl/5IS4Z" href="http://goo.gl/5IS4Z"&gt;http://goo.gl/5IS4Z&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;Obsolete SqlDbMapper module &lt;/li&gt;    &lt;li&gt;DBMapper      &lt;br /&gt;Support for timestamp database column type for MySql,MsSql,Oracle). In addition MutidataStoreProxy class has one more advantage now, it can operate against legacy databases. Thus DBmapper and WorldCreator can take advantage of this. A new IsLegacy attribute added in PersistentClassInfo to make it possible. Note for the legacy databases inheritance is not supported. &lt;/li&gt;    &lt;li&gt;ImportWiz.Win      &lt;br /&gt;Martynas worked on various bugs and localization issues. &lt;/li&gt;    &lt;li&gt;Addins      &lt;br /&gt;Used a modified version of format document on save taken from &lt;a title="http://goo.gl/0HCiQ" href="http://goo.gl/0HCiQ"&gt;http://goo.gl/0HCiQ&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-118107910188124463?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ccPLo5iwC229ss8Jnx_RZRH9XaU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ccPLo5iwC229ss8Jnx_RZRH9XaU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ccPLo5iwC229ss8Jnx_RZRH9XaU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ccPLo5iwC229ss8Jnx_RZRH9XaU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/mT7TsYhfVjQ" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-10T14:54:33.452+03:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2012/04/march-news.html</feedburner:origLink></item><item><title>Connecting to any database at runtime</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/p-YkOkPnhMQ/connecting-to-any-database-at-runtime.html</link><category>SqlDbMapper</category><category>DX</category><category>DBMapper</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 12 Mar 2012 12:53:29 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-9179533849021086925</guid><description>&lt;p&gt;In this post we will discuss how straight forward is to provide a solution for this science fiction subject! Our frameworks (XAF and XPO) along with a few smart classes are fully capable of doing all the hard job and spare our resources. At the end we will be able to apply all the XAF tools / modules in any legacy database. The module can connect the database world with powerful tools like the DX grids. In addition we can use use &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt;’s main metadata storage (the model), the security system and all XAF’s modules. These tools are are so powerful that are able to produce logic by themselves! Having such great configuration flexibility it is possible to write behavior after distribution thus you enter new markets and ideas! In addition the module allows you to control the logic after generation using Xaf’s meta driven developing model. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Retrieving any database metadata&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.devexpress.com/Products/NET/ORM/" target="_blank"&gt;XPO&lt;/a&gt; is the best candidate for this. since it can transparently talk&amp;#160; to more than 15 different database systems! &lt;/p&gt;  &lt;p&gt;The metadata API used from XPO to describe its supported databases is very simple as shown,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-XD7bkgQOkXo/T15ULm1TslI/AAAAAAAABP8/9zn7xoY6u_4/s1600-h/image9.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="http://lh4.ggpht.com/-ueBiXuVPJEA/T15UMav0QPI/AAAAAAAABQE/8sLyC87FHBE/image_thumb5.png?imgmax=800" width="667" height="312" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In a nutshell for each supported database, XPO will return a set of DBTable classes. Each DBTable will be associated with one DBPrimaryKey class and a collection of DBColumn and DBForeighKey classes. Next is the code required to get the DBTable classes out of database and&amp;#160; with no surprise again is very simple!&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;var&lt;/span&gt; storeSchemaExplorer = ((&lt;span style="color: #00008b"&gt;IDataStoreSchemaExplorer&lt;/span&gt;)&lt;span style="color: #00008b"&gt;XpoDefault&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetConnectionProvider&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;ConnectionString&amp;quot;&lt;/span&gt;, &lt;span style="color: #00008b"&gt;AutoCreateOption&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;None&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;var&lt;/span&gt; storageTables = storeSchemaExplorer.&lt;span style="color: #008b8b"&gt;GetStorageTables&lt;/span&gt;(storeSchemaExplorer.&lt;span style="color: #008b8b"&gt;GetStorageTablesList&lt;/span&gt;());&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #00008b"&gt;DBTable&lt;/span&gt; &lt;span style="font-weight: bold"&gt;dbTable&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; storageTables) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #00008b"&gt;DBColumn&lt;/span&gt; dbColumn &lt;span style="color: blue"&gt;in&lt;/span&gt; &lt;span style="font-weight: bold"&gt;dbTable&lt;/span&gt;.&lt;span style="color: purple"&gt;Columns&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: green"&gt;//now we are ready to do magic!&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; }}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Connecting at runtime – The magic part&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In order to query and create CRUD operations for a database system XPO requires a set of business classes. However, now there is a runtime factor involved. We need to create these business classes dynamically.&lt;/p&gt;  &lt;p&gt;XAF’s modularized architecture made this task too easy for us! We already created a dynamic class generation module called &lt;a href="http://www.expandframework.com/#worldcreator" target="_blank"&gt;WorldCreator&lt;/a&gt; in the past. WorldCreator maps the structure of an assembly into persistent classes.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-DsKHgVHZTvw/T15UNDQa1kI/AAAAAAAABQM/UvDSkeIOArU/s1600-h/image14.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="http://lh5.ggpht.com/-osUXBjo_FLA/T15UOAtqbVI/AAAAAAAABQU/73U4foPTM5o/image_thumb8.png?imgmax=800" width="819" height="144" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What we need is for each database to create a new PersistentAssemblyInfo, then for each DBTable a new PersistentClassInfo and finally for each DBColumn a new PersistentMemberInfo. In pseudo code this will look like,&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;var&lt;/span&gt; persistentAssemblyInfo = &lt;span style="color: purple"&gt;ObjectSpace&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;CreateObject&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;PersistentAssemblyInfo&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #00008b"&gt;DBTable&lt;/span&gt; &lt;span style="font-weight: bold"&gt;dbTable&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; storageTables) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;var&lt;/span&gt; persistentClassInfo = &lt;span style="color: purple"&gt;ObjectSpace&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;CreateObject&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;PersistentClassInfo&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; persistentAssemblyInfo.&lt;span style="color: purple"&gt;Name&lt;/span&gt; = &lt;span style="font-weight: bold"&gt;dbTable&lt;/span&gt;.&lt;span style="color: purple"&gt;Name&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; persistentAssemblyInfo.&lt;span style="color: purple"&gt;PersistentClassInfos&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;(persistentClassInfo);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #00008b"&gt;DBColumn&lt;/span&gt; &lt;span style="font-weight: bold"&gt;dbColumn&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; &lt;span style="font-weight: bold"&gt;dbTable&lt;/span&gt;.&lt;span style="color: purple"&gt;Columns&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;var&lt;/span&gt; persistentMemberInfo = &lt;span style="color: purple"&gt;ObjectSpace&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;CreateObject&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;PersistentMemberInfo&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; persistentMemberInfo.&lt;span style="color: purple"&gt;Name&lt;/span&gt; = &lt;span style="font-weight: bold"&gt;dbColumn&lt;/span&gt;.&lt;span style="color: purple"&gt;Name&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; persistentClassInfo.&lt;span style="color: purple"&gt;OwnMembers&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;(persistentMemberInfo);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;WorldCreator UI allows further extension of the model as simple as writing .NET code or creating new objects. More ideas and contributions are always welcome.&lt;/p&gt;  &lt;p&gt;Up to this point everything was extremely easy for us and almost shocking in terms of productivity! I believe there is no reason to change that feeling so lets move to our final task. &lt;/p&gt;  &lt;p&gt;WorldCreator is simply a code generation module. It generates assemblies which include XAF modules and loads them at application startup. However that assembly has no difference at all from the assemblies we create at design time. The persistent classes of this dynamic module belong and point back to main XAF database. What we want here is to redirect the generated sql statements back to the original mapped database.&lt;/p&gt;  &lt;p&gt;Once more we have most of the job ready! eXpand already uses a proxy version of ObjectSpaceProvider to support scenarios similar to &lt;a href="http://www.devexpress.com/Support/Center/kb/p/K18123.aspx" target="_blank"&gt;show Business Classes from several databases in a XAF application&lt;/a&gt;. Thus associating a WordCreator assembly (set of business classes) with a database is a rather easy job.&lt;/p&gt;  &lt;p&gt;Connecting to any database at runtime at first sounded very complicated. However our frameworks proved once more that they can raise our productivity and make our jobs so simple that even such complex task can fit in a small post like this one. &lt;/p&gt;  &lt;p&gt;The new module DBMapper, is already released as part of eXpand framework’s modules collection.&lt;/p&gt;  &lt;p&gt;We would appreciate your feedback on this post. Has it been useful to you? Feel free to contact us with any further questions.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-9179533849021086925?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IeN2FpC-O7WZ3ZPIyvX3FQ5EsW0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IeN2FpC-O7WZ3ZPIyvX3FQ5EsW0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/IeN2FpC-O7WZ3ZPIyvX3FQ5EsW0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IeN2FpC-O7WZ3ZPIyvX3FQ5EsW0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/p-YkOkPnhMQ" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-12T21:53:29.648+02:00</app:edited><media:thumbnail url="http://lh4.ggpht.com/-ueBiXuVPJEA/T15UMav0QPI/AAAAAAAABQE/8sLyC87FHBE/s72-c/image_thumb5.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2012/03/connecting-to-any-database-at-runtime.html</feedburner:origLink></item><item><title>February news</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/6EiSwB6fdOs/february-news.html</link><category>Montly_News</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Sun, 08 Apr 2012 04:40:43 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-7207853380975545382</guid><description>We appreciate your support and efforts in raising issues that help stabilizing our framework! This list is of what we have managed within February. &lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Latest Collaborations&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Fixed bugs with SequenceGenerator and MiddleTier      &lt;br /&gt;
&lt;a href="http://goo.gl/qhzwk" title="http://goo.gl/qhzwk"&gt;http://goo.gl/qhzwk&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Foreign key feature violations      &lt;br /&gt;
&lt;a href="http://goo.gl/Mha6S" title="http://goo.gl/Mha6S"&gt;http://goo.gl/Mha6S&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Provided association bug with Domain components &lt;/li&gt;
&lt;li&gt;Upgrade to 11.2.8 &lt;/li&gt;
&lt;li&gt;Fix Jobscheduler initialization, causing thread keeping alive.      &lt;br /&gt;
&lt;a href="http://goo.gl/LFUpa" title="http://goo.gl/LFUpa"&gt;http://goo.gl/LFUpa&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.expandframework.com/#modeldifference" target="_blank"&gt;Modeldifference&lt;/a&gt; model combing exception       &lt;br /&gt;
&lt;a href="http://goo.gl/Qq03J" title="http://goo.gl/Qq03J"&gt;http://goo.gl/Qq03J&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Master detail should tamper only states of actions in ViewController &lt;/li&gt;
&lt;li&gt;Clear build warnings &lt;/li&gt;
&lt;li&gt;ConditionalDetailView support for ViewShowing Execution context. This make it possible to have conditional view when creating a new object.      &lt;br /&gt;
&lt;a href="http://goo.gl/5iKrM" title="http://goo.gl/5iKrM"&gt;http://goo.gl/5iKrM&lt;/a&gt;       &lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-7207853380975545382?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lsC1uvdBWZrJDR6GRbl6oLUEsJY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lsC1uvdBWZrJDR6GRbl6oLUEsJY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lsC1uvdBWZrJDR6GRbl6oLUEsJY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lsC1uvdBWZrJDR6GRbl6oLUEsJY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/6EiSwB6fdOs" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-08T14:40:43.226+03:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2012/03/february-news.html</feedburner:origLink></item><item><title>January news</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/ZcxM6SqUkI0/january-news.html</link><category>Montly_News</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 30 Jan 2012 14:36:10 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-4197381947199591357</guid><description>&lt;p&gt;Friends asking me what are you doing man? I usually answer back: busy busy busy. They usually respond with a phrase like: Busy is good it means that you are doing great!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Latest Collaborations&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Our MSI package now installs VS New Project Item templates and sources. (Thanks to &lt;a href="http://www.mash2.com/" target="_blank"&gt;Dima Janzen&lt;/a&gt;!) &lt;/li&gt;    &lt;li&gt;Several bugs due to improved Security system support &lt;/li&gt;    &lt;li&gt;SqlDBmapper now support different database schemas (see also &lt;a href="http://goo.gl/qSj4B"&gt;http://goo.gl/qSj4B&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;DomainComponent support for &lt;a href="http://apobekiaris.blogspot.com/search/label/Logic" target="_blank"&gt;Logic Modules&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Bugs in the core modules (LinqCollectionSource, ChooseFromListCollectionEditor) (&lt;a href="http://goo.gl/dqMRG"&gt;http://goo.gl/dqMRG&lt;/a&gt;, &lt;a href="http://goo.gl/q2SFE"&gt;http://goo.gl/q2SFE&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;Middle Tier support for our new custom permissions for the improved security system (&lt;a href="http://goo.gl/k9Gh1"&gt;http://goo.gl/k9Gh1&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;New module release: DBMapper&lt;/strong&gt;  has the same functionality as &lt;a href="http://www.expandframework.com/#mapper" target="_blank"&gt;SqlDbMapper&lt;/a&gt; however is based on the powerful &lt;a href="http://www.devexpress.com/Products/NET/ORM/" target="_blank"&gt;XPO&lt;/a&gt;. Thus this module is capable of transforming into WorldCreator persistent classes the following list of databases: Access, &lt;a href="http://www.sybase.com/products/databasemanagement/advantagedatabaseserver" target="_blank"&gt;Advantage&lt;/a&gt;, &lt;a href="http://www.isug.com/Sybase_FAQ/ASA/index.html" target="_blank"&gt;Adaptive Server Anywhere&lt;/a&gt;, Ase, &lt;a href="http://www-01.ibm.com/software/data/db2/" target="_blank"&gt;DB2&lt;/a&gt;, &lt;a href="http://www.firebirdsql.org/" target="_blank"&gt;FireBird&lt;/a&gt;, &lt;a href="http://www.firebirdsql.org/" target="_blank"&gt;FireBirdSql&lt;/a&gt;, &lt;a href="http://www.microsoft.com/sqlserver/en/us/editions/compact.aspx" target="_blank"&gt;SqlServerCe&lt;/a&gt;, &lt;a href="http://www.microsoft.com/sqlserver/en/us/default.aspx" target="_blank"&gt;SqlServer&lt;/a&gt;, &lt;a href="http://www.oracle.com/technetwork/topics/dotnet/index-085163.html" target="_blank"&gt;ODP&lt;/a&gt;,      &lt;br /&gt;&lt;a href="http://www.oracle.com/index.html" target="_blank"&gt;Oracle&lt;/a&gt;, &lt;a href="http://www.pervasive.com/" target="_blank"&gt;PersasizeSql&lt;/a&gt;, &lt;a href="http://www.postgresql.org/" target="_blank"&gt;PostgreSql&lt;/a&gt;, &lt;a href="http://www.sqlite.org/" target="_blank"&gt;SQLite&lt;/a&gt;, &lt;a href="http://www.vistadb.net/" target="_blank"&gt;VistaDB&lt;/a&gt;          &lt;/li&gt; &lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-4197381947199591357?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AsF_i4LTMBFW5w_fiNIxqxcCMm0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AsF_i4LTMBFW5w_fiNIxqxcCMm0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AsF_i4LTMBFW5w_fiNIxqxcCMm0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AsF_i4LTMBFW5w_fiNIxqxcCMm0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/ZcxM6SqUkI0" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-31T00:36:10.445+02:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2012/01/january-news.html</feedburner:origLink></item><item><title>December news</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/umAIXbp6YsE/december-news.html</link><category>Montly_News</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 30 Jan 2012 13:18:11 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-841077709164559040</guid><description>&lt;p&gt;Although a bit outdated its better to publish it now than never. Your eXpand collaborations never stop, so it’s a shame to keep them secret from the rest of the community.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Latest Collaborations&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Logic modules(&lt;a href="http://www.expandframework.com/#AVC" target="_blank"&gt;AdditionalViewControlsProvider&lt;/a&gt;, &lt;a href="http://www.expandframework.com/#masterdetail" target="_blank"&gt;MasterDetail&lt;/a&gt;, &lt;a href="http://www.expandframework.com/#conditionaldetailsviews" target="_blank"&gt;ConditionalDetailViews&lt;/a&gt;, &lt;a href="http://www.expandframework.com/#modelartifact" target="_blank"&gt;ModelArtifact&lt;/a&gt;) as well as &lt;a href="http://www.expandframework.com/#modeldifference" target="_blank"&gt;ModelDifference&lt;/a&gt;, &lt;a href="http://www.expandframework.com/#pivotchart" target="_blank"&gt;PivotChart&lt;/a&gt; were migrated to the new &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt; security system. The new custom permissions are located under the Security.Improved namespace in each module. &lt;/li&gt;    &lt;li&gt;Out of the box support for support for CachedDataStoreService (see also &lt;a href="http://goo.gl/BtYxw"&gt;http://goo.gl/BtYxw&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;Minor bugs in MasterDetail, PivotChart, ExceptionHandling &lt;/li&gt;    &lt;li&gt;An eXpand based version of SecurityDemo solution added to our sources. &lt;/li&gt;    &lt;li&gt;AdditionalViewsControls now have better support for custom controls (see also &lt;a href="http://goo.gl/SyvOz"&gt;http://goo.gl/SyvOz&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;eXpand has build in support for &lt;a href="http://apobekiaris.blogspot.com/2011/01/easy-sequential-numbers.html" target="_blank"&gt;Sequence objects&lt;/a&gt; and we make it possible to to use a custom one. &lt;/li&gt;    &lt;li&gt;In addition to the big list of &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/09/20/expandframework-calculated-members-creation-pros-and-cons.aspx" target="_blank"&gt;runtime member types&lt;/a&gt; we added a new custom member type, which allows to specify an callback which is called in the getter of the member (Thanks to &lt;a href="http://community.devexpress.com/members/Martin-Praxmarer-_5B00_DX_2D00_Squad_5D00_.aspx" target="_blank"&gt;Martin Praxmarer&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;MasterDetail now supports validation of child list view objects (Thanks to &lt;a href="http://community.devexpress.com/members/Martin-Praxmarer-_5B00_DX_2D00_Squad_5D00_.aspx" target="_blank"&gt;Martin Praxmarer&lt;/a&gt;) &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Thank you all for your contributions! Lets work closer together in 2012 and give even more value to our beloved frameworks!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-841077709164559040?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zeUnAsgzdogMG_gqwyeelDqsobo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zeUnAsgzdogMG_gqwyeelDqsobo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zeUnAsgzdogMG_gqwyeelDqsobo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zeUnAsgzdogMG_gqwyeelDqsobo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/umAIXbp6YsE" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T23:18:11.300+02:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2012/01/december-news.html</feedburner:origLink></item><item><title>LINQPad is XPO’s new best friend!</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/1HCExg2VD58/linqpad-is-xpos-new-best-friend.html</link><category>DX</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Tue, 27 Dec 2011 10:22:12 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-8331900490866265361</guid><description>&lt;p&gt;LINQ is &lt;a href="http://msdn.microsoft.com/en-us/library/bb308959.aspx" target="_blank"&gt;.NET Language-Integrated Query&lt;/a&gt;. It's included in .NET Framework 3.5 and you can use it in Visual Studio 2008 projects. XPO has officially supported LINQ since v7.3 and since then we have continued to improve and support it. Nowadays &lt;a href="http://www.devexpress.com/Support/Center/kb/p/K18051.aspx" target="_blank"&gt;LINQ to XPO&lt;/a&gt; is very mature, extendable (&lt;a href="http://documentation.devexpress.com/#XPO/CustomDocument9948" target="_blank"&gt;How to: Implement Custom Functions and Criteria in LINQ to XPO&lt;/a&gt;) and powerful (&lt;a href="http://documentation.devexpress.com/#XPO/CustomDocument8130" target="_blank"&gt;Free Joins&lt;/a&gt;). In the latest version we make it even easier to use LINQ to XPO since we only distribute one assembly, DevExpress.XPO.dll, which includes everything! (custom providers as well).&lt;/p&gt;  &lt;p&gt;XPO can talk transparently to a large &lt;a href="http://documentation.devexpress.com/#XPO/CustomDocument2114" target="_blank"&gt;list of database systems&lt;/a&gt;. It was already possible to make complex queries using our &lt;a href="http://documentation.devexpress.com/#XPO/CustomDocument2047" target="_blank"&gt;standard criteria syntax&lt;/a&gt;, however using LINQ offers some great advantages. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;No magic strings, like you have in standard criteria syntax, &lt;/li&gt;    &lt;li&gt;Intellisense support making it easier and faster to construct your queries, &lt;/li&gt;    &lt;li&gt;Compile time checking, &lt;/li&gt;    &lt;li&gt;Learning to write LINQ queries/lambdas is a must learn for .NET developers, &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The benefits are clear, however there is a caveat when using LINQ. It is not possible to use Edit and Continue and with even the smallest change you need to restart your debugging session. As a result your development speed is decreased dramatically.&lt;/p&gt;  &lt;p&gt;The solution as always is to use the right tool and in this case the right tool is &lt;a href="http://www.linqpad.net/" target="_blank"&gt;LINQPad&lt;/a&gt;. It provides a flexible UI allowing you to use LINQ in various ways. &lt;/p&gt;  &lt;p&gt;In our latest version our team released an XPO context driver for LINQPad. Let’s see how to configure it.&lt;/p&gt;  &lt;p&gt;Firstly we need to install the driver found at C:\DevExpress 2011.2\Components\Tools\DXperience\XPOContextDriver.lpx. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-QT0gx9A1f54/TvoMoXuZFlI/AAAAAAAABOM/RDK3maiiqes/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-27GEiUUgHaE/TvoMpEuAl8I/AAAAAAAABOU/Sse0If-3Uo0/image_thumb%25255B2%25255D.png?imgmax=800" width="502" height="460" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Secondly we need to setup a new connection.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-9rWfQxQ44vw/TvoMqTjXe0I/AAAAAAAABOc/sEWtFiDwfKI/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-dtVN-Pdv4DE/TvoMq9vQgRI/AAAAAAAABOg/BV7gz9YgVbM/image_thumb%25255B5%25255D.png?imgmax=800" width="595" height="474" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this example we are going to use the MainDemo assembly containing the business objects.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-4Qmhqik4c70/TvoMrosLyHI/AAAAAAAABOs/jVaPw8ogNr0/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-8RO1Cy_azQU/TvoMshSVbJI/AAAAAAAABOw/5lklXyEw8-M/image_thumb%25255B8%25255D.png?imgmax=800" width="519" height="357" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;LINQPad populated the domain in a hierarchical treelist. This allows us to enjoy using drag &amp;amp; drop plus intellisence in its expression editor to form the LINQ queries. Furthermore it is possible to use your style of language as demonstrated below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-WbcBybHdyzk/TvoMuIDNQVI/AAAAAAAABO8/5nDfOGZ_AW0/s1600-h/image%25255B20%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Tv7PfYciD28/TvoMvLedv4I/AAAAAAAABPE/Xh7rfs-2j3U/image_thumb%25255B12%25255D.png?imgmax=800" width="640" height="397" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The cool part is that LINQPad, written by the great &lt;a href="http://www.albahari.com/" target="_blank"&gt;Joe Albahari&lt;/a&gt;, is available for free. It is strongly recommended as a great way to learn LINQ.&lt;/p&gt;  &lt;p&gt;Now for the fun part, let’s see it in action. Imagine we have the following code in our VS.&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;var&lt;/span&gt; queryable = &lt;span style="color: blue"&gt;from&lt;/span&gt; c &lt;span style="color: blue"&gt;in&lt;/span&gt; contacts&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;let&lt;/span&gt; tasks = c.&lt;span style="color: purple"&gt;Tasks&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Where&lt;/span&gt;(t =&amp;gt; t.&lt;span style="color: purple"&gt;ActualWork&lt;/span&gt; &amp;lt; 0)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;where&lt;/span&gt; tasks.&lt;span style="color: #008b8b"&gt;Any&lt;/span&gt;()&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;orderby&lt;/span&gt; c.&lt;span style="color: purple"&gt;LastName&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;select&lt;/span&gt; &lt;span style="color: blue"&gt;new&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; c.&lt;span style="color: purple"&gt;LastName&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: purple"&gt;Orders&lt;/span&gt; = tasks.&lt;span style="color: #008b8b"&gt;Count&lt;/span&gt;(),&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; };&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;We wish to see the results of queryable variable ,the best way to achieve this is to set a breakpoint then hit F5. Next we wait for our app to load and navigate to the action that will hit the breakpoint. Finally we must select the queryable variable and hit Shift+F9 to invoke the debugger window and examine the result set. Now we can try to make our requirements more complex. Lets say we also want to examine the result set when ActualWork&amp;gt;10. The solution is really easy when using LINQPad, we simply need to copy paste the code from VS to LINQPad the expression editor like this,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-a_glQndNg6A/TvoMv3R_nsI/AAAAAAAABPM/TQhfrdOzZws/s1600-h/image%25255B30%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-wYep5vrbS0E/TvoMwmwZbbI/AAAAAAAABPU/VuBmVfjZUjA/image_thumb%25255B18%25255D.png?imgmax=800" width="699" height="660" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After this we can quickly and easily form queries as we wish and examine their result sets instantly. Using the excellent and cheap &lt;a href="http://www.linqpad.net/Purchase.aspx" target="_blank"&gt;LINQPad Autocompletion&lt;/a&gt; it is possible to use VS like intelligence to further speed up your development.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-00fgcY76AmY/TvoMxt8rJaI/AAAAAAAABPY/UUR4JdfcNq8/s1600-h/image%25255B35%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-wPcgrfWjixA/TvoMyKu7VYI/AAAAAAAABPg/YlxnL9ASAbc/image_thumb%25255B21%25255D.png?imgmax=800" width="657" height="384" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;PS: eXpandFrameWork contributors are already using the Autocompletion feature since LINQPad offered a license for its contributors.&lt;/p&gt;  &lt;p&gt;We would appreciate your feedback on this post. Has it been useful to you? Feel free to contact us with any further questions&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-8331900490866265361?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hJKWjH5CRHqSLsWyguTOAKEasBc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hJKWjH5CRHqSLsWyguTOAKEasBc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hJKWjH5CRHqSLsWyguTOAKEasBc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hJKWjH5CRHqSLsWyguTOAKEasBc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/1HCExg2VD58" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-27T20:22:12.617+02:00</app:edited><media:thumbnail url="http://lh3.ggpht.com/-27GEiUUgHaE/TvoMpEuAl8I/AAAAAAAABOU/Sse0If-3Uo0/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/12/linqpad-is-xpos-new-best-friend.html</feedburner:origLink></item><item><title>An eXpansive Christmas!</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/LtAhML3oRVc/expansive-christmas.html</link><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Sun, 25 Dec 2011 06:26:09 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-3789646884460202013</guid><description>&lt;p&gt;Just a quick post to wish all of you out there in the community a very Merry Christmas and a Happy New Year! I thought I had better take some time out from all the usual revelry to thank you all for making our framework what it is right now. Now is the season of generosity and goodwill so it's a good time to reflect on what has been achieved at eXpand through the giving of ideas. Of course &lt;i&gt;my &lt;/i&gt;biggest Christmas wish is that communication and collaboration between us all in the online community is increased a thousand times more! Let's all make a New Year's resolution to work together and take &lt;i&gt;our&lt;/i&gt; framework to the roof!     &lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;MERRY XMAS!&lt;/b&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-3789646884460202013?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lYDa0jAAnkdRguhsCkTfoMnxCDg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lYDa0jAAnkdRguhsCkTfoMnxCDg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lYDa0jAAnkdRguhsCkTfoMnxCDg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lYDa0jAAnkdRguhsCkTfoMnxCDg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/LtAhML3oRVc" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-25T16:26:09.242+02:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/12/expansive-christmas.html</feedburner:origLink></item><item><title>Hey Mom we are on the Hanselminutes show!</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/R1eHd0rGADk/hey-mom-we-are-on-hanselminutes-show.html</link><category>DX</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Wed, 14 Dec 2011 15:32:33 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-6357618073505409477</guid><description>&lt;p&gt;At 11.00 PST on Thursday 15th December I will be appearing live on &lt;a href="http://www.hanselman.com" target="_blank"&gt;Scott Hanselman&lt;/a&gt;’s podcast &lt;a href="http://hanselminutes.com/" target="_blank"&gt;Hanselminutes&lt;/a&gt;. During the course of the show Scott and I will be discussing eXpand framework and its relationship with &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt;. Please tune in and show some support for your favorite frameworks! We built this thing together guys and this is an exciting event for all of us.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-6357618073505409477?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Tyl-hcAtjDNhcRtM83pwWZ4_Oi0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Tyl-hcAtjDNhcRtM83pwWZ4_Oi0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Tyl-hcAtjDNhcRtM83pwWZ4_Oi0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Tyl-hcAtjDNhcRtM83pwWZ4_Oi0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/R1eHd0rGADk" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-15T01:32:33.525+02:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/12/hey-mom-we-are-on-hanselminutes-show.html</feedburner:origLink></item><item><title>You have changes? I have Workflow!</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/uPdCVtgjKk8/you-have-changes-i-have-workflow.html</link><category>XpandWF</category><category>DX</category><category>WF</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 30 Jan 2012 07:31:13 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-1700412243453996193</guid><description>&lt;p&gt;WF4 uses a service oriented architecture and as a result any problem can be decoupled into smaller, easily solvable and testable services. XAF uses MVC architecture which, in a sense, is very similar to that used by WF4. We can compare XAF’s controllers to WF4 services. Moreover XAF’s Application does the same job as the WF4 server. The upshot of all this is that users should be able to get the feel of WF4 in no time at all. The XAF workflow module introduces a new layer that makes the already decoupled services aware of our business classes.  After this the sky is the limit and over the next few posts I aim to demonstrate some of what can be achieved. For example the next post will focus on creating an event driven workflow initialization engine.&lt;/p&gt;  &lt;p&gt;To get back to today’s post, we will discuss an implementation that is very decoupled and as a result it has very limited dependencies on other modules. It is worth noting that all XAF’s features are decoupled, persistent objects take on the role of domain mappers.&lt;/p&gt;  &lt;p&gt;Take these requirements; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;an end user needs to be able to input an object type (and or) a property name, &lt;/li&gt;    &lt;li&gt;an object change needs to start the workflow either at client or at sever, &lt;/li&gt;    &lt;li&gt;workflows need to be aware of the object that has changed, its PropertyName and its property OldValue. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;The custom workflow definition&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;We cannot use the default &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt; XpoWorkFlowDefinition class in any way.  This is because there are no fields to store the PropertyName and its OldValue. We should not even derive from the default XpoWorkFlowDefinition because we may face difficulties as this class is used by our workflow server. To cope with this issue it is necessary to create a custom ObjectChangedWorkflow definition as shown.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-23TphhEIRw8/Ttdf5PjygOI/AAAAAAAABNY/xmOhaX-KRRg/s1600-h/image5.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Ntee52DYg_A/Ttdf76txjCI/AAAAAAAABNg/e6ewxxsLuY8/image_thumb3.png?imgmax=800" width="839" height="518" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;While we are doing this we also need to modify the default xaml of the workflow and add the two more arguments (propertyName, oldValue) as per our requirements.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-sH5F3EimCBU/Ttdf8hxYgYI/AAAAAAAABNk/Me9oGvF9Sjk/s1600-h/image10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-4cF6XNMDHno/Ttdf9flfb4I/AAAAAAAABNs/GJc-pROqnUQ/image_thumb6.png?imgmax=800" width="519" height="210" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Below you can see the UI of this custom workflow definition,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-l1rjITyoyvI/Ttdf-3hEHUI/AAAAAAAABN4/o42SYlwrVUE/s1600-h/image51.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-fzH7SBbNnlI/TtdgB8oQJMI/AAAAAAAABOA/vGR6KQYiuIY/image_thumb2.png?imgmax=800" width="786" height="541" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Up to here XAF has made things very straightforward for us. We have designed a normal persistent class to store our data and we have used attributes (&lt;em&gt;PropertyEditorType, DataStourceProperty, TypeConverter etc&lt;/em&gt;) to configure the UI.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Registration of custom workflow definition&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;The next step is to register this custom workflow definition. To help with this task, eXpand, provides the &lt;a href="https://github.com/expand/eXpand/blob/master/Xpand/Xpand.ExpressApp.Modules/Workflow/WorkflowStartService.cs" target="_blank"&gt;WorkflowStartService&amp;lt;T&amp;gt;&lt;/a&gt; where T is the type of workflow. Furthermore for &lt;a href="https://github.com/expand/eXpand/blob/master/Xpand/Xpand.ExpressApp.Modules/Workflow/ObjectChangedWorkflows/ObjectChangedWorkflow.cs" target="_blank"&gt;ObjectChangeWorkflow&lt;/a&gt; definitions the implementation is rather easy since there are no further requirements.&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;ObjectChangedWorkflowStartService&lt;/span&gt; : &lt;span style="color: #00008b"&gt;WorkflowStartService&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ObjectChangedWorkflow&lt;/span&gt;&amp;gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ObjectChangedWorkflowStartService&lt;/span&gt;()&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(&lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;FromMinutes&lt;/span&gt;(1)) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ObjectChangedWorkflowStartService&lt;/span&gt;(&lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt; requestsDetectionPeriod) : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(requestsDetectionPeriod) { }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: #008b8b"&gt;NeedToStartWorkflow&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IObjectSpace&lt;/span&gt; objectSpace, &lt;span style="color: #00008b"&gt;ObjectChangedWorkflow&lt;/span&gt; workflow) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;AfterWorkFlowStarted&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IObjectSpace&lt;/span&gt; objectSpace, &lt;span style="color: #00008b"&gt;ObjectChangedWorkflow&lt;/span&gt; workflow, &lt;span style="color: #00008b"&gt;Guid&lt;/span&gt; startWorkflow) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;u&gt;&lt;strong&gt;Start workflow - Track Object Changes&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;    &lt;p&gt;Now, when I have registered workflows on the server, it's time to return to my task: start a workflow when a property has been changed.     &lt;br /&gt;In XAF, I can track changes with the help of the ObjectSpace.Committing and ObjectSpace.ObjectChanged events. However because we need to create only one request per object change, it is advisable to collect the changes in an array.&lt;/p&gt;    &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StartWorkflowOnObjectChangeController&lt;/span&gt; : &lt;span style="color: #00008b"&gt;ViewController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ObjectView&lt;/span&gt;&amp;gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;OnActivated&lt;/span&gt;() {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;OnActivated&lt;/span&gt;();&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: #008b8b"&gt;TypeHasWorkflows&lt;/span&gt;()) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: purple"&gt;ObjectSpace&lt;/span&gt;.&lt;span style="color: fuchsia"&gt;ObjectChanged&lt;/span&gt; &lt;span style="color: #008b8b"&gt;+=&lt;/span&gt; &lt;span style="color: #008b8b"&gt;PopulateObjectChangedEventArgs&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: purple"&gt;ObjectSpace&lt;/span&gt;.&lt;span style="color: fuchsia"&gt;Committing&lt;/span&gt; &lt;span style="color: #008b8b"&gt;+=&lt;/span&gt; &lt;span style="color: #008b8b"&gt;StartWorkFlows&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;PopulateObjectChangedEventArgs&lt;/span&gt;(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #00008b"&gt;ObjectChangedEventArgs&lt;/span&gt; objectChangedEventArgs) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (!&lt;span style="color: blue"&gt;string&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;IsNullOrEmpty&lt;/span&gt;(objectChangedEventArgs.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt;)) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;var&lt;/span&gt; changedEventArgs = &lt;span style="color: purple"&gt;_objectChangedEventArgses&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;FirstOrDefault&lt;/span&gt;(args =&amp;gt; args.&lt;span style="color: purple"&gt;Object&lt;/span&gt; == objectChangedEventArgs.&lt;span style="color: purple"&gt;Object&lt;/span&gt; &amp;amp;&amp;amp; args.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt; == objectChangedEventArgs.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt;);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;if&lt;/span&gt; (changedEventArgs != &lt;span style="color: blue"&gt;null&lt;/span&gt;) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;                &lt;span style="color: purple"&gt;_objectChangedEventArgses&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Remove&lt;/span&gt;(changedEventArgs);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;                &lt;span style="color: purple"&gt;_objectChangedEventArgses&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;ObjectChangedEventArgs&lt;/span&gt;(changedEventArgs.&lt;span style="color: purple"&gt;Object&lt;/span&gt;, changedEventArgs.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt;, changedEventArgs.&lt;span style="color: purple"&gt;OldValue&lt;/span&gt;, objectChangedEventArgs.&lt;span style="color: purple"&gt;NewValue&lt;/span&gt;));&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            } &lt;span style="color: blue"&gt;else&lt;/span&gt;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;                &lt;span style="color: purple"&gt;_objectChangedEventArgses&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;(objectChangedEventArgs);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;StartWorkFlow&lt;/span&gt;(&lt;span style="color: #00008b"&gt;ObjectChangedEventArgs&lt;/span&gt; objectChangedEventArgs, &lt;span style="color: #00008b"&gt;ObjectChangedWorkflow&lt;/span&gt; objectChangedWorkflow) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; o = objectChangedEventArgs.&lt;span style="color: purple"&gt;Object&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;ITypeInfo&lt;/span&gt; typeInfo = &lt;span style="color: #00008b"&gt;XafTypesInfo&lt;/span&gt;.&lt;span style="color: purple"&gt;Instance&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;FindTypeInfo&lt;/span&gt;(o.&lt;span style="color: #008b8b"&gt;GetType&lt;/span&gt;());&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;object&lt;/span&gt; targetObjectKey = typeInfo.&lt;span style="color: purple"&gt;KeyMember&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetValue&lt;/span&gt;(o);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (objectChangedWorkflow.&lt;span style="color: purple"&gt;ExecutionDomain&lt;/span&gt; == &lt;span style="color: #00008b"&gt;ExecutionDomain&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Server&lt;/span&gt;) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: #008b8b"&gt;CreateServerRequest&lt;/span&gt;(objectChangedEventArgs, objectChangedWorkflow, targetObjectKey, typeInfo);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        } &lt;span style="color: blue"&gt;else&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: #008b8b"&gt;InvokeOnClient&lt;/span&gt;(objectChangedEventArgs, objectChangedWorkflow, targetObjectKey);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;   &lt;/div&gt;    &lt;p&gt;As you will have noticed we have not used the default VS naming for ObjectSpace event handlers. This is because the names that have chosen give a more specific idea of how each method works.&lt;/p&gt;    &lt;p&gt;The ObjectChanged event occurs each time a property is changed and the changes are collected in the objectChangedEventArgses array. The Committing event occurs once changes are ready to be sent to the server and workflows start for each entry. We have introduced two options for starting and executing workflows;&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;Execute synchronously and locally, &lt;/li&gt;      &lt;li&gt;Send a request to the server and execute at the server asynchronously       &lt;br /&gt;&lt;/li&gt;   &lt;/ol&gt;    &lt;p&gt;&lt;strong&gt;&lt;u&gt;Execute a workflow synchronously on the client&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;The next stage is to create activities at the client then on ObjectSpace CommitChanges from appropriate WorkflowDefinition and execute them immediatelly&lt;/p&gt;    &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StartWorkflowOnObjectChangeController&lt;/span&gt; : &lt;span style="color: #00008b"&gt;ViewController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ObjectView&lt;/span&gt;&amp;gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;InvokeOnClient&lt;/span&gt;(&lt;span style="color: #00008b"&gt;ObjectChangedEventArgs&lt;/span&gt; objectChangedEventArgs, &lt;span style="color: #00008b"&gt;ObjectChangedWorkflow&lt;/span&gt; objectChangedWorkflow, &lt;span style="color: blue"&gt;object&lt;/span&gt; targetObjectKey) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;Activity&lt;/span&gt; activity = &lt;span style="color: #00008b"&gt;ActivityXamlServices&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Load&lt;/span&gt;(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;StringReader&lt;/span&gt;(objectChangedWorkflow.&lt;span style="color: purple"&gt;Xaml&lt;/span&gt;));&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; dictionary = &lt;span style="color: #00008b"&gt;ObjectChangedStartWorkflowService&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Dictionary&lt;/span&gt;(targetObjectKey, objectChangedEventArgs.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt;, objectChangedEventArgs.&lt;span style="color: purple"&gt;OldValue&lt;/span&gt;);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;WorkflowInvoker&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Invoke&lt;/span&gt;(activity, dictionary);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;   &lt;/div&gt;   &lt;br /&gt;This is a simple code which can be found in nearly any WF4 example at &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=21459"&gt;http://www.microsoft.com/download/en/details.aspx?id=21459&lt;/a&gt;.    &lt;br /&gt;&lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Send a request to start workflow on the server&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The second of our two methods involves starting the workflow at the server. Now we need to notify the server of the values of those arguments as well. In the &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/07/19/manually-starting-workflows.aspx" target="_blank"&gt;manually starting workflows&lt;/a&gt; post we learnt that XAF does this by using XpoStartWorkflowRequest. This class has a different design however, and may create issues since it is used by XAF default services. Therefore instead of deriving from XpoStartWorkflowRequest we need to design a similar custom class.&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;ObjectChangedXpoStartWorkflowRequest&lt;/span&gt; : &lt;span style="color: #00008b"&gt;WFBaseObject&lt;/span&gt;, &lt;span style="color: #00008b"&gt;IObjectChangedWorkflowRequest&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;TypeConverter&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;StringToTypeConverter&lt;/span&gt;))]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;Type&lt;/span&gt; &lt;span style="color: purple"&gt;TargetObjectType&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: purple"&gt;_targetObjectType&lt;/span&gt;; } &lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"TargetObjectType"&lt;/span&gt;, &lt;span style="color: blue"&gt;ref&lt;/span&gt; &lt;span style="color: purple"&gt;_targetObjectType&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    #region&lt;/span&gt; IDCStartWorkflowRequest Members&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;TargetWorkflowUniqueId&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"TargetWorkflowUniqueId"&lt;/span&gt;); } &lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"TargetWorkflowUniqueId"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;ValueConverter&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;KeyConverter&lt;/span&gt;))]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;object&lt;/span&gt; &lt;span style="color: purple"&gt;TargetObjectKey&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"TargetObjectKey"&lt;/span&gt;); } &lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"TargetObjectKey"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    #endregion&lt;/span&gt;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    #region&lt;/span&gt; IObjectChangedWorkflowRequest Members&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;PropertyName&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: purple"&gt;_propertyName&lt;/span&gt;; } &lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"PropertyName"&lt;/span&gt;, &lt;span style="color: blue"&gt;ref&lt;/span&gt; &lt;span style="color: purple"&gt;_propertyName&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;ValueConverter&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;SerializableObjectConverter&lt;/span&gt;))]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;Size&lt;/span&gt;(&lt;span style="color: #00008b"&gt;SizeAttribute&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Unlimited&lt;/span&gt;)]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;object&lt;/span&gt; &lt;span style="color: purple"&gt;OldValue&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: purple"&gt;_oldValue&lt;/span&gt;; }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"OldValue"&lt;/span&gt;, &lt;span style="color: blue"&gt;ref&lt;/span&gt; &lt;span style="color: purple"&gt;_oldValue&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;   &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;This is a very simple class, its only role is to store values in the database. Now instead of invoking workflows locally we only need to create ObjectChangedXpoStartWorkflowRequest objects. &lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StartWorkflowOnObjectChangeController&lt;/span&gt; : &lt;span style="color: #00008b"&gt;ViewController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ObjectView&lt;/span&gt;&amp;gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;CreateServerRequest&lt;/span&gt;(&lt;span style="color: #00008b"&gt;ObjectChangedEventArgs&lt;/span&gt; objectChangedEventArgs, &lt;span style="color: #00008b"&gt;ObjectChangedWorkflow&lt;/span&gt; objectChangedWorkflow, &lt;span style="color: blue"&gt;object&lt;/span&gt; targetObjectKey, &lt;span style="color: #00008b"&gt;ITypeInfo&lt;/span&gt; typeInfo) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; request = &lt;span style="color: purple"&gt;ObjectSpace&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;CreateObject&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ObjectChangedXpoStartWorkflowRequest&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        request.&lt;span style="color: purple"&gt;TargetWorkflowUniqueId&lt;/span&gt; = objectChangedWorkflow.&lt;span style="color: #008b8b"&gt;GetUniqueId&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        request.&lt;span style="color: purple"&gt;TargetObjectType&lt;/span&gt; = typeInfo.&lt;span style="color: purple"&gt;Type&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        request.&lt;span style="color: purple"&gt;TargetObjectKey&lt;/span&gt; = targetObjectKey;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        request.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt; = objectChangedEventArgs.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        request.&lt;span style="color: purple"&gt;OldValue&lt;/span&gt; = &lt;span style="color: #008b8b"&gt;GetOldValue&lt;/span&gt;(objectChangedEventArgs);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;In the next step we are going to create a service to consume these values from the server and start a workflow,&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StartWorkflowOnObjectChangeService&lt;/span&gt; : &lt;span style="color: #00008b"&gt;BaseTimerService&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;OnTimer&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;using&lt;/span&gt; (&lt;span style="color: blue"&gt;var&lt;/span&gt; objectSpace = &lt;span style="color: purple"&gt;ObjectSpaceProvider&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;CreateObjectSpace&lt;/span&gt;()) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: green"&gt;//get all requests from the database&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue"&gt;var&lt;/span&gt; &lt;span style="font-weight: bold"&gt;request&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; objectSpace.&lt;span style="color: #008b8b"&gt;GetObjects&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ObjectChangedXpoStartWorkflowRequest&lt;/span&gt;&amp;gt;()) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                &lt;span style="color: green"&gt;//find workflow&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                &lt;span style="color: blue"&gt;var&lt;/span&gt; definition = &lt;span style="color: #008b8b"&gt;GetService&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;IWorkflowDefinitionProvider&lt;/span&gt;&amp;gt;().&lt;span style="color: #008b8b"&gt;FindDefinition&lt;/span&gt;(&lt;span style="font-weight: bold"&gt;request&lt;/span&gt;.&lt;span style="color: purple"&gt;TargetWorkflowUniqueId&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                &lt;span style="color: blue"&gt;if&lt;/span&gt; (definition != &lt;span style="color: blue"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; definition.&lt;span style="color: purple"&gt;CanOpenHost&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                    &lt;span style="color: green"&gt;//Start the workflow passing in PropertyName &amp;amp;&amp;amp; OldValue&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                    &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: #008b8b"&gt;GetService&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ObjectChangedStartWorkflowService&lt;/span&gt;&amp;gt;().&lt;span style="color: #008b8b"&gt;StartWorkflow&lt;/span&gt;(definition.&lt;span style="color: purple"&gt;Name&lt;/span&gt;, &lt;/p&gt;    &lt;p style="margin: 0px"&gt;                        &lt;span style="font-weight: bold"&gt;request&lt;/span&gt;.&lt;span style="color: purple"&gt;TargetWorkflowUniqueId&lt;/span&gt;, &lt;span style="font-weight: bold"&gt;request&lt;/span&gt;.&lt;span style="color: purple"&gt;TargetObjectKey&lt;/span&gt;, &lt;span style="font-weight: bold"&gt;request&lt;/span&gt;.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt;, &lt;span style="font-weight: bold"&gt;request&lt;/span&gt;.&lt;span style="color: purple"&gt;OldValue&lt;/span&gt;)) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                        objectSpace.&lt;span style="color: #008b8b"&gt;Delete&lt;/span&gt;(&lt;span style="font-weight: bold"&gt;request&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                        objectSpace.&lt;span style="color: #008b8b"&gt;CommitChanges&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;            }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;At this point our server has all the information it needs to start workflows with arguments taken from persistent &lt;a href="https://github.com/expand/eXpand/blob/master/Xpand/Xpand.ExpressApp.Modules/Workflow/ObjectChangedWorkflows/ObjectChangedXpoStartWorkflowRequest.cs" target="_blank"&gt;ObjectChangeXpoStartWorkFlowRequest&lt;/a&gt; objects. &lt;/p&gt;  &lt;p&gt;I must admit that I have fully enjoyed preparing this post. The decoupled development experienced offered by the WF service oriented model is something that really appeals to me. At the same time XAF’s workflow module implementation made modeling the requirements a simple and enjoyable process. As usual it was possible to work directly on the problem and leave the hard work to non XAF developers. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-1700412243453996193?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FJXrA3kDPWj4qBz7quV0qLjf2fA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FJXrA3kDPWj4qBz7quV0qLjf2fA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FJXrA3kDPWj4qBz7quV0qLjf2fA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FJXrA3kDPWj4qBz7quV0qLjf2fA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/uPdCVtgjKk8" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T17:31:13.071+02:00</app:edited><media:thumbnail url="http://lh4.ggpht.com/-Ntee52DYg_A/Ttdf76txjCI/AAAAAAAABNg/e6ewxxsLuY8/s72-c/image_thumb3.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/12/you-have-changes-i-have-workflow.html</feedburner:origLink></item><item><title>November news</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/_DXHPzT6Ehc/november-news.html</link><category>Montly_News</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 30 Jan 2012 08:31:35 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-4138837407328278471</guid><description>&lt;p&gt; &lt;/p&gt;  &lt;p&gt;The last few months have been exciting here at eXpand. First and foremost the number of you that are contributing to the project has shot up which is great news for all of us! Also (as some of you may have noticed) we have earned ourselves a place in the DevExpress start menu. There has been a flurry of activity on the development side too, as a result we are pleased to offer a host of innovative new features. Finally eXpand is now registered at &lt;a title="http://nuget.org/" href="http://nuget.org/"&gt;http://nuget.org/&lt;/a&gt; so it can be accessed via Visual Studio.&lt;/p&gt;  &lt;h4&gt;&lt;span &gt;Contributors!&lt;/span&gt;&lt;/h4&gt;  &lt;p&gt;First of all we must all say a big thank you to everybody that has been contributing to eXpand in any way. We appreciate your continuing love and support whether in the form of forum posts, code submissions, user suggestions or simply spreading the good word about eXpand! Our community is very healthy right now, I am proud of the fact that eXpand users are collaborating more than ever and sharing their ideas and stories.&lt;/p&gt;  &lt;p&gt;Of course at the same time we must thank DevExpress for their steady support and the trust that they have placed in eXpand. By allowing eXpand a place in their start menu it’s not even easier for us to share our framework with other &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt; developers.&lt;/p&gt;  &lt;p&gt;To all those who are ready to take the leap and start contributing to our framework I can promise that being part of our community means a full share in all of the benefits. Of course the more we all contribute the more benefits there will be!&lt;/p&gt;  &lt;h4&gt;Latest Collaborations&lt;/h4&gt;  &lt;p&gt;I could talk about new features here, however I have deliberately chosen the word ‘collaborations’ in recognition of the fact that these developments are a direct result of your contributions to eXpand. It is clear that to list all of our collaborations here would take too long, but lets take a look at some of the most successful so far;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Masterdetail       &lt;br /&gt;      &lt;br /&gt;&lt;/strong&gt;Offers support for actions state synchronization between master detail frames.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;LayoutViewGridListEditor       &lt;br /&gt;      &lt;br /&gt;&lt;/strong&gt;Enables LayoutView mode in the GridControl in List Views as in &lt;a href="http://www.devexpress.com/Support/Center/p/E1486.aspx" target="_blank"&gt;E1486&lt;/a&gt;.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Setup version&lt;/strong&gt;      &lt;br /&gt;    &lt;br /&gt;In order to make distinguishing between versions easier we have used a version dedicated name for our setup.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Wizard       &lt;br /&gt;      &lt;br /&gt;&lt;/strong&gt;Offers support for domain components.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Caching support       &lt;br /&gt;      &lt;br /&gt;&lt;/strong&gt;Enables caching at client and server by using a setting in the application config file.  &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Toolbox       &lt;br /&gt;      &lt;br /&gt;&lt;/strong&gt;When compiling our sources all eXpand assemblies will be auto registered to VS toolbox. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;What's next?&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;More modules that will prove the simplicity and power of XAF from dedicated coders. In addition we are redesigning our site in order to establish better collaboration with all of you. We see this as an opportunity through XAF modularized architecture to share our experiences in order to give our business more relaxed weekends. We believe that with your help our job will become much easier, especially since DX is also here to guide us!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-4138837407328278471?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yKzc70uEJUIC24WWakZj2ibVZrA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yKzc70uEJUIC24WWakZj2ibVZrA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yKzc70uEJUIC24WWakZj2ibVZrA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yKzc70uEJUIC24WWakZj2ibVZrA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/_DXHPzT6Ehc" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T18:31:35.131+02:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/11/november-news.html</feedburner:origLink></item><item><title>Creating a State Machine module for eXpand Framework–Part 2</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/8ZCNSKGYLiY/creating-state-machine-module-for.html</link><category>Xaf</category><category>statemachine</category><category>DX</category><category>Xpandstatemachine</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 30 Jan 2012 07:57:06 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-6075732674129446103</guid><description>&lt;p&gt;&lt;u&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/u&gt;    &lt;br /&gt;&lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/08/08/creating-a-state-machine-module-for-expandframework-part-1.aspx" target="_blank"&gt;Part 1&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this post we are going to enhance the State Machine module UI. Remember that along with all the usual &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt; goodies we can now use Xpand code base which gives us a lot more options. Our StateMachineTransitionPermission has 2 lookups, StateMachineName and StateMachine. Our goal is to populate both of these cascading lookups without creating a platform specific module.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;StateMachineNames&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Creating lookups is a common scenario for which Xpand provides a set of property editors and controllers. By contrast with other business frameworks XAF allows maximum flexibility. Therefore in most cases we are able to code in such a generic way that everything could live in separate frameworks such as eXpand. Now, in order to populate the StateMachine name I am going to derive a new controller from a specialized abstract controller which is Xpand.ExpressApp.SystemModule.PopulateController&amp;lt;T&amp;gt;. This controller uses the &lt;a href="http://documentation.devexpress.com/#Xaf/DevExpressExpressAppModelIModelCommonMemberViewItem_PredefinedValuestopic" target="_blank"&gt;PredefinedValues&lt;/a&gt; attribute of the XAF model. When filling the attribute with a set of values separated by semicolons XAF will create a lookup with these values targeting each supported platform.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-oByvB7j2soU/Tnw6zE55mHI/AAAAAAAABNE/HLyCfhAViiw/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-thBGm2vIRT0/Tnw6z8v-jzI/AAAAAAAABNI/xOgqLAr6qlQ/image_thumb2.png?imgmax=800" width="637" height="192" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;However, if at runtime we set the value of the PredefinedValues attribute this will be written at model’s lastlayer and it will make it dirty. We want to avoid this because we want to leave the lastlayer intact.. To cater for this need the populate controller uses a hack. First it stores the lastlayer in a variable then removes it from the model’s layers collection. As a result it is possible to modify the new lastlayer as shown in the Populate method and then return the clean old one to its place. Now the model has all the necessary information with a clean userdiffs layer and while XAF is creating a new view can get the PredefinedValues string from it and create the lookups. &lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;abstract&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;PopulateController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;T&lt;/span&gt;&amp;gt; : &lt;span style="color: #00008b"&gt;ViewController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ObjectView&lt;/span&gt;&amp;gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;…&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    …&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/p&gt;    &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    protected&lt;/span&gt; &lt;span style="color: blue"&gt;virtual&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;Populate&lt;/span&gt;(&lt;span style="color: #00008b"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;IModelMember&lt;/span&gt;, &lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; collect) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; name = &lt;span style="color: purple"&gt;PropertyName&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (name != &lt;span style="color: blue"&gt;null&lt;/span&gt;) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;var&lt;/span&gt; model = ((&lt;span style="color: #00008b"&gt;ModelApplicationBase&lt;/span&gt;)&lt;span style="color: purple"&gt;Application&lt;/span&gt;.&lt;span style="color: purple"&gt;Model&lt;/span&gt;);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;var&lt;/span&gt; lastLayer = model.&lt;span style="color: purple"&gt;LastLayer&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            model.&lt;span style="color: #008b8b"&gt;RemoveLayer&lt;/span&gt;(lastLayer);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            &lt;span style="color: #008b8b"&gt;PopulateCore&lt;/span&gt;(collect, name);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            model.&lt;span style="color: #008b8b"&gt;AddLayer&lt;/span&gt;(lastLayer);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;       }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;   }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    private&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;PopulateCore&lt;/span&gt;(&lt;span style="color: #00008b"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;IModelMember&lt;/span&gt;, &lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; collect, &lt;span style="color: blue"&gt;string&lt;/span&gt; propertyName) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;IModelMember&lt;/span&gt; modelMember = &lt;span style="color: purple"&gt;View&lt;/span&gt;.&lt;span style="color: purple"&gt;Model&lt;/span&gt;.&lt;span style="color: purple"&gt;ModelClass&lt;/span&gt;.&lt;span style="color: purple"&gt;AllMembers&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;FirstOrDefault&lt;/span&gt;(member =&amp;gt; member.&lt;span style="color: purple"&gt;Name&lt;/span&gt; == propertyName);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (modelMember != &lt;span style="color: blue"&gt;null&lt;/span&gt;) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;            modelMember.&lt;span style="color: purple"&gt;PredefinedValues&lt;/span&gt; = collect.&lt;span style="color: #008b8b"&gt;Invoke&lt;/span&gt;(modelMember);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/div&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    …&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    …&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;   }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt; Although this seems like a complicated explanation users need not be intimidated! The implementation of our controller that will populate all StateMachineNames is as simple as this,     &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachinePopulateController&lt;/span&gt; : &lt;span style="color: #00008b"&gt;PopulateController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;&amp;gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPredefinedValues&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IModelMember&lt;/span&gt; wrapper) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;XpoStateMachine&lt;/span&gt;&amp;gt; xpoStateMachines = &lt;span style="color: purple"&gt;ObjectSpace&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetObjects&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;XpoStateMachine&lt;/span&gt;&amp;gt;(&lt;span style="color: blue"&gt;null&lt;/span&gt;);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; xpoStateMachines.&lt;span style="color: #008b8b"&gt;Select&lt;/span&gt;(machine =&amp;gt; machine.&lt;span style="color: purple"&gt;Name&lt;/span&gt;).&lt;span style="color: #008b8b"&gt;AggregateWith&lt;/span&gt;(&lt;span style="color: #a31515"&gt;";"&lt;/span&gt;);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: #00008b"&gt;Expression&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;&amp;gt; &lt;span style="color: #008b8b"&gt;GetPropertyName&lt;/span&gt;() {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; permission =&amp;gt; permission.&lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;}&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;   &lt;/div&gt; &lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;The first thing we did was to provide the propertyName in the GetPropertyName method. Then using the GetPredifinedalues method we return the semincolon delimited string with the machine names. This very simple controller is capable of populating the statemachine lookup for win and web platforms!.&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt; &lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;&lt;u&gt;StateCaptions&lt;/u&gt;&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;&lt;u&gt;&lt;/u&gt;&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;This is a cascading lookup and as a result when the current StateMachineName changes it needs to provide a list of all its StateCaptions. To this end we are going to use a specialized property editor, Xpand’s StringLookupEditor. This supports the &lt;a href="http://documentation.devexpress.com/#Xaf/clsDevExpressPersistentBaseDataSourcePropertyAttributetopic" target="_blank"&gt;DataSourceProperty&lt;/a&gt; XAF attribute which will be used to provide the StateCaption collection. Moreover when using Xpand it is possible to mark editors with an interface and host it in a transparent module. We can then use the Xpand PropertyEditor attribute with the type of the interface as parameter to tell XAF which propertyeditor will be created at runtime. Finally we need to apply all these along with an ImmediatePostData to the StateMachineName property. The permission will look like this,&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt; &lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;ImmediatePostData&lt;/span&gt;]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//IStringLookupPropertyEditor lives in Xpand.ExpressApp assembly&lt;/span&gt;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//Xpand.ExpressApp.Web.PropertyEditors.StringLookupPropertyEditor, Xpand.ExpressApp.Win.PropertyEditors.StringLookupPropertyEditor inherit from IStringLookupPropertyEditor&lt;/span&gt;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;PropertyEditor&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IStringLookupPropertyEditor&lt;/span&gt;))]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;DataSourceProperty&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"StateCaptions"&lt;/span&gt;)]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;StateCaption&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;       &lt;p style="margin: 0px"&gt;&lt;span style="color: #00008b"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; &lt;span style="color: purple"&gt;_stateCaptions&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;();&lt;/p&gt;        &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;Browsable&lt;/span&gt;(&lt;span style="color: blue"&gt;false&lt;/span&gt;)]&lt;/p&gt;        &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; &lt;span style="color: purple"&gt;StateCaptions&lt;/span&gt; {&lt;span style="color: #008b8b"&gt;get&lt;/span&gt; {&lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: purple"&gt;_stateCaptions&lt;/span&gt;;}}&lt;/p&gt;     &lt;/div&gt;   &lt;/div&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;If you look carefully at this code however you may notice that _&lt;span style="color: purple"&gt;_stateCaptions &lt;/span&gt;count is always zero. Let me remind you here that the StateMachineTransitionPermission is a non persistent sessionless object. This means that the object is not handled by an ObjectSpace therefore a call like ObjectSpace.FindObjectSpaceByObject(this) will always return null. In addition the permission does not implement INotifyPropertyChanged so we need to synchronize the class just before the &lt;span style="color: purple"&gt;StateCaptions&lt;/span&gt; are requested. Below you can see a modified version of the StateMachinePopulateController,&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;       &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachinePopulateController&lt;/span&gt; : &lt;span style="color: #00008b"&gt;PopulateController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;&amp;gt; {&lt;/p&gt;        &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;OnViewControlsCreated&lt;/span&gt;() {&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;OnViewControlsCreated&lt;/span&gt;();&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; stringLookupPropertyEditor = &lt;span style="color: #008b8b"&gt;GetPropertyEditor&lt;/span&gt;(permission =&amp;gt; permission.&lt;span style="color: purple"&gt;StateCaption&lt;/span&gt;) &lt;span style="color: blue"&gt;as&lt;/span&gt; &lt;span style="color: #00008b"&gt;IStringLookupPropertyEditor&lt;/span&gt;;&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (stringLookupPropertyEditor != &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;/p&gt;        &lt;p style="margin: 0px"&gt;            stringLookupPropertyEditor.&lt;span style="color: fuchsia"&gt;ItemsCalculating&lt;/span&gt; &lt;span style="color: #008b8b"&gt;+=&lt;/span&gt; &lt;span style="color: #008b8b"&gt;StringLookupPropertyEditorOnItemsCalculating&lt;/span&gt;;&lt;/p&gt;        &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;        &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;StringLookupPropertyEditorOnItemsCalculating&lt;/span&gt;(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #00008b"&gt;HandledEventArgs&lt;/span&gt; handledEventArgs) {&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; propertyEditor = &lt;span style="color: #008b8b"&gt;GetPropertyEditor&lt;/span&gt;(permission =&amp;gt; permission.&lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt;);&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (propertyEditor != &lt;span style="color: blue"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style="color: purple"&gt;View&lt;/span&gt;.&lt;span style="color: purple"&gt;IsControlCreated&lt;/span&gt;) {&lt;/p&gt;        &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;var&lt;/span&gt; stateMachineTransitionPermission = ((&lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;)&lt;span style="color: purple"&gt;View&lt;/span&gt;.&lt;span style="color: purple"&gt;CurrentObject&lt;/span&gt;);&lt;/p&gt;        &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;var&lt;/span&gt; readOnlyCollection = &lt;span style="color: #008b8b"&gt;GetStateCaptions&lt;/span&gt;(propertyEditor);&lt;/p&gt;        &lt;p style="margin: 0px"&gt;            stateMachineTransitionPermission.&lt;span style="color: #008b8b"&gt;SyncStateCaptions&lt;/span&gt;(readOnlyCollection, propertyEditor.&lt;span style="color: purple"&gt;ControlValue&lt;/span&gt; &lt;span style="color: blue"&gt;as&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt;);&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;        &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;        &lt;p style="margin: 0px"&gt; &lt;/p&gt;        &lt;p style="margin: 0px"&gt;    &lt;span style="color: #00008b"&gt;ReadOnlyCollection&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; &lt;span style="color: #008b8b"&gt;GetStateCaptions&lt;/span&gt;(&lt;span style="color: #00008b"&gt;PropertyEditor&lt;/span&gt; propertyEditor) {&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; stateMachineName = propertyEditor.&lt;span style="color: purple"&gt;ControlValue&lt;/span&gt; &lt;span style="color: blue"&gt;as&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt;;&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: purple"&gt;ObjectSpace&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetObjects&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;XpoState&lt;/span&gt;&amp;gt;(state =&amp;gt; state.&lt;span style="color: purple"&gt;StateMachine&lt;/span&gt;.&lt;span style="color: purple"&gt;Name&lt;/span&gt; == stateMachineName).&lt;span style="color: #008b8b"&gt;Select&lt;/span&gt;(&lt;/p&gt;        &lt;p style="margin: 0px"&gt;                state =&amp;gt; state.&lt;span style="color: purple"&gt;Caption&lt;/span&gt;).&lt;span style="color: #008b8b"&gt;ToList&lt;/span&gt;().&lt;span style="color: #008b8b"&gt;AsReadOnly&lt;/span&gt;();&lt;/p&gt;        &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;     &lt;/div&gt;   &lt;/div&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;Finally we add the new &lt;span style="color: #008b8b"&gt;SyncStateCaptions &lt;/span&gt;method and the full version of the permission will be,&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;NonPersistent&lt;/span&gt;]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt; : &lt;span style="color: #00008b"&gt;PermissionBase&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    …&lt;/span&gt;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    …&lt;/span&gt;&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;ImmediatePostData&lt;/span&gt;]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;PropertyEditor&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IStringLookupPropertyEditor&lt;/span&gt;))]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;DataSourceProperty&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"StateCaptions"&lt;/span&gt;)]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;StateCaption&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;      &lt;p style="margin: 0px"&gt; &lt;/p&gt;      &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;       &lt;p style="margin: 0px"&gt;&lt;span style="color: #00008b"&gt;    IList&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; &lt;span style="color: purple"&gt;_stateCaptions&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;();&lt;/p&gt;        &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;Browsable&lt;/span&gt;(&lt;span style="color: blue"&gt;false&lt;/span&gt;)]&lt;/p&gt;        &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    public&lt;/span&gt; &lt;span style="color: #00008b"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; &lt;span style="color: purple"&gt;StateCaptions&lt;/span&gt; {&lt;span style="color: #008b8b"&gt;get&lt;/span&gt; {&lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: purple"&gt;_stateCaptions&lt;/span&gt;;}}&lt;/p&gt;        &lt;p style="margin: 0px"&gt; &lt;/p&gt;        &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;SyncStateCaptions&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; stateCaptions, &lt;span style="color: blue"&gt;string&lt;/span&gt; machineName) {&lt;/p&gt;        &lt;p style="margin: 0px"&gt;        &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt; = machineName;&lt;/p&gt;        &lt;p style="margin: 0px"&gt;       &lt;span style="color: purple"&gt;_stateCaptions&lt;/span&gt; = stateCaptions;&lt;/p&gt;        &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;     &lt;/div&gt;      &lt;p style="margin: 0px"&gt;}&lt;/p&gt;   &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;To support platform independent cascading lookups we wrote only about 10 lines of code! This is proof of how much XAF architecture cuts down on development costs. The module can be downloaded from the Xpand &lt;a href="http://www.blogger.com/expandframework.com/downloads/download.html" target="_blank"&gt;download page&lt;/a&gt;   and we are happy to hear your feedback. Remember that your questions are the best candidates for future posts!&lt;/p&gt;  &lt;p&gt;&lt;iframe style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" height="360" src="http://tv.devexpress.com/embed.aspx?friendlyId=XAFStateMachineModule&amp;amp;autostart=false" frameborder="0" width="640" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-6075732674129446103?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mnIy8AaSiwVh4Ose41OKkPR3lEY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mnIy8AaSiwVh4Ose41OKkPR3lEY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mnIy8AaSiwVh4Ose41OKkPR3lEY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mnIy8AaSiwVh4Ose41OKkPR3lEY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/8ZCNSKGYLiY" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T17:57:06.459+02:00</app:edited><media:thumbnail url="http://lh6.ggpht.com/-thBGm2vIRT0/Tnw6z8v-jzI/AAAAAAAABNI/xOgqLAr6qlQ/s72-c/image_thumb2.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/09/creating-state-machine-module-for.html</feedburner:origLink></item><item><title>Calculated members creation—Pros and Cons</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/yJ-4kQMm8xA/calculated-members-creationpros-and.html</link><category>DX</category><category>Runtime Members</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Tue, 20 Sep 2011 13:45:30 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-7021560579692033735</guid><description>&lt;p&gt;As promised in the previous post I will now attempt to provide a concise yet comprehensive look at the 5 possibilities that Xpand gives us when we want to create a calculated member. I will also provide discussion of the relative advantages and disadvantages of each approach. We can see all of them in action in Xpand FeatureCenter application. Remember it is only thanks to the fact that XAF/XPO have such a strong and flexible architecture that this is possible! We must also acknowledge that these approaches have evolved as a direct result of contributions from the XAF team and community.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-huIrT7gotOk/Tnj7O2s0v7I/AAAAAAAABMM/EEKO19AJ-hM/s1600-h/image_thumb11%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb11" border="0" alt="image_thumb11" src="http://lh4.ggpht.com/-L7HKbL861U8/Tnj7QPYD4UI/AAAAAAAABMQ/8AIzBGPzooo/image_thumb11_thumb.png?imgmax=800" width="194" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;1. &lt;u&gt;The XPO way –&amp;gt;Using Code &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Take a look at the CreateCalculabeMember extension method in the code below,&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;CreateRuntimeCalculatedFieldController&lt;/span&gt; : &lt;span style="color: #00008b"&gt;ViewController&lt;/span&gt; {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;CustomizeTypesInfo&lt;/span&gt;(&lt;span style="color: #00008b"&gt;DevExpress&lt;/span&gt;.&lt;span style="color: #00008b"&gt;ExpressApp&lt;/span&gt;.&lt;span style="color: #00008b"&gt;DC&lt;/span&gt;.&lt;span style="color: #00008b"&gt;ITypesInfo&lt;/span&gt; typesInfo) {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;CustomizeTypesInfo&lt;/span&gt;(typesInfo);&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: #00008b"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; XPClassInfo&lt;/span&gt; classInfo = &lt;span style="color: #00008b"&gt;XafTypesInfo&lt;/span&gt;.&lt;span style="color: purple"&gt;XpoTypeInfoSource&lt;/span&gt;.&lt;span style="color: purple"&gt;XPDictionary&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetClassInfo&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;Customer&lt;/span&gt;));&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if&lt;/span&gt; (classInfo.&lt;span style="color: #008b8b"&gt;FindMember&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;SumOfOrderTotals&amp;quot;&lt;/span&gt;)==&lt;span style="color: blue"&gt;null&lt;/span&gt;) {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var&lt;/span&gt; attributes = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;Attribute&lt;/span&gt;[] {&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;PersistentAliasAttribute&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Orders.Sum(Total)&amp;quot;&lt;/span&gt;)};&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: #00008b"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; XPCustomMemberInfo&lt;/span&gt; calculabeMember = classInfo.&lt;span style="color: #008b8b"&gt;CreateCalculabeMember&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;SumOfOrderTotals&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue"&gt;float&lt;/span&gt;), attributes);&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; typesInfo.&lt;span style="color: #008b8b"&gt;RefreshInfo&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;Customer&lt;/span&gt;));&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;}&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;font color="#000000" size="2" face="Consolas"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;XPO has a &lt;a href="http://documentation.devexpress.com/#XPO/clsDevExpressXpoMetadataReflectionDictionarytopic" target="_blank"&gt;dictionary&lt;/a&gt; of domain metadata. The metadata of each persistent object is stored in &lt;a href="http://documentation.devexpress.com/#XPO/clsDevExpressXpoMetadataXPClassInfotopic" target="_blank"&gt;XPClassInfo&lt;/a&gt; classes and the metadata of their properties is stored in &lt;a href="http://documentation.devexpress.com/#XPO/clsDevExpressXpoMetadataXPMemberInfotopic" target="_blank"&gt;XPMemberInfo&lt;/a&gt; classes. One of the main advantages of this approach is that it&amp;#160; adds a new member to the XPO dictionary and therefore follows XAF to the letter. This is because in order to form the model XAF first queries the XPO dictionary and finally in order to configure the views it queries the model. Since we have worked in the data layer our calculated values will be sent to any data bound enabled control for rendering. The other benefit is that if we code there are no restrictions on what we can do, for example we can create members calling a WCF service. The sky’s the limit!&lt;/p&gt;  &lt;p&gt;On the other hand each time we write new code we need to spend time testing and distributing it. Furthermore in certain scenarios problems can occur due to the fact that we add a new member to the object. For each new member we add to an object we are forced to deal with long properties lists in our model which can be somewhat unwieldy – imagine an&amp;#160; object with 200 properties.&lt;/p&gt;  &lt;p&gt;Note; XAF is smart enough to manage all of this without even breaking a sweat. This means that its performance does not suffer in any way. It is simply that this approach can leave the user with a bit of a headache! &lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&lt;strong&gt;2. &lt;u&gt;Using the model&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&lt;u&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&lt;u&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&lt;u&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;We have extended our model in order to describe all types of calculated and runtime properties. &lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-Hyq7o5BE3MI/Tnj7Q64FAzI/AAAAAAAABMU/wpuTS57_3g0/s1600-h/image_thumb14_thumb%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb14_thumb" border="0" alt="image_thumb14_thumb" src="http://lh6.ggpht.com/-G3912644cvU/Tnj7R35mQ9I/AAAAAAAABMY/tpIp0T9Mhyo/image_thumb14_thumb_thumb.png?imgmax=800" width="244" height="95" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;Having done this makes it pretty easy to utilize the powerful XPO and add members in its dictionary as with the previous approach. This means this method shares some of the benefits we mentioned above. However as we are not writing code we can’t enjoy the same level of flexibility unless we utilize &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3315" target="_blank"&gt;ModelUpdaters&lt;/a&gt;. Also as the columns can only be created using model editor they are only useful in situations when we have permission to modify the model. Finally we could end up with a huge number of properties here too for the same reason we identified previously.&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin: 0px" align="justify"&gt;All this is not to say that this approach doesn’t have its own unique advantages. For example the model difference can be stored in a database or xml file making it easy to distribute. To this end we can use the build in API or a specialized module like &lt;a href="http://www.expandframework.com/#IO" target="_blank"&gt;IO&lt;/a&gt;. Moreover it is possible to develop on site (client). Of course working at the model level allows us to use a model manager module like &lt;a href="http://www.expandframework.com/#modeldifference" target="_blank"&gt;ModelDifference&lt;/a&gt; which is a great aid. It can be used to distribute the unbound columns to users, roles and even to other applications. In addition since ModelDifference supports both platforms it is possible to create calculated members without restarting the application or IIS.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;3.&lt;/strong&gt;&lt;u&gt;&lt;strong&gt;WorldCreator extended members&lt;/strong&gt; &lt;/u&gt;&lt;/p&gt;  &lt;p align="justify"&gt;This module maps the structure of the &lt;a href="http://documentation.devexpress.com/#XPO/clsDevExpressXpoMetadataXPMemberInfotopic" target="_blank"&gt;XPMemberInfo&lt;/a&gt; class to a persistent object. This approach is again similar to model approach (and once again has similar benefits) however there is a crucial difference. Instead of using the model to gather data to form the calculated members we use the input taken from the UI. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-4ByhwegYf7w/Tnj7S6CwzTI/AAAAAAAABMc/uJqO1sCFmMY/s1600-h/image_thumb17_thumb%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb17_thumb" border="0" alt="image_thumb17_thumb" src="http://lh6.ggpht.com/-jQ7yiXYwZTA/Tnj7TitHpUI/AAAAAAAABMg/ArvYXDBfjto/image_thumb17_thumb_thumb.png?imgmax=800" width="244" height="172" /&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-CXpDgyF5Q7Q/Tnj7UM2CjiI/AAAAAAAABMk/wsdkaCDRBr0/s1600-h/image_thumb20_thumb%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb20_thumb" border="0" alt="image_thumb20_thumb" src="http://lh5.ggpht.com/-WbBDoajd7Ao/Tnj7VZnrtXI/AAAAAAAABMo/WcbQhETlo8I/image_thumb20_thumb_thumb.png?imgmax=800" width="244" height="223" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Using the UI is simplicity itself! It requires no technical knowledge whatsoever as the user is only required to choose from a set of basic options. We can still code if we wish, this time by creating persistent objects and then leaving eXpand to take care of the rest. That being said the real beauty of this approach is that the product can be developed on site without the user having to write a single line of code or using a sophisticated tool like &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument2830" target="_blank"&gt;Model Editor&lt;/a&gt;. Moreover we can enjoy ease of distribution due to the fact that our objects are stored in the database. As the metadata is now in the form of persistent objects locating it and working with it is as easy as ever. &lt;/p&gt;  &lt;p align="justify"&gt;By now it should be clear that as we are still relying on XPO we are faced with the same old problem regarding multiple views.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;4.&lt;/strong&gt; &lt;u&gt;&lt;strong&gt;Using a WordCreator Dynamic Assembly&lt;/strong&gt; &lt;/u&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Our fourth approach uses the same module to create dynamic persistent assemblies using code generation templates. &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt; is the best framework to describe domains which is evidenced by the way that&amp;#160; WorldCreator maps the Assembly structure to persistent objects and auto generates a flexible UI.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-Wo3hClz0Gak/Tnj7Ws9hXkI/AAAAAAAABMs/dBkVMxKsk1c/s1600-h/image_thumb23_thumb%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb23_thumb" border="0" alt="image_thumb23_thumb" src="http://lh5.ggpht.com/-nQ6LSQUbUwg/Tnj7XrbSEEI/AAAAAAAABMw/ybvN1vNhYd0/image_thumb23_thumb_thumb.png?imgmax=800" width="192" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Using the templates will create a dynamic assembly with exactly the same code and structure as if we had taken the time to design it ourselves inside VS. Distribution is still easy since is everything is in the database. The fact that we script at runtime means that our options are almost unlimited when taking this approach.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;5. &lt;u&gt;The Unbound Column&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Extending the model with an Unbound column node as shown makes it possible to create Unbound grid columns and set their unbound expressions.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-XM4m4bDzif4/Tnj7YLFvK9I/AAAAAAAABM0/BCXW1Q2asGo/s1600-h/image_thumb2%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb2" border="0" alt="image_thumb2" src="http://lh5.ggpht.com/-H7VEUa5_ktQ/Tnj7Yz_JWQI/AAAAAAAABM4/sJE_TdfIW0M/image_thumb2_thumb.png?imgmax=800" width="244" height="50" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-_AJrr1d5jhw/Tnj7ZUIsTlI/AAAAAAAABM8/BR826DfQBbA/s1600-h/image_thumb5%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb5" border="0" alt="image_thumb5" src="http://lh6.ggpht.com/-XSZNdLyUSdA/Tnj7aE-ZSEI/AAAAAAAABNA/t3a6VNeFmtM/image_thumb5_thumb.png?imgmax=800" width="244" height="75" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;This is the only approach that allows us to work directly on views without utilizing XPO. This means that we gain the maximum level of flexibility since it is possible to have different columns for the same object views. Therefore we can work on this column independently. At the same time the end user can change the UnboundExpression at runtime using &lt;a href="http://documentation.devexpress.com/#WindowsForms/CustomDocument6212" target="_blank"&gt;expression editor&lt;/a&gt; (windows only). When it comes to distribution we find the same advantages as we do whenever we deal with the model.&lt;/p&gt;  &lt;p align="justify"&gt;As with the second approach we lose some flexibility because we are not writing code but again we can get round this using &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3315" target="_blank"&gt;ModelUpdaters&lt;/a&gt;. In addition our columns still cannot be used when we do not have permission to modify the model. Another disadvantage concerns the fact that XAF is designed to make all calculations in the data layer and send the values to controls by applying an MVC pattern. A few years after XAF was released, Microsoft built Silverlight featuring very similar architecture. Taking into account the various factors this has been recognized as the optimal approach. Although using Unbound columns allows us to work in a different way we need to write extra code to support each control (Tree, Pivot etc) because the calculations are performed in the UI.&lt;/p&gt;  &lt;p align="justify"&gt;   &lt;br /&gt;We are happy to read your feedback about this!. Remember that your questions are the best candidates for future posts.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-7021560579692033735?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mKl0oWmW-kYfRDqyi17ZXXMvkO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mKl0oWmW-kYfRDqyi17ZXXMvkO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mKl0oWmW-kYfRDqyi17ZXXMvkO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mKl0oWmW-kYfRDqyi17ZXXMvkO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/yJ-4kQMm8xA" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-20T23:45:30.598+03:00</app:edited><media:thumbnail url="http://lh4.ggpht.com/-L7HKbL861U8/Tnj7QPYD4UI/AAAAAAAABMQ/8AIzBGPzooo/s72-c/image_thumb11_thumb.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/09/calculated-members-creationpros-and.html</feedburner:origLink></item><item><title>eXpandFrameWork Supporting Unbound Columns</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/j0Uip8vavJg/expandframework-supporting-unbound.html</link><category>Xaf</category><category>DX</category><category>Runtime Members</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Fri, 16 Sep 2011 06:46:55 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-1134080336222333020</guid><description>&lt;p align="justify"&gt;Recently in Xpand forums &lt;a href="http://www.expandframework.com/forum/profile/userid-338.html" target="_blank"&gt;Dionisis Soldatos&lt;/a&gt; raised a question about how unbound columns can be implemented with &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt;. Unbound columns along with their &lt;a href="http://documentation.devexpress.com/#WindowsForms/DevExpressXtraGridColumnsGridColumn_UnboundExpressiontopic" target="_blank"&gt;UnboundExpression&lt;/a&gt; can be used for creating calculated fields even at runtime. Since we are talking about unbound grid columns it should be obvious that we will operate at the UI level by modifying the grid control columns. However lets do a deep dive inside XAF model to extend it as needed!&lt;/p&gt;  &lt;p align="justify"&gt;&lt;u&gt;The Model&lt;/u&gt;&lt;/p&gt;  &lt;p align="justify"&gt;By now we are all used to XAF providing us with excellent out of the box solutions which negate the need for us to write hundredths of lines of code. This of course means money saved during developing and ultimately your product hits the market faster. Why spend time reinventing the wheel when the XAF team have already done the hard work for you?&lt;/p&gt;  &lt;p align="justify"&gt;XAF creates the model by reading the metadata of our classes, this model has 3 types of view. One of these is the ListView which can be displayed with data source enabled controls like Grid controls. ListView has columns which correspond to existing object properties metadata and when XAF creates a Grid at runtime it queries model’s ListView columns. It then creates and configures Grid columns from their attributes. These stages are well tested and it is preferable to use them in our solution and override the unnecessary stages. For example we could create a normal model column node using XAF default Add/Column menu. After the Grid column is created it we simply need a few lines of code to make it unbound and set its &lt;a href="http://documentation.devexpress.com/#WindowsForms/DevExpressXtraGridColumnsGridColumn_UnboundExpressiontopic" target="_blank"&gt;Unbound Expression&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-ZYYoV-6ZpE0/TnNJ3YXbh0I/AAAAAAAABLs/OJrN-YLv_1c/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-RSqpggGcWto/TnNJ3-L2nEI/AAAAAAAABLw/8YBcCGrDr0A/image_thumb2.png?imgmax=800" width="429" height="92" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt; &lt;/p&gt;  &lt;p align="justify"&gt;In order to store this expression we still need to extend model’s ListView with an attribute. The model can be extended either by registering an interface at &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument2785" target="_blank"&gt;ModuleBase.ExtendModelInterfaces&lt;/a&gt; or by deriving it from an already registered interface. I am going to take the latter options by deriving from &lt;a href="http://documentation.devexpress.com/#Xaf/clsDevExpressExpressAppModelIModelColumntopic" target="_blank"&gt;IModelColumn&lt;/a&gt; interface which I will explain as we go. &lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;interface&lt;/span&gt; &lt;span style="color: #00008b"&gt;IModelColumnUnbound&lt;/span&gt; : &lt;span style="color: #00008b"&gt;IModelColumn&lt;/span&gt; {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt; &lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    [&lt;span style="color: #00008b"&gt;Category&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"eXpand"&lt;/span&gt;)]&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;ShowUnboundExpressionMenu&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt; &lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    [&lt;span style="color: #00008b"&gt;Category&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"eXpand"&lt;/span&gt;)]&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    [&lt;span style="color: #00008b"&gt;Required&lt;/span&gt;]&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;UnboundExpression&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;}&lt;/p&gt;  &lt;p align="justify"&gt;XAF &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument2830" target="_blank"&gt;model editor&lt;/a&gt; is a highly sophisticated tool which has the capability to recognize that we extended the model. It then takes care of the vital step of adding an entry to the Add menu for creating Unbound columns.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-83_gQGo5I14/TnNJ4l1I5QI/AAAAAAAABL0/wGqZ5FDn-Ng/s1600-h/image9.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-NKSvdlSqcuk/TnNJ5L-6R-I/AAAAAAAABL4/gU05ttb8xWc/image_thumb5.png?imgmax=800" width="526" height="101" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Now it is possible to create a new type of column with 2 extra attributes as shown,&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-B2s8mcpPc5s/TnNJ59x_LQI/AAAAAAAABL8/-A-_KIPbF5s/s1600-h/image15.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-05wKYAuci-Q/TnNJ6l76tFI/AAAAAAAABMA/E6PiKl4PPIg/image_thumb8.png?imgmax=800" width="558" height="165" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Moving on we need to set the mandatory PropertyName attribute shown above to an always existing object property name. Remember XAF requires this in order to behave as designed. To this end we are going to set as PropertyName the object’s key property name using this simple &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3169/5" target="_blank"&gt;DomainLogic&lt;/a&gt; class,&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;[&lt;span style="color: #00008b"&gt;DomainLogic&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IModelColumnUnbound&lt;/span&gt;))]&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;IModelColumnUnboundLogic&lt;/span&gt; {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: #008b8b"&gt;Get_PropertyName&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IModelColumnUnbound&lt;/span&gt; columnUnbound) {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; ((&lt;span style="color: #00008b"&gt;IModelListView&lt;/span&gt;)columnUnbound.&lt;span style="color: purple"&gt;Parent&lt;/span&gt;.&lt;span style="color: purple"&gt;Parent&lt;/span&gt;).&lt;span style="color: purple"&gt;ModelClass&lt;/span&gt;.&lt;span style="color: purple"&gt;KeyProperty&lt;/span&gt;;&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    }&lt;/p&gt;  &lt;p align="justify"&gt;As a result (PropertyName, PropertyEditorType and Caption) attributes will be populated the next time we create a ColumnUnbound Node. However these will be fixed values and it is preferable to hide them from the end user. At the same time we need to mark Caption attribute as required and remove its default value. To do all of this we just need to extend our IModelColumnUnbound interface like this,&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-SpoBsIxV2-s/TnNJ7KU_avI/AAAAAAAABME/CkT8QPBOUSk/s1600-h/image20.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-XXyyHvB2w4A/TnNJ7_dJ7hI/AAAAAAAABMI/skhnXmg49Js/image_thumb11.png?imgmax=800" width="646" height="324" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Note; Although PropertyName and Caption belong to &lt;a href="http://documentation.devexpress.com/#Xaf/clsDevExpressExpressAppModelIModelColumntopic" target="_blank"&gt;IModelColumn&lt;/a&gt; using the new operator it is possible to override them!&lt;/p&gt;  &lt;p align="justify"&gt;We have now finished with the model modifications and for our ColumnUnbound nodes XAF by design will create a new column pointing back to object’s key property metadata.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;u&gt;The UI&lt;/u&gt;&lt;/p&gt;  &lt;p align="justify"&gt;A key benefit of XAF’s commitment to design patterns, specifically to the &lt;a href="http://tv.devexpress.com/#SingleResponsibilityPrinciple" target="_blank"&gt;Single responsibility principle&lt;/a&gt;, is that it provides us with the model’s synchronizer classes. These can be used to synchronize our model with the control and vice versa. It is only necessary to derive from the abstract ModelSyncroniser&amp;lt;T,V&amp;gt; and implement ApplyModeCore method to synchronize the control and from SynchronizeModel to do the same with the model.&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span class="Apple-style-span" style="color: rgb(0, 0, 139); "&gt;UnboundColumnSynchronizer&lt;/span&gt;: &lt;span style="color: #00008b"&gt;ModelSynchronizer&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;GridListEditor&lt;/span&gt;, &lt;span style="color: #00008b"&gt;IModelListView&lt;/span&gt;&amp;gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;UnboundColumnSynchronizer&lt;/span&gt;(&lt;span style="color: #00008b"&gt;GridListEditor&lt;/span&gt; control, &lt;span style="color: #00008b"&gt;IModelListView&lt;/span&gt; model)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(control, model) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;ApplyModelCore&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; xafGridColumns = &lt;span style="color: #008b8b"&gt;GetXafGridColumns&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue"&gt;var&lt;/span&gt; &lt;span style="font-weight: bold"&gt;column&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; xafGridColumns) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;var&lt;/span&gt; modelColumnUnbound = (&lt;span style="color: #00008b"&gt;IModelColumnUnbound&lt;/span&gt;)&lt;span style="font-weight: bold"&gt;column&lt;/span&gt;.&lt;span style="color: purple"&gt;Model&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="font-weight: bold"&gt;column&lt;/span&gt;.&lt;span style="color: purple"&gt;FieldName&lt;/span&gt; = modelColumnUnbound.&lt;span style="color: purple"&gt;Id&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="font-weight: bold"&gt;column&lt;/span&gt;.&lt;span style="color: purple"&gt;UnboundType&lt;/span&gt; = &lt;span style="color: #00008b"&gt;UnboundColumnType&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Object&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="font-weight: bold"&gt;column&lt;/span&gt;.&lt;span style="color: purple"&gt;OptionsColumn&lt;/span&gt;.&lt;span style="color: purple"&gt;AllowEdit&lt;/span&gt; = &lt;span style="color: blue"&gt;false&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="font-weight: bold"&gt;column&lt;/span&gt;.&lt;span style="color: purple"&gt;ShowUnboundExpressionMenu&lt;/span&gt; = modelColumnUnbound.&lt;span style="color: purple"&gt;ShowUnboundExpressionMenu&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="font-weight: bold"&gt;column&lt;/span&gt;.&lt;span style="color: purple"&gt;UnboundExpression&lt;/span&gt; = modelColumnUnbound.&lt;span style="color: purple"&gt;UnboundExpression&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: #00008b"&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;XafGridColumn&lt;/span&gt;&amp;gt; &lt;span style="color: #008b8b"&gt;GetXafGridColumns&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;XafGridColumn&lt;/span&gt;&amp;gt; xafGridColumns =&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: purple"&gt;Model&lt;/span&gt;.&lt;span style="color: purple"&gt;Columns&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;OfType&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;IModelColumnUnbound&lt;/span&gt;&amp;gt;().&lt;span style="color: #008b8b"&gt;Select&lt;/span&gt;(&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                unbound =&amp;gt; &lt;span style="color: purple"&gt;Control&lt;/span&gt;.&lt;span style="color: purple"&gt;GridView&lt;/span&gt;.&lt;span style="color: purple"&gt;Columns&lt;/span&gt;[unbound.&lt;span style="color: purple"&gt;PropertyName&lt;/span&gt;] &lt;span style="color: blue"&gt;as&lt;/span&gt; &lt;span style="color: #00008b"&gt;XafGridColumn&lt;/span&gt;).&lt;span style="color: #008b8b"&gt;Where&lt;/span&gt;(column =&amp;gt; column != &lt;span style="color: blue"&gt;null&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; xafGridColumns;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;SynchronizeModel&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; xafGridColumns = &lt;span style="color: #008b8b"&gt;GetXafGridColumns&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue"&gt;var&lt;/span&gt; &lt;span style="font-weight: bold"&gt;xafGridColumn&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; xafGridColumns) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            ((&lt;span style="color: #00008b"&gt;IModelColumnUnbound&lt;/span&gt;) &lt;span style="font-weight: bold"&gt;xafGridColumn&lt;/span&gt;.&lt;span style="color: purple"&gt;Model&lt;/span&gt;).&lt;span style="color: purple"&gt;UnboundExpression&lt;/span&gt; = &lt;span style="font-weight: bold"&gt;xafGridColumn&lt;/span&gt;.&lt;span style="color: purple"&gt;UnboundExpression&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt; &lt;/div&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The above code uses the GetXafGridColumns method to return the grid columns that correspond to IModelColumnUnbound nodes. The web implementation is very similar and can be found &lt;a href="https://github.com/expand/eXpand/blob/master/Xpand/Xpand.ExpressApp/Xpand.ExpressApp.Web/SystemModule/UnboundColumnController.cs" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;All that is left is to register our UnboundColumnSynchronizer like this,&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;UnboundColumnController&lt;/span&gt; : &lt;span style="color: #00008b"&gt;ViewController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ListView&lt;/span&gt;&amp;gt; {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;OnActivated&lt;/span&gt;() {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;OnActivated&lt;/span&gt;();&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; gridListEditor = &lt;span style="color: purple"&gt;View&lt;/span&gt;.&lt;span style="color: purple"&gt;Editor&lt;/span&gt; &lt;span style="color: blue"&gt;as&lt;/span&gt; &lt;span style="color: #00008b"&gt;GridListEditor&lt;/span&gt;;&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (gridListEditor != &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;            gridListEditor.&lt;span style="color: fuchsia"&gt;CreateCustomModelSynchronizer&lt;/span&gt; &lt;span style="color: #008b8b"&gt;+=&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GridListEditorOnCreateCustomModelSynchronizer&lt;/span&gt;;&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    }&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt; &lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GridListEditorOnCreateCustomModelSynchronizer&lt;/span&gt;(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #00008b"&gt;CreateCustomModelSynchronizerEventArgs&lt;/span&gt; createCustomModelSynchronizerEventArgs) {&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;        createCustomModelSynchronizerEventArgs.&lt;span style="color: purple"&gt;ModelSynchronizer&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;UnboundColumnSynchronizer&lt;/span&gt;((&lt;span style="color: #00008b"&gt;GridListEditor&lt;/span&gt;)sender, &lt;span style="color: purple"&gt;View&lt;/span&gt;.&lt;span style="color: purple"&gt;Model&lt;/span&gt;);&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;    }&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt;}&lt;/p&gt;  &lt;p style="margin: 0px; font-family: consolas; background: white; color: black; font-size: 10pt" align="justify"&gt; &lt;/p&gt;  &lt;p align="justify"&gt;Note; Setting ShowUnboundExpressionMenu to true is only supported by Windows platform. There, an end user can modify the UnBoundExpression by invoking Grid’s &lt;a href="http://documentation.devexpress.com/#WindowsForms/CustomDocument6212" target="_blank"&gt;expression editor&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Together with the unbound column Xpand allows for up to 5 different approaches to creating calculated fields. In the next post we will discuss the pros and cons of each approach so stay tuned!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-1134080336222333020?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FqC5C0RJGLOd3V1rpbC1VADRbAY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FqC5C0RJGLOd3V1rpbC1VADRbAY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FqC5C0RJGLOd3V1rpbC1VADRbAY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FqC5C0RJGLOd3V1rpbC1VADRbAY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/j0Uip8vavJg" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-16T16:46:55.438+03:00</app:edited><media:thumbnail url="http://lh5.ggpht.com/-RSqpggGcWto/TnNJ3-L2nEI/AAAAAAAABLw/8YBcCGrDr0A/s72-c/image_thumb2.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/09/expandframework-supporting-unbound.html</feedburner:origLink></item><item><title>DevExpress Workflow Instance Store</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/v01RPCJABg4/devexpress-workflow-instance-store.html</link><category>DX</category><category>WF</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Tue, 06 Sep 2011 07:16:49 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-1945755265183148053</guid><description>&lt;p&gt;In version 11.1.7 our team now provides workflow instance support outside &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt; borders! With a few lines of code, it is now possible to store our workflows in any of the 14 database systems described in this &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/08/24/xaf-workflow-persistence-storage.aspx" target="_blank"&gt;post&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Durability is a key benefit of the Workflow Foundation and it is based on the ability to store a running workflow instance on the fly at almost any time.&amp;#160; &lt;br /&gt;To this end Microsoft workflow team implemented the SqlWokflowInstanceStore class. Using this class and a few lines is possible to store workflow instances in SQL Server as shown,&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;// Define SqlWorkflowInstanceStoreBehavior:&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//&amp;#160;&amp;#160; Set interval to renew instance lock to 5 seconds.&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//&amp;#160;&amp;#160; Set interval to check for runnable instances to 2 seconds.&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//&amp;#160;&amp;#160; Instance Store does not keep instances after it is completed.&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//&amp;#160;&amp;#160; Select exponential back-off algorithm when retrying to load a locked instance.&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//&amp;#160;&amp;#160; Instance state information is compressed using the GZip compressing algorithm. &lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #00008b"&gt;SqlWorkflowInstanceStoreBehavior&lt;/span&gt; instanceStoreBehavior = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;SqlWorkflowInstanceStoreBehavior&lt;/span&gt;(&lt;span style="color: purple; font-weight: bold"&gt;connectionString&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;instanceStoreBehavior.&lt;span style="color: purple"&gt;HostLockRenewalPeriod&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt;(0, 0, 5);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;instanceStoreBehavior.&lt;span style="color: purple"&gt;RunnableInstancesDetectionPeriod&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt;(0, 0, 2);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;instanceStoreBehavior.&lt;span style="color: purple"&gt;InstanceCompletionAction&lt;/span&gt; = &lt;span style="color: #00008b"&gt;InstanceCompletionAction&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;DeleteAll&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;instanceStoreBehavior.&lt;span style="color: purple"&gt;InstanceLockedExceptionAction&lt;/span&gt; = &lt;span style="color: #00008b"&gt;InstanceLockedExceptionAction&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;AggressiveRetry&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;instanceStoreBehavior.&lt;span style="color: purple"&gt;InstanceEncodingOption&lt;/span&gt; = &lt;span style="color: #00008b"&gt;InstanceEncodingOption&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;GZip&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;host.&lt;span style="color: purple"&gt;Description&lt;/span&gt;.&lt;span style="color: purple"&gt;Behaviors&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;(instanceStoreBehavior);&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;em&gt;The above code was copied from the &amp;quot;BuiltInConfiguration&amp;quot; demo, &amp;quot;InstanceStore1&amp;quot; project. This demo is described at &amp;quot;Built-in Configuration&amp;quot;        &lt;br /&gt;(&lt;/em&gt;&lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee622978.aspx"&gt;&lt;font size="1"&gt;&lt;em&gt;http://msdn.microsoft.com/en-us/library/ee622978.aspx)&lt;/em&gt;&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt;&lt;em&gt;. You can download full sources of this demo and many others at &amp;quot;WCF and WF Samples for .NET Framework 4&amp;quot;        &lt;br /&gt;(&lt;/em&gt;&lt;/font&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=21459"&gt;&lt;font size="1"&gt;&lt;em&gt;http://www.microsoft.com/download/en/details.aspx?id=21459)&lt;/em&gt;&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt;&lt;em&gt;.&lt;/em&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Following the same architecture our team implemented the DX WorkFlow Instance Store. &lt;a href="http://www.devexpress.com/Products/NET/ORM/" target="_blank"&gt;eXpress Persistent Objects (XPO)&lt;/a&gt; is used for common objects storage and is fully capable of working transparently with &lt;a href="http://documentation.devexpress.com/#XPO/CustomDocument2559" target="_blank"&gt;14 different database systems&lt;/a&gt;. For example to provide support for an Oracle database we could write,&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//We create or connect to a database by setting the connectionstring &lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;//&lt;span style="color: green"&gt;This code will create 2 tables (XpoWorkflowInstance, XpoInstanceKeyc) in the database &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt; (&lt;span style="color: blue"&gt;var&lt;/span&gt; session = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;Session&lt;/span&gt;()) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; session.&lt;span style="color: purple"&gt;ConnectionString&lt;/span&gt; = &lt;span style="color: #a31515"&gt;&amp;quot;Data Source=DevExpressInstanceStore;User Id=myUsername;Password=myPassword&amp;quot;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; session.&lt;span style="color: #008b8b"&gt;UpdateSchema&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;XpoWorkflowInstance&lt;/span&gt;), &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;XpoInstanceKey&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; session.&lt;span style="color: #008b8b"&gt;CreateObjectTypeRecords&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;XpoWorkflowInstance&lt;/span&gt;), &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;XpoInstanceKey&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;// Define WorkflowInstanceStoreBehavior:&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;var&lt;/span&gt; dxInstanceStoreBehavior = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;WorkflowInstanceStoreBehavior&lt;/span&gt;(&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;XpoWorkflowInstance&lt;/span&gt;), &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;XpoInstanceKey&lt;/span&gt;), &lt;span style="color: purple; font-weight: bold"&gt;DevExpressConnectionString&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;host.&lt;span style="color: purple"&gt;Description&lt;/span&gt;.&lt;span style="color: purple"&gt;Behaviors&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;(dxInstanceStoreBehavior);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;dxInstanceStoreBehavior.&lt;span style="color: purple"&gt;RunnableInstancesDetectionPeriod&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt;(0, 0, 2);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;dxInstanceStoreBehavior.&lt;span style="color: purple"&gt;InstanceCompletionAction&lt;/span&gt; = &lt;span style="color: #00008b"&gt;InstanceCompletionAction&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;DeleteAll&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;You can download a modified version of the “BuiltInConfiguration” solution &lt;a href="http://community.devexpress.com/blogs/eaf/DX_WF_InstanceStore.zip" target="_blank"&gt;here&lt;/a&gt;. The console application starts a long running workflow that implements a counting service. Once the service’s start method is invoked, the service counts from 0 to 59. The counter is incremented every 2 seconds. After each count the workflow persists so you can close the application at any time and when you start it next time it will continue. A new one will be started from '0' value in addition to the loaded instances. The second project “InstanceStore2” in the solution provides the same functionality, however it is configured using the app.config file as shown,&lt;/p&gt;  &lt;p style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.serviceModel&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;extensions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;behaviorExtensions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add&lt;/span&gt;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;DevExpressWorkflowInstanceStore&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;DevExpress.Workflow.Store.WorkflowInstanceStoreElement, DevExpress.Workflow.Activities.v11.1&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;behaviorExtensions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;extensions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;services&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;service&lt;/span&gt;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CountingWorkflow&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;behaviorConfiguration&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;service&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;services&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;behaviors&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;serviceBehaviors&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;behavior&lt;/span&gt;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!--&lt;/span&gt;&lt;span style="color: green"&gt;&amp;lt;sqlWorkflowInstanceStore&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; connectionString=&amp;quot;Data Source=.\SQLEXPRESS;Initial Catalog=InstanceStore;Integrated Security=True;Asynchronous Processing=True&amp;quot;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; hostLockRenewalPeriod=&amp;quot;00:00:05&amp;quot; runnableInstancesDetectionPeriod=&amp;quot;00:00:02&amp;quot; instanceCompletionAction=&amp;quot;DeleteAll&amp;quot;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; instanceLockedExceptionAction=&amp;quot;AggressiveRetry&amp;quot; instanceEncodingOption=&amp;quot;GZip&amp;quot;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: green"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /&amp;gt;&lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;DevExpressWorkflowInstanceStore&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Data Source=DevExpressInstanceStore;User Id=myUsername;Password=myPassword&lt;/span&gt;&amp;quot;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;runnableInstancesDetectionPeriod&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;00:00:02&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;instanceCompletionAction&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;DeleteAll&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;behavior&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;serviceBehaviors&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;behaviors&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.serviceModel&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&lt;font color="#131313" face="Verdana"&gt;Note; All we need to do to use these code snippets in our code is to reference 'DevExpress.ExpressApp.v11.1.dll' and 'DevExpress.Workflow.Activities.v11.1.dl assemblies. Even though these assemblies are part of our eXpressApp framework they can also be used to support any other type of .NET application!&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;We are waiting to read your feedback about this. Remember that your questions are the best candidates for future posts.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Related Links&lt;/strong&gt; &lt;/u&gt;    &lt;br /&gt;&lt;a href="http://community.devexpress.com/blogs/eaf/archive/tags/WF/default.aspx" target="_blank"&gt;Blog posts&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3343" target="_blank"&gt;Online documentation&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://tv.devexpress.com/#;WorkFlow.tag;1" target="_blank"&gt;Videos&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;&lt;font color="#131313" face="Verdana"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-1945755265183148053?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/COCWJDIKRKcJrppKZfqwCIYxNdo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/COCWJDIKRKcJrppKZfqwCIYxNdo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/COCWJDIKRKcJrppKZfqwCIYxNdo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/COCWJDIKRKcJrppKZfqwCIYxNdo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/v01RPCJABg4" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T17:16:49.752+03:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><media:content url="http://feedproxy.google.com/~r/AbekiarisBlog/~5/hB4_85AQFUU/DX_WF_InstanceStore.zip" fileSize="11092" type="application/x-zip-compressed" /><itunes:explicit>no</itunes:explicit><itunes:subtitle> In version 11.1.7 our team now provides workflow instance support outside XAF borders! With a few lines of code, it is now possible to store our workflows in any of the 14 database systems described in this post. Durability is a key benefit of the Workfl</itunes:subtitle><itunes:author>noreply@blogger.com (Apostolis Bekiaris)</itunes:author><itunes:summary> In version 11.1.7 our team now provides workflow instance support outside XAF borders! With a few lines of code, it is now possible to store our workflows in any of the 14 database systems described in this post. Durability is a key benefit of the Workflow Foundation and it is based on the ability to store a running workflow instance on the fly at almost any time.&amp;#160; To this end Microsoft workflow team implemented the SqlWokflowInstanceStore class. Using this class and a few lines is possible to store workflow instances in SQL Server as shown, // Define SqlWorkflowInstanceStoreBehavior: //&amp;#160;&amp;#160; Set interval to renew instance lock to 5 seconds. //&amp;#160;&amp;#160; Set interval to check for runnable instances to 2 seconds. //&amp;#160;&amp;#160; Instance Store does not keep instances after it is completed. //&amp;#160;&amp;#160; Select exponential back-off algorithm when retrying to load a locked instance. //&amp;#160;&amp;#160; Instance state information is compressed using the GZip compressing algorithm. SqlWorkflowInstanceStoreBehavior instanceStoreBehavior = new SqlWorkflowInstanceStoreBehavior(connectionString); instanceStoreBehavior.HostLockRenewalPeriod = new TimeSpan(0, 0, 5); instanceStoreBehavior.RunnableInstancesDetectionPeriod = new TimeSpan(0, 0, 2); instanceStoreBehavior.InstanceCompletionAction = InstanceCompletionAction.DeleteAll; instanceStoreBehavior.InstanceLockedExceptionAction = InstanceLockedExceptionAction.AggressiveRetry; instanceStoreBehavior.InstanceEncodingOption = InstanceEncodingOption.GZip; host.Description.Behaviors.Add(instanceStoreBehavior); The above code was copied from the &amp;quot;BuiltInConfiguration&amp;quot; demo, &amp;quot;InstanceStore1&amp;quot; project. This demo is described at &amp;quot;Built-in Configuration&amp;quot; (http://msdn.microsoft.com/en-us/library/ee622978.aspx). You can download full sources of this demo and many others at &amp;quot;WCF and WF Samples for .NET Framework 4&amp;quot; (http://www.microsoft.com/download/en/details.aspx?id=21459). Following the same architecture our team implemented the DX WorkFlow Instance Store. eXpress Persistent Objects (XPO) is used for common objects storage and is fully capable of working transparently with 14 different database systems. For example to provide support for an Oracle database we could write, //We create or connect to a database by setting the connectionstring //This code will create 2 tables (XpoWorkflowInstance, XpoInstanceKeyc) in the database using (var session = new Session()) { &amp;#160;&amp;#160;&amp;#160; session.ConnectionString = &amp;quot;Data Source=DevExpressInstanceStore;User Id=myUsername;Password=myPassword&amp;quot;; &amp;#160;&amp;#160;&amp;#160; session.UpdateSchema(typeof(XpoWorkflowInstance), typeof(XpoInstanceKey)); &amp;#160;&amp;#160;&amp;#160; session.CreateObjectTypeRecords(typeof(XpoWorkflowInstance), typeof(XpoInstanceKey)); } &amp;#160; // Define WorkflowInstanceStoreBehavior: var dxInstanceStoreBehavior = new WorkflowInstanceStoreBehavior( &amp;#160;&amp;#160;&amp;#160; typeof(XpoWorkflowInstance), typeof(XpoInstanceKey), DevExpressConnectionString); host.Description.Behaviors.Add(dxInstanceStoreBehavior); dxInstanceStoreBehavior.RunnableInstancesDetectionPeriod = new TimeSpan(0, 0, 2); dxInstanceStoreBehavior.InstanceCompletionAction = InstanceCompletionAction.DeleteAll; &amp;#160; You can download a modified version of the “BuiltInConfiguration” solution here. The console application starts a long running workflow that implements a counting service. Once the service’s start method is invoked, the service counts from 0 to 59. The counter is incremented every 2 seconds. After each count the workflow persists so you can close the application at any time and when you start it next time it will continue. A new one will be started from '0' value in addition to the loaded instances. The second project “InstanceStore2” in the solution provides the same functionality, however it is configured using the app.config file as shown, &amp;lt;system.serviceModel&amp;gt; &amp;#160; &amp;lt;extensions&amp;gt; &amp;#160;&amp;#160;&amp;#160; &amp;lt;behav</itunes:summary><itunes:keywords>DX, WF</itunes:keywords><feedburner:origLink>http://apobekiaris.blogspot.com/2011/09/devexpress-workflow-instance-store.html</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/AbekiarisBlog/~5/hB4_85AQFUU/DX_WF_InstanceStore.zip" length="11092" type="application/x-zip-compressed" /><feedburner:origEnclosureLink>http://community.devexpress.com/blogs/eaf/DX_WF_InstanceStore.zip</feedburner:origEnclosureLink></item><item><title>Scheduling workflows in eXpandFrameWork</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/YNeMo81ufQs/scheduling-workflows-in-expandframework.html</link><category>XpandWF</category><category>DX</category><category>WF</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 30 Jan 2012 07:32:01 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-7939028022882283507</guid><description>&lt;p&gt;In this post we are going to extend the functionality of the &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3343" target="_blank"&gt;workflow module&lt;/a&gt;. to create a UI that will help us to schedule workflows. Some of you may recall that we looked at using a Delay inside a While activity in &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/06/14/working-with-crud-activities-short-transactions.aspx" target="_blank"&gt;Working with CRUD activities – Short Transactions.&lt;/a&gt; Recently, DX-Squad member &lt;a href="http://community.devexpress.com/members/Martin-Praxmarer-_5B00_DX_2D00_Squad_5D00_.aspx" target="_blank"&gt;Martin Praxmarer&lt;/a&gt; raised an interesting question relating to this topic: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;I have the requirement to do a workflow which starts each day on 6 clock - searches for orderdocuments where a specific date is less then X days. I know I will do an do while loop, but workflow definition has 2 options, start when new object, start when criteria, so when do i start this Workflow?&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;In order to achieve this we will use the WorkFlow demo that ships with our framework. The first thing is to design our custom ScheduledWorkflow persistent object by implementing IWorkflowDefinition. We didn’t derive it from the existing WorkFlowDefinition object because it has properties like TargetObjectType and start up conditions. &lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;enum&lt;/span&gt; &lt;span style="color: #00008b"&gt;StartMode&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: purple; font-weight: bold"&gt;OneTime&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: purple; font-weight: bold"&gt;Daily&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: purple; font-weight: bold"&gt;Weekly&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;DefaultClassOptions&lt;/span&gt;]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;Appearance&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"WeekDays"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"StartMode &amp;lt;&amp;gt; 'Weekly'"&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: purple"&gt;TargetItems&lt;/span&gt; = &lt;span style="color: #a31515"&gt;"RecurEveryWeeks;Moday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday"&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: purple"&gt;Visibility&lt;/span&gt; = &lt;span style="color: #00008b"&gt;ViewItemVisibility&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Hide&lt;/span&gt;)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt; : &lt;span style="color: #00008b"&gt;BaseObject&lt;/span&gt;, &lt;span style="color: #00008b"&gt;IWorkflowDefinition&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt;(&lt;span style="color: #00008b"&gt;Session&lt;/span&gt; session)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(session) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;IsActive&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"IsActive"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"IsActive"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;RuntASAPIfScheduledStartIsMissed&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"RuntASAPIfScheduledStartIsMissed"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"RuntASAPIfScheduledStartIsMissed"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;Association&lt;/span&gt;]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;XPCollection&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ScheduledWorkflowLaunchHistory&lt;/span&gt;&amp;gt; &lt;span style="color: purple"&gt;LaunchHistoryItems&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetCollection&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ScheduledWorkflowLaunchHistory&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"LaunchHistoryItems"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;ImmediatePostData&lt;/span&gt;]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;StartMode&lt;/span&gt; &lt;span style="color: purple"&gt;StartMode&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;StartMode&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"StartMode"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"StartMode"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt; &lt;span style="color: purple"&gt;StartTime&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"StartTime"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"StartTime"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;Appearance&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"RecurEveryDays"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"StartMode &amp;lt;&amp;gt; 'Daily'"&lt;/span&gt;, &lt;span style="color: purple"&gt;Visibility&lt;/span&gt; = &lt;span style="color: #00008b"&gt;ViewItemVisibility&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Hide&lt;/span&gt;)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;int&lt;/span&gt; &lt;span style="color: purple"&gt;RecurEveryDays&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;int&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"RecurEveryDays"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"RecurEveryDays"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;int&lt;/span&gt; &lt;span style="color: purple"&gt;RecurEveryWeeks&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;int&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"RecurEveryWeeks"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"RecurEveryWeeks"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;Moday&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Moday"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Moday"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;Tuesday&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Tuesday"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Tuesday"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;Wednesday&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Wednesday"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Wednesday"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;Thursday&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Thursday"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Thursday"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;Friday&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Friday"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Friday"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;Saturday&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Moday"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Saturday"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;Sunday&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Sunday"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Sunday"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    #region&lt;/span&gt; IWorkflowDefinition Members&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetActivityTypeName&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetUniqueId&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;IStartWorkflowCondition&lt;/span&gt;&amp;gt; &lt;span style="color: #008b8b"&gt;GetConditions&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;IStartWorkflowCondition&lt;/span&gt;[0];&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetUniqueId&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: purple"&gt;Session&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;IsNewObject&lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;)) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;throw&lt;/span&gt; &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;InvalidOperationException&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #a31515"&gt;"ScheduledWorkflow"&lt;/span&gt; + &lt;span style="color: purple"&gt;Oid&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;ToString&lt;/span&gt;().&lt;span style="color: #008b8b"&gt;ToUpper&lt;/span&gt;().&lt;span style="color: #008b8b"&gt;Replace&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"-"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"_"&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;Browsable&lt;/span&gt;(&lt;span style="color: blue"&gt;false&lt;/span&gt;)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;CanCompile&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;false&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;Browsable&lt;/span&gt;(&lt;span style="color: blue"&gt;false&lt;/span&gt;)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: purple"&gt;CanOpenHost&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: purple"&gt;IsActive&lt;/span&gt; &amp;amp;&amp;amp; !&lt;span style="color: blue"&gt;string&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;IsNullOrEmpty&lt;/span&gt;(&lt;span style="color: purple"&gt;Name&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;Name&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Name"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Name"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;Size&lt;/span&gt;(&lt;span style="color: #00008b"&gt;SizeAttribute&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Unlimited&lt;/span&gt;)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;Xaml&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Xaml"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Xaml"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;    #endregion&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;AfterConstruction&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;AfterConstruction&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: purple"&gt;Xaml&lt;/span&gt; = &lt;span style="color: #00008b"&gt;DCWorkflowDefinitionLogic&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;InitialXaml&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt; &lt;/div&gt;  &lt;p&gt;In the above class we have added some scheduled specific properties such as &lt;span style="color: purple"&gt;StartMode, &lt;span style="color: purple"&gt;StartTime, &lt;span style="color: purple"&gt;RecurEveryDays &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;etc. The class has been decorated with the &lt;span style="color: #00008b"&gt;Appearance &lt;/span&gt;attribute to control the visibility of the Day properties. This means when StartMode &amp;lt;&amp;gt; 'Weekly these properties will be hidden. &lt;/p&gt;  &lt;p&gt;Moreover there is a collection &lt;span style="color: purple"&gt;LaunchHistoryItems &lt;/span&gt;of &lt;span style="color: #00008b"&gt;ScheduledWorkflowLaunchHistory &lt;/span&gt;objects, which will be used later to check if the workflow has been launched.&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowLaunchHistory&lt;/span&gt; : &lt;span style="color: #00008b"&gt;BaseObject&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowLaunchHistory&lt;/span&gt;(&lt;span style="color: #00008b"&gt;Session&lt;/span&gt; session) : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(session) {}&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;DateTime&lt;/span&gt; &lt;span style="color: purple"&gt;LaunchedOn&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;DateTime&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"LaunchedOn"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;DateTime&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"LaunchedOn"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    [&lt;span style="color: #00008b"&gt;Association&lt;/span&gt;]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt; &lt;span style="color: purple"&gt;Workflow&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;get&lt;/span&gt; { &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;GetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Workflow"&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #008b8b"&gt;set&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;SetPropertyValue&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"Workflow"&lt;/span&gt;, &lt;span style="color: blue"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt; &lt;/div&gt;  &lt;p&gt;After designing these classes, we now have all the required input in order to schedule our workflows.&lt;/p&gt;  &lt;p&gt;The next step is to load our custom workflows by extending the workflow provider service as shown,&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowDefinitionProvider&lt;/span&gt; : &lt;span style="color: #00008b"&gt;WorkflowDefinitionProvider&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowDefinitionProvider&lt;/span&gt;(&lt;span style="color: #00008b"&gt;Type&lt;/span&gt; workflowDefinitionType) : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(workflowDefinitionType) { }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowDefinitionProvider&lt;/span&gt;(&lt;span style="color: #00008b"&gt;Type&lt;/span&gt; workflowDefinitionType, &lt;span style="color: #00008b"&gt;IObjectSpaceProvider&lt;/span&gt; objectSpaceProvider) : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(workflowDefinitionType, objectSpaceProvider) { }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: #00008b"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;IWorkflowDefinition&lt;/span&gt;&amp;gt; &lt;span style="color: #008b8b"&gt;GetDefinitions&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;IWorkflowDefinition&lt;/span&gt;&amp;gt; result = &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetDefinitions&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;IObjectSpace&lt;/span&gt; objectSpace = &lt;span style="color: purple"&gt;ObjectSpaceProvider&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;CreateObjectSpace&lt;/span&gt;(); &lt;span style="color: green"&gt;//don't dispose immediately&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;foreach&lt;/span&gt;(&lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt; &lt;span style="font-weight: bold"&gt;workflow&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; objectSpace.&lt;span style="color: #008b8b"&gt;GetObjects&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt;&amp;gt;()) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            result.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;(&lt;span style="font-weight: bold"&gt;workflow&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; result;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt; &lt;/div&gt;  &lt;p&gt;After this we are ready to implement our final service that will schedule our workflows,&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowStartService&lt;/span&gt; : &lt;span style="color: #00008b"&gt;BaseTimerService&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;private&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: #008b8b"&gt;NeedToStartWorkflow&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IObjectSpace&lt;/span&gt; objectSpace, &lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt; workflow) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (workflow.&lt;span style="color: purple"&gt;StartMode&lt;/span&gt; == &lt;span style="color: #00008b"&gt;StartMode&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;OneTime&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;if&lt;/span&gt; (workflow.&lt;span style="color: purple"&gt;LaunchHistoryItems&lt;/span&gt;.&lt;span style="color: purple"&gt;Count&lt;/span&gt; == 0) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        } &lt;span style="color: blue"&gt;else&lt;/span&gt; &lt;span style="color: blue"&gt;if&lt;/span&gt; (workflow.&lt;span style="color: purple"&gt;StartMode&lt;/span&gt; == &lt;span style="color: #00008b"&gt;StartMode&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Daily&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;var&lt;/span&gt; historyItem = objectSpace.&lt;span style="color: #008b8b"&gt;FindObject&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ScheduledWorkflowLaunchHistory&lt;/span&gt;&amp;gt;(&lt;span style="color: #00008b"&gt;CriteriaOperator&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Parse&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"GetDate(LaunchedOn) = ?"&lt;/span&gt;, &lt;span style="color: #00008b"&gt;DateTime&lt;/span&gt;.&lt;span style="color: purple"&gt;Today&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;if&lt;/span&gt; (historyItem == &lt;span style="color: blue"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style="color: #00008b"&gt;DateTime&lt;/span&gt;.&lt;span style="color: purple"&gt;Now&lt;/span&gt;.&lt;span style="color: purple"&gt;TimeOfDay&lt;/span&gt; &lt;span style="color: #008b8b"&gt;&amp;gt;&lt;/span&gt; workflow.&lt;span style="color: purple"&gt;StartTime&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        } &lt;span style="color: blue"&gt;else&lt;/span&gt; &lt;span style="color: blue"&gt;if&lt;/span&gt; (workflow.&lt;span style="color: purple"&gt;StartMode&lt;/span&gt; == &lt;span style="color: #00008b"&gt;StartMode&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Weekly&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;throw&lt;/span&gt; &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;NotImplementedException&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;false&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowStartService&lt;/span&gt;()&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(&lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;FromMinutes&lt;/span&gt;(1)) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowStartService&lt;/span&gt;(&lt;span style="color: #00008b"&gt;TimeSpan&lt;/span&gt; requestsDetectionPeriod) : &lt;span style="color: #00008b"&gt;base&lt;/span&gt;(requestsDetectionPeriod) { }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;OnTimer&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;using&lt;/span&gt; (&lt;span style="color: #00008b"&gt;IObjectSpace&lt;/span&gt; objectSpace = &lt;span style="color: purple"&gt;ObjectSpaceProvider&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;CreateObjectSpace&lt;/span&gt;()) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt; &lt;span style="font-weight: bold"&gt;workflow&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; objectSpace.&lt;span style="color: #008b8b"&gt;GetObjects&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ScheduledWorkflow&lt;/span&gt;&amp;gt;(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;BinaryOperator&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"IsActive"&lt;/span&gt;, &lt;span style="color: blue"&gt;true&lt;/span&gt;))) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                &lt;span style="color: #00008b"&gt;WorkflowHost&lt;/span&gt; host;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: purple"&gt;HostManager&lt;/span&gt;.&lt;span style="color: purple"&gt;Hosts&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;TryGetValue&lt;/span&gt;(&lt;span style="font-weight: bold"&gt;workflow&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetUniqueId&lt;/span&gt;(), &lt;span style="color: blue"&gt;out&lt;/span&gt; host)) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                    &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: #008b8b"&gt;NeedToStartWorkflow&lt;/span&gt;(objectSpace, &lt;span style="font-weight: bold"&gt;workflow&lt;/span&gt;)) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                        host.&lt;span style="color: #008b8b"&gt;StartWorkflow&lt;/span&gt;(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;());&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                        &lt;span style="color: blue"&gt;var&lt;/span&gt; historyItem = objectSpace.&lt;span style="color: #008b8b"&gt;CreateObject&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ScheduledWorkflowLaunchHistory&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                        historyItem.&lt;span style="color: purple"&gt;Workflow&lt;/span&gt; = &lt;span style="font-weight: bold"&gt;workflow&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                        historyItem.&lt;span style="color: purple"&gt;LaunchedOn&lt;/span&gt; = &lt;span style="color: #00008b"&gt;DateTime&lt;/span&gt;.&lt;span style="color: purple"&gt;Now&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                        objectSpace.&lt;span style="color: #008b8b"&gt;CommitChanges&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;em&gt;Note; the service is not fully implemented, however its very easy to continue from this point. This code will live in the new Xpand.ExpressApp.Workflow module. Now, for&lt;/em&gt;&lt;em&gt; the rest of the implementation I would like to ask the help of our community. Anyone that wants to finish it contribute it is most welcome! &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Finally we modify the WorkflowServerStarter class and add this service,&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;private&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;Start_&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt; connectionString, &lt;span style="color: blue"&gt;string&lt;/span&gt; applicationName) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: #00008b"&gt;ServerApplication&lt;/span&gt; serverApplication = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;ServerApplication&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    serverApplication.&lt;span style="color: purple"&gt;ApplicationName&lt;/span&gt; = applicationName;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    serverApplication.&lt;span style="color: purple"&gt;Modules&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;WorkflowDemoModule&lt;/span&gt;());&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    serverApplication.&lt;span style="color: purple"&gt;ConnectionString&lt;/span&gt; = connectionString;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    serverApplication.&lt;span style="color: purple"&gt;Security&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;SecurityComplex&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;User&lt;/span&gt;, &lt;span style="color: #00008b"&gt;Role&lt;/span&gt;&amp;gt;(&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;WorkflowServerAuthentication&lt;/span&gt;(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;BinaryOperator&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"UserName"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"WorkflowService"&lt;/span&gt;)));&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    serverApplication.&lt;span style="color: #008b8b"&gt;Setup&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    serverApplication.&lt;span style="color: #008b8b"&gt;Logon&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: #00008b"&gt;IObjectSpaceProvider&lt;/span&gt; objectSpaceProvider = serverApplication.&lt;span style="color: purple"&gt;ObjectSpaceProvider&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: purple"&gt;server&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;WorkflowServer&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"http://localhost:46232"&lt;/span&gt;, objectSpaceProvider, objectSpaceProvider);&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: purple"&gt;server&lt;/span&gt;.&lt;span style="color: purple"&gt;WorkflowDefinitionProvider&lt;/span&gt; = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowDefinitionProvider&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;XpoWorkflowDefinition&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: green"&gt;//Add the service            &lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: purple"&gt;server&lt;/span&gt;.&lt;span style="color: purple"&gt;ServiceProvider&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;AddService&lt;/span&gt;(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;ScheduledWorkflowStartService&lt;/span&gt;());&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;We are now ready to go!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-xn77Tg-kdmk/TmSIBRM8k9I/AAAAAAAABLc/jJnl8TrBmdI/s1600-h/4-9-2011%25252012-50-05%252520%2525C2%2525BC%2525C2%2525BC%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="4-9-2011 12-50-05 μμ" border="0" alt="4-9-2011 12-50-05 μμ" src="http://lh4.ggpht.com/-1xrkUwaRMuo/TmSICfb-mvI/AAAAAAAABLg/EjRYzI7FOtQ/4-9-2011%25252012-50-05%252520%2525C2%2525BC%2525C2%2525BC_thumb%25255B3%25255D.png?imgmax=800" width="760" height="557" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Related Links&lt;/strong&gt; &lt;/u&gt;   &lt;br /&gt;&lt;a href="http://community.devexpress.com/blogs/eaf/archive/tags/WF/default.aspx" target="_blank"&gt;Blog posts&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3343" target="_blank"&gt;Online documentation&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://tv.devexpress.com/#;WorkFlow.tag;1" target="_blank"&gt;Videos&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-7939028022882283507?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yDvVvZG3vWtK9RTsCTigr8qkmW8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yDvVvZG3vWtK9RTsCTigr8qkmW8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yDvVvZG3vWtK9RTsCTigr8qkmW8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yDvVvZG3vWtK9RTsCTigr8qkmW8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/YNeMo81ufQs" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T17:32:01.468+02:00</app:edited><media:thumbnail url="http://lh4.ggpht.com/-1xrkUwaRMuo/TmSICfb-mvI/AAAAAAAABLg/EjRYzI7FOtQ/s72-c/4-9-2011%25252012-50-05%252520%2525C2%2525BC%2525C2%2525BC_thumb%25255B3%25255D.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/09/scheduling-workflows-in-expandframework.html</feedburner:origLink></item><item><title>Profiling medium trust web applications</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/M9i3Q5XcM9o/profiling-medium-trust-web-applications.html</link><category>DX</category><category>Xpo</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 29 Aug 2011 07:07:59 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-685682814430930166</guid><description>&lt;p align="justify"&gt;Our profiler uses WCF in order to communicate with the client application. One of the benefits of the XPOProfiler is that it supports 2 binding types. Both binding types have their advantages however in this situation only one allows us the flexibility we require.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;u&gt;NetTcpBinding&lt;/u&gt;&lt;/p&gt;  &lt;p align="justify"&gt;This option provides a secure and reliable binding environment for .Net to .Net cross machine communication. By default it creates a communication stack using WS-ReliableMessaging protocol, TCP for message delivery and windows security for message and authentication at run time. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-MqHRp-5jn7A/TludHP85eAI/AAAAAAAABKs/puMAq7ZpKXg/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-aRdW15aiLM8/TludIqQuzrI/AAAAAAAABKw/CvDAkuKoclg/image_thumb2.png?imgmax=800" width="349" height="216" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;One drawback is that in shared host environments there is no way to open a port neither to use &lt;a href="http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx" target="_blank"&gt;Mutexes&lt;/a&gt;. Our second option allows us to overcome this by creating a WCF service and hosting it with our web application.&amp;#160; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;u&gt;WSHttpBinding&lt;/u&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Defines a secure, reliable, interoperable binding suitable for non-duplex service contracts,&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Supports WS-* functionality and distributed transactions with reliable and secure sessions using SOAP security,&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Uses HTTP and HTTPS transport for communication,&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Reliable sessions are disabled by default&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-tBPM5ounQkc/TludJuO8CrI/AAAAAAAABK0/f9HNrqVj8fo/s1600-h/image14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-yZsGOlNkr98/TludKE5_A6I/AAAAAAAABK4/MNeHrt0aB8c/image_thumb8.png?imgmax=800" width="318" height="223" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;We have already identified limitations when profiling medium trust web applications, now we must look at modifying our application in order to overcome them.&lt;/p&gt;  &lt;p align="justify"&gt;The first step is to add the new service using VS add new Item context menu.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-7RxDiPo920I/TludKz7CltI/AAAAAAAABK8/4RmRs7HDHds/s1600-h/image19.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-LZp11XOI5HY/TludLn7nfwI/AAAAAAAABLA/DEA4QC7YCGU/image_thumb11.png?imgmax=800" width="556" height="422" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;This action will add the following items to the project;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;IMyLogService.cs - the communication interface description,&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;MyLogService.svc.cs - the communication service class declaration&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;Furthermore the Web.config file will be modified by adding &amp;lt;system.serviceModel&amp;gt; section. I am using .NET3.5 right now, be aware that this step may vary according to the .NET version you are using.&lt;/p&gt;  &lt;p align="justify"&gt;The next step is to remove the IMyLogService.cs from the project.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-vHgr9wvvOKc/TludMOUBEyI/AAAAAAAABLE/QpA4gbM5eGk/s1600-h/image2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-z5nijrFHemM/TludMnCIPPI/AAAAAAAABLI/zPWt0QS_e1M/image_thumb1.png?imgmax=800" width="243" height="235" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;/p&gt;  &lt;p&gt;Then we are going to modify the MyLogService.svc.cs as&amp;#160; follows;&lt;/p&gt;  &lt;p&gt;[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]    &lt;br /&gt;public class MyLogService : LogService {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public MyLogService()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : base(Logger) {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (Logger != null) LogManager.SetTransport(Logger);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; private static LoggerBase Logger {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; get { return new LoggerBase(); }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;The final step is to change the name of the communication contract in &amp;lt;system.serviceModel&amp;gt; section of Web.config file from WebApplicationToProfile.IMyLogService to DevExpress.Xpo.Logger.Transport.ILogSource.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-hYnezjoJGgI/TludNM--1-I/AAAAAAAABLM/W4cZbCSNQz4/s1600-h/image32.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-HfhERtdAYTY/TludNywu6oI/AAAAAAAABLQ/4iLuelSFLfo/image_thumb18.png?imgmax=800" width="878" height="203" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After that we are ready to run the XPOProfiler and create a new connection to our medium hosted XPO web application.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-BoEtk2yujZU/TludOjkiqII/AAAAAAAABLU/mkO5SAkr-wA/s1600-h/image37.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-xIPxZnlSBzg/TludPf1Fu5I/AAAAAAAABLY/YK_B8WVAtSM/image_thumb21.png?imgmax=800" width="585" height="294" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Note: Version 11.2 will allow us to carry out all the above processes.&lt;/p&gt;  &lt;p&gt;Happy profiling!&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Related Links&lt;/strong&gt; &lt;/u&gt;    &lt;br /&gt;&lt;a href="http://community.devexpress.com/blogs/xpo/archive/tags/profiling+tool/default.aspx" target="_blank"&gt;Blog posts&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3343" target="_blank"&gt;Videos&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-685682814430930166?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JNLBySAi3w-NutTi_oFFRnaxLhE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JNLBySAi3w-NutTi_oFFRnaxLhE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JNLBySAi3w-NutTi_oFFRnaxLhE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JNLBySAi3w-NutTi_oFFRnaxLhE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/M9i3Q5XcM9o" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-29T17:07:59.035+03:00</app:edited><media:thumbnail url="http://lh4.ggpht.com/-aRdW15aiLM8/TludIqQuzrI/AAAAAAAABKw/CvDAkuKoclg/s72-c/image_thumb2.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/08/profiling-medium-trust-web-applications.html</feedburner:origLink></item><item><title>XAF Workflow persistence storage</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/XlOSU2DKRTA/xaf-workflow-persistence-storage.html</link><category>Xaf</category><category>DX</category><category>WF</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Thu, 25 Aug 2011 04:30:30 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-8226318203070889217</guid><description>&lt;p&gt;The .NET Framework 4 ships with the SQL Workflow Instance Store which allows workflows to persist state information about workflow instances in a SQL Server 2005 or SQL Server 2008 database. However its implementation is based on stored procedures which can be a bit scary if you are not familiar with them. In addition our customers may follow different standards (Oracle, Firebird, VistaDB, MySQL, PostgreSQL etc.) and it’s unrealistic to hire more people to support SQL Server infrastructure.&lt;/p&gt;  &lt;p&gt;Usually when dealing with these issues the first thing we do is to carry out a Google search for storage solutions. Surprisingly there is no such solution out there! Moreover there is very little useful code or samples available. Luckily XAF provides us with an easier route!&lt;/p&gt;  &lt;p&gt;XAF is the perfect workflow modeling environment. It provides a ready made solution for creating and deploying a server that will execute workflows as described &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3343" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; In order to start modeling workflows we can use VS design time along with our re-hosted runtime &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/05/24/xaf-workflow-visual-designer.aspx" target="_blank"&gt;Workflow designer and custom WF4 activities&lt;/a&gt;. XAF also gives us increased control over our workflows for example through the ability to &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/07/19/manually-starting-workflows.aspx" target="_blank"&gt;manually start workflows&lt;/a&gt;. Finally since &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;XAF&lt;/a&gt; uses &lt;a href="http://www.devexpress.com/Products/NET/ORM/" target="_blank"&gt;XPO&lt;/a&gt; to access data we can easily support 16 different database systems simply by providing a connection string!&lt;/p&gt;  &lt;div class="tablediv"&gt;   &lt;table class="dtTABLE" cellspacing="0"&gt;&lt;tbody&gt;       &lt;tr valign="top"&gt;         &lt;th&gt;XPO Data Store Adapter&lt;/th&gt;          &lt;th&gt;XPO Data Store Adapter's Assembly Name&lt;/th&gt;          &lt;th&gt;Database Provider Assembly&lt;/th&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;&lt;a href="/XPO/clsDevExpressXpoDBAccessConnectionProvidertopic.aspx"&gt;AccessConnectionProvider&lt;/a&gt;&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX&lt;/td&gt;          &lt;td&gt;System.Data.dll&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;AdvantageConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;Advantage.Data.Provider.dll 9.10.2.0&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;AsaConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;iAnywhere.Data.SQLAnywhere.dll 11.0.0.12642&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;AseConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;Sybase.Data.AseClient.dll 1.15.50.0&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;DB2ConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;IBM.Data.DB2.dll 9.5.2.2&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;FirebirdConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;FirebirdSql.Data.Firebird.dll 1.7.1.0            &lt;br /&gt;FirebirdSql.Data.FirebirdClient.dll 2.5.1.0 &lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;&lt;a href="/XPO/clsDevExpressXpoDBMSSqlConnectionProvidertopic.aspx"&gt;MSSqlConnectionProvider&lt;/a&gt;&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX&lt;/td&gt;          &lt;td&gt;System.Data.dll&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;MSSqlCEConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;System.Data.SqlServerCe.dll 3.5.0            &lt;br /&gt;System.Data.SqlServerCe.dll 4.0.8482.1 &lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;MySqlConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;MySql.Data.dll 5.2.5.0&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;OracleConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;System.Data.OracleClient.dll 2.0.0.0            &lt;br /&gt;Oracle.DataAccess.dll 9.2.0.700 &lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;ODPConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;Oracle.DataAccess.dll 10.1.0.200&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;PervasiveSqlConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;Pervasive.Data.SqlClient.dll 2.10.0.15&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;PostgreSqlConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;Npgsql.dll 2.0.11.0&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;SQLiteConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;System.Data.SQLite.dll 1.0.61.0&lt;/td&gt;       &lt;/tr&gt;        &lt;tr valign="top"&gt;         &lt;td&gt;VistaDBConnectionProvider&lt;/td&gt;          &lt;td&gt;DevExpress.Xpo.vXXX.Providers&lt;/td&gt;          &lt;td&gt;VistaDB.4.dll 4.0.0.0&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt;  &lt;p&gt;More info @ &lt;a href="http://documentation.devexpress.com/#XPO/CustomDocument2114" target="_blank"&gt;Database Systems Supported by XPO&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This is only one example of what XAF can do for us. XAF provides a comprehensive set of solutions that allow you to outsource all of the mundane programming tasks leaving you to focus purely on your business needs. For more info consult our docs, blogs, code central and &lt;a href="http://www.devexpress.com/Support/Center/" target="_blank"&gt;support center&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Happy Workflowing!&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Related Links&lt;/strong&gt; &lt;/u&gt;    &lt;br /&gt;&lt;a href="http://community.devexpress.com/blogs/eaf/archive/tags/WF/default.aspx" target="_blank"&gt;Blog posts&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3343" target="_blank"&gt;Online documentation&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt; &lt;a href="http://tv.devexpress.com/#;WorkFlow.tag;1" target="_blank"&gt;Videos&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-8226318203070889217?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x_wgbiXFLO5QyOyQxzE9c3ibJUQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x_wgbiXFLO5QyOyQxzE9c3ibJUQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/x_wgbiXFLO5QyOyQxzE9c3ibJUQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x_wgbiXFLO5QyOyQxzE9c3ibJUQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/XlOSU2DKRTA" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-25T14:30:30.040+03:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/08/xaf-workflow-persistence-storage.html</feedburner:origLink></item><item><title>Creating a State Machine module for eXpandFramework – Part 1</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/2-pTRSdQlD4/creating-state-machine-module-for.html</link><category>Xaf</category><category>statemachine</category><category>DX</category><category>Xpandstatemachine</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 30 Jan 2012 07:57:34 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-7281003524172772371</guid><description>&lt;p&gt;&lt;em&gt;&lt;span &gt;Let me describe for a moment how we at DX work. We build and sell software which means that we only sell and provide support for products that have been built and tested by us! However I am here as a framework evangelist and huge XAF fan. This makes it my duty to spread the word as much as I can and make XAF even bigger. To this end through collaboration within the XAF community, we have been building and supporting &lt;/span&gt;&lt;/em&gt;&lt;a href="http://www.expandframework.com/"&gt;&lt;em&gt;&lt;span &gt;eXpand&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span &gt;. This framework follows XAF to the letter and takes things even further. &lt;a href="http://www.expandframework.com/"&gt;&lt;em&gt;&lt;span &gt;eXpand&lt;/span&gt;&lt;/em&gt;&lt;/a&gt; gets its inspiration from real life situations and bases itself on examples from DX &lt;a href="http://www.devexpress.com/Support/Center/" target="_blank"&gt;SUPPORT CENTER&lt;/a&gt;. &lt;a href="http://www.expandframework.com/"&gt;&lt;em&gt;&lt;span &gt;eXpand&lt;/span&gt;&lt;/em&gt;&lt;/a&gt; is the first open source project based on the &lt;a href="http://devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;DevExpress eXpressApp Framework (XAF)&lt;/a&gt;. More info is available at &lt;/span&gt;&lt;/em&gt;&lt;a href="http://www.expandframework.com/"&gt;&lt;em&gt;&lt;span &gt;www.expandframework.com&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span &gt; and our very existence relies on your efforts! Anyone is welcome to contribute and enjoy the rewards. It is not necessary to be a XAF guru, we can all manage to create a behavior taken from &lt;a href="http://search.devexpress.com/?q=XPO+OR+XAF&amp;amp;p=T4|P2|0&amp;amp;d=16" target="_blank"&gt;DevExpress code central&lt;/a&gt;. Let’s work together to enhance our beloved XAF!&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Today we are going to deal with creating a reusable module for eXpandFramework. This new module will host State Machine logic therefore we are going to name it Xpand.ExpressApp.StateMachine. A Security logic similar to &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/07/22/applying-security-to-state-machine-module.aspx" target="_blank"&gt;this&lt;/a&gt; is going to be the first resident however we are going to use permissions rather than manually writing the custom function criteria operator to the &lt;em&gt;TargetObjectCriteria. &lt;/em&gt;This module can be used as a standalone without the need of eXpandFramwork for the moment. However keeping it under the eXpand umbrella will help us to share features/processes within the framework in the future.&lt;/p&gt;  &lt;p&gt;First we need to create a new VS project that shares characteristics with the rest of the eXpand modules. Currently eXpand only provides a new Solution VS template. This means that we need to do things the old fashioned way, i.e. copying and pasting an existing module. Our behavior is platform independent thus it’s a good idea to choose a module that is also platform independent such as Xpand.ExpressApp.ViewVariants.&lt;/p&gt;  &lt;p&gt;The next step is to open the cloned project, rename it and set its references to those shown in the pic below. It is important to leave all Xpand core references as they are. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-LvAUCr5hEsM/TkA2ixT9LYI/AAAAAAAABKM/8Zr8eqispxA/s1600-h/image7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-mvXEodC0qp0/TkA2j29T79I/AAAAAAAABKQ/v2Y4Pzz9Jvo/image_thumb4.png?imgmax=800" width="295" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It is advisable to register the original StateMachine module to avoid having to register it later.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-wVrsGpC6zck/TkA2kxFHtOI/AAAAAAAABKU/0b7txVIHNYY/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-JjTN3sFaD74/TkA2lvhZM4I/AAAAAAAABKY/Bw3NKAu0egs/image_thumb2.png?imgmax=800" width="442" height="369" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;XpandSystemModule&lt;/em&gt; is already registered since we used the &lt;em&gt;Xpand.ExpressApp.ViewVarians&lt;/em&gt; project as a template. &lt;/p&gt;  &lt;p&gt;We want (with the help of the existing XAF Security permissions system) to be able to assign special types of permissions to a role. We can then use these permissions to control the transition to certain states. The State Machine module uses &lt;em&gt;XpoStateMachine &lt;/em&gt;and &lt;em&gt;XpoState &lt;/em&gt;persistent classes. These classes can be linked to a permission by name. As a result a permission having 2 properties &lt;em&gt;StateMachineName and StateName &lt;/em&gt;would be sufficient.&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;NonPersistent&lt;/span&gt;]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt; : &lt;span style="color: #00008b"&gt;PermissionBase&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: #00008b"&gt;IPermission&lt;/span&gt; &lt;span style="color: #008b8b"&gt;Copy&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;(&lt;span style="color: purple"&gt;Modifier&lt;/span&gt;, &lt;span style="color: purple"&gt;StateCaption&lt;/span&gt;, &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: #00008b"&gt;SecurityElement&lt;/span&gt; &lt;span style="color: #008b8b"&gt;ToXml&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: #00008b"&gt;SecurityElement&lt;/span&gt; result = &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;ToXml&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        result.&lt;span style="color: #008b8b"&gt;AddAttribute&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"modifier"&lt;/span&gt;, &lt;span style="color: purple"&gt;Modifier&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;ToString&lt;/span&gt;());&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        result.&lt;span style="color: #008b8b"&gt;AddAttribute&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"stateMachineName"&lt;/span&gt;, &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        result.&lt;span style="color: #008b8b"&gt;AddAttribute&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"stateCaption"&lt;/span&gt;, &lt;span style="color: purple"&gt;StateCaption&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; result;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;FromXml&lt;/span&gt;(&lt;span style="color: #00008b"&gt;SecurityElement&lt;/span&gt; e) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;FromXml&lt;/span&gt;(e);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: purple"&gt;Modifier&lt;/span&gt; =&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            (&lt;span style="color: #00008b"&gt;StateMachineTransitionModifier&lt;/span&gt;)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: #00008b"&gt;Enum&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Parse&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;StateMachineTransitionModifier&lt;/span&gt;), e.&lt;span style="color: purple"&gt;Attributes&lt;/span&gt;[&lt;span style="color: #a31515"&gt;"modifier"&lt;/span&gt;].&lt;span style="color: #008b8b"&gt;ToString&lt;/span&gt;());&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: purple"&gt;StateCaption&lt;/span&gt; = e.&lt;span style="color: purple"&gt;Attributes&lt;/span&gt;[&lt;span style="color: #a31515"&gt;"stateCaption"&lt;/span&gt;].&lt;span style="color: #008b8b"&gt;ToString&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt; = e.&lt;span style="color: purple"&gt;Attributes&lt;/span&gt;[&lt;span style="color: #a31515"&gt;"stateMachineName"&lt;/span&gt;].&lt;span style="color: #008b8b"&gt;ToString&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;(&lt;span style="color: #00008b"&gt;StateMachineTransitionModifier&lt;/span&gt; modifier, &lt;span style="color: blue"&gt;string&lt;/span&gt; stateCaption, &lt;span style="color: blue"&gt;string&lt;/span&gt; stateMachineName) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: purple"&gt;Modifier&lt;/span&gt; = modifier;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: purple"&gt;StateCaption&lt;/span&gt; = stateCaption;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt; = stateMachineName;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: #008b8b"&gt;IsSubsetOf&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IPermission&lt;/span&gt; target) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; isSubsetOf = &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;IsSubsetOf&lt;/span&gt;(target);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;if&lt;/span&gt; (isSubsetOf) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;var&lt;/span&gt; stateMachineTransitionPermission = ((&lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;)target);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;return&lt;/span&gt; stateMachineTransitionPermission.&lt;span style="color: purple"&gt;StateCaption&lt;/span&gt; == &lt;span style="color: purple"&gt;StateCaption&lt;/span&gt; &amp;amp;&amp;amp;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                   stateMachineTransitionPermission.&lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt; == &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;false&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachineTransitionModifier&lt;/span&gt; &lt;span style="color: purple"&gt;Modifier&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;StateMachineName&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple"&gt;StateCaption&lt;/span&gt; { &lt;span style="color: #008b8b"&gt;get&lt;/span&gt;; &lt;span style="color: #008b8b"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt; &lt;/div&gt;  &lt;p&gt;A  Modifier property can be used to disable our permission, moreover the SecuritySystem is going to grant the permission by calling the &lt;span style="color: #008b8b"&gt;IsSubsetOf &lt;/span&gt;method. &lt;/p&gt;  &lt;p&gt;Finally, we are going to create a controller and check if a permission with the same state and statemachine name has been granted to our system. If not we are going to throw an &lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;exception&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;StatePermissionController&lt;/span&gt; : &lt;span style="color: #00008b"&gt;ViewController&lt;/span&gt;, &lt;span style="color: #00008b"&gt;IModelExtender&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #00008b"&gt;IModelExtender&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;ExtendModelInterfaces&lt;/span&gt;(&lt;span style="color: #00008b"&gt;ModelInterfaceExtenders&lt;/span&gt; extenders) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        extenders.&lt;span style="color: #008b8b"&gt;Add&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;IModelOptions&lt;/span&gt;, &lt;span style="color: #00008b"&gt;IModelOptionsStateMachine&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;protected&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;OnActivated&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;base&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;OnActivated&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; stateMachineController = &lt;span style="color: purple"&gt;Frame&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetController&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;StateMachineController&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        stateMachineController.&lt;span style="color: fuchsia"&gt;TransitionExecuting&lt;/span&gt; &lt;span style="color: #008b8b"&gt;+=&lt;/span&gt; &lt;span style="color: #008b8b"&gt;OnTransitionExecuting&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;OnTransitionExecuting&lt;/span&gt;(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #00008b"&gt;ExecuteTransitionEventArgs&lt;/span&gt; executeTransitionEventArgs) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; states = executeTransitionEventArgs.&lt;span style="color: purple"&gt;StateMachine&lt;/span&gt;.&lt;span style="color: purple"&gt;States&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;OfType&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;XpoState&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue"&gt;var&lt;/span&gt; &lt;span style="font-weight: bold"&gt;state&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; states) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;            &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: #008b8b"&gt;IsNotGranted&lt;/span&gt;(&lt;span style="font-weight: bold"&gt;state&lt;/span&gt;))&lt;/p&gt;    &lt;p style="margin: 0px"&gt;                &lt;span style="color: blue"&gt;throw&lt;/span&gt; &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;UserFriendlyException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Permissions are not granted for transitioning to the "&lt;/span&gt; + &lt;span style="font-weight: bold"&gt;state&lt;/span&gt;.&lt;span style="color: purple"&gt;Caption&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: #008b8b"&gt;IsNotGranted&lt;/span&gt;(&lt;span style="color: #00008b"&gt;XpoState&lt;/span&gt; state) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: #008b8b"&gt;IsNotGranted&lt;/span&gt;(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt;(&lt;span style="color: #00008b"&gt;StateMachineTransitionModifier&lt;/span&gt;.&lt;span style="color: purple; font-weight: bold"&gt;Deny&lt;/span&gt;, state.&lt;span style="color: purple"&gt;Caption&lt;/span&gt;, state.&lt;span style="color: purple"&gt;StateMachine&lt;/span&gt;.&lt;span style="color: purple"&gt;Name&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;    &lt;span style="color: blue"&gt;static&lt;/span&gt; &lt;span style="color: blue"&gt;bool&lt;/span&gt; &lt;span style="color: #008b8b"&gt;IsNotGranted&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IPermission&lt;/span&gt; permission) {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;var&lt;/span&gt; securityComplex = ((&lt;span style="color: #00008b"&gt;SecurityBase&lt;/span&gt;)&lt;span style="color: #00008b"&gt;SecuritySystem&lt;/span&gt;.&lt;span style="color: purple"&gt;Instance&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;bool&lt;/span&gt; isGrantedForNonExistentPermission = securityComplex.&lt;span style="color: purple"&gt;IsGrantedForNonExistentPermission&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        securityComplex.&lt;span style="color: purple"&gt;IsGrantedForNonExistentPermission&lt;/span&gt; = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;bool&lt;/span&gt; granted = &lt;span style="color: #00008b"&gt;SecuritySystem&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;IsGranted&lt;/span&gt;(permission);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        securityComplex.&lt;span style="color: purple"&gt;IsGrantedForNonExistentPermission&lt;/span&gt; = isGrantedForNonExistentPermission;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;        &lt;span style="color: blue"&gt;return&lt;/span&gt; granted;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;    }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;During the writing of this post &lt;a href="http://community.devexpress.com/user/Profile.aspx?UserID=24781" target="_blank"&gt;M. Brekhof&lt;/a&gt; asked if it is possible to hide the transition in the UI if there are no permissions. This is a certainly a useful feature to include in the new module. To implement it we can subscribe to the &lt;em&gt;ItemsChanged&lt;/em&gt; event of the &lt;em&gt;ChangeStateAction &lt;/em&gt;and use the &lt;span style="color: #008b8b"&gt;IsGranted &lt;/span&gt;method there.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-R6eHYVrCIm8/TkA2ma7hVfI/AAAAAAAABKc/FISomJJIhac/s1600-h/image9.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-plcAPGsOzWs/TkA2nLmCBHI/AAAAAAAABKg/ZP9IBdtYVTw/image_thumb5.png?imgmax=800" width="978" height="314" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Using the model to control the above allows us more flexibility as we can choose whether to include these improvements or not. In order to do so we need to define and register a model extender.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-bLeimy-s7xw/TkA2nxu9v5I/AAAAAAAABKk/loTprdBq-a4/s1600-h/image14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-hU4j9nTerY4/TkA2orTdFdI/AAAAAAAABKo/b7DTBrqPu80/image_thumb8.png?imgmax=800" width="815" height="255" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It should be clear that this is a rapid development! In a few short minutes we have created a module which can be used as often as necessary to enhance the functionality of our applications. This is another fine example of getting the job done the XAF way!&lt;/p&gt;  &lt;p&gt;So far we have not discussed how to create lookups for our &lt;span style="color: #00008b"&gt;StateMachineTransitionPermission&lt;/span&gt; StateMachineName,StateName properties. Don’t worry all of this will be featured in part 2. In the meantime if any of you need any other information please let me know so that I can cover it too.&lt;/p&gt;  &lt;p&gt;Happy eXpanding!&lt;/p&gt;  &lt;p&gt;eXpand is the first open source project based on the DevExpress eXpressApp Framework (XAF). More info is available at &lt;a href="http://www.expandframework.com/"&gt;www.expandframework.com&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-7281003524172772371?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CbCivvzYcdL4cwXcxR4ZR03ev10/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CbCivvzYcdL4cwXcxR4ZR03ev10/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CbCivvzYcdL4cwXcxR4ZR03ev10/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CbCivvzYcdL4cwXcxR4ZR03ev10/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/2-pTRSdQlD4" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T17:57:34.617+02:00</app:edited><media:thumbnail url="http://lh3.ggpht.com/-mvXEodC0qp0/TkA2j29T79I/AAAAAAAABKQ/v2Y4Pzz9Jvo/s72-c/image_thumb4.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/08/creating-state-machine-module-for.html</feedburner:origLink></item><item><title>Manually starting workflows – the best choice</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/RplZsrU4bMg/manually-starting-workflows-best-choice.html</link><category>Xaf</category><category>DX</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Wed, 03 Aug 2011 04:57:36 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-6476930808729582930</guid><description>&lt;p&gt;&lt;u&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;       &lt;br /&gt;&lt;/u&gt;&lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/07/19/manually-starting-workflows.aspx" target="_blank"&gt;Manually starting workflows&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the first &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/07/19/manually-starting-workflows.aspx" target="_blank"&gt;post&lt;/a&gt; of the series we saw how to start a workflow using a WCF service. Furthermore we also discussed doing this using the module’s out of the box mechanisms. So far however, we haven’t had time to analyze the reasons for choosing one method or the other. This post aims to clarify the situation.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;WCF Solution&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;As &lt;a href="http://community.devexpress.com/members/Dennis-_2800_DevExpress-Support_2900_.aspx" target="_blank"&gt;Dennis&lt;/a&gt; likes to say, “There is no need to light a cigar with a nuclear reactor”. This is certainly true when it comes to the WCF solution as it can be somewhat unwieldy. In addition we have to come to terms with more technology as it requires configuration for even the smallest task. For example, the client always needs to know the WCF service address. It is also very difficult to work with WF instances because in order to accomplish common tasks (view, track status, generate reports, measure client service reply time) we need to introduce a system of persistent classes which will help to simulate the out of the box behavior. A third issue arises when modifying the solution because there is often a need for changes to occur in many places at the same time. For example when introducing additional properties we have to change client code and Receive contracts.&lt;/p&gt;  &lt;p&gt;This option is only recommended when we have a large system (&amp;gt;10000 WF instances). Only then will we notice a gain in performance. This is because one WCF request can start a workflow which costs nothing compared to multiple Sql Queries. In all other cases we are fortunate that XAF allows us to take the easy road as usual!&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Out of the box&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Take our usual product ordering task; a client simply creates a new &lt;em&gt;OrderRequest &lt;/em&gt;business object and fills the necessary members. A workflow with&amp;#160; &lt;em&gt;an AutoStartWhenObjectIsCreated&lt;/em&gt; condition will start when the object is saved. After that we can access all the information in the workflow algorithm. This method allows us to,&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Track &lt;em&gt;OrderRequest&lt;/em&gt; objects since they are just business objects &lt;/li&gt;    &lt;li&gt;Measure client activities using Charts or KPI &lt;/li&gt;    &lt;li&gt;Track sale stages &lt;a title="http://it.toolbox.com/blogs/original-thinking/mashup-technology-sales-23755" href="http://it.toolbox.com/blogs/original-thinking/mashup-technology-sales-23755"&gt;http://it.toolbox.com/blogs/original-thinking/mashup-technology-sales-23755&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Access all the XAF benefits! &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Note that a similar process is described in &lt;a href="http://community.devexpress.com/blogs/eaf/archive/2011/06/14/working-with-crud-activities-short-transactions.aspx" target="_blank"&gt;Working with CRUD activities – Short Transactions&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We would appreciate your feedback on this post. Has it been useful to you? Feel free to contact us&amp;#160; with any further questions&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Related Links&lt;/strong&gt; &lt;/u&gt;    &lt;br /&gt;&lt;a href="http://community.devexpress.com/blogs/eaf/archive/tags/WF/default.aspx" target="_blank"&gt;Blog posts&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument3343" target="_blank"&gt;Online documentation&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-6476930808729582930?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JbUhJ500StvrjIB2UPEmYxHNO_0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JbUhJ500StvrjIB2UPEmYxHNO_0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JbUhJ500StvrjIB2UPEmYxHNO_0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JbUhJ500StvrjIB2UPEmYxHNO_0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/RplZsrU4bMg" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-03T14:57:36.448+03:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/08/manually-starting-workflows-best-choice.html</feedburner:origLink></item><item><title>How to use an eXpand module with an existing XAF application</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/SnZE2kyrD_E/how-to-use-expand-module-with-existing.html</link><category>Xaf</category><category>eXpand</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 01 Aug 2011 09:33:09 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-2268913375094887601</guid><description>&lt;p&gt;&lt;em&gt;&lt;font size="1"&gt;Let me describe for a moment how we at DX work. We build and sell software which means that we only sell and provide support for products that have been built and tested by us! However I am here as a framework evangelist and huge XAF fan. This makes it my duty to spread the word as much as I can and make XAF even bigger. To this end through collaboration within the XAF community, we have been building and supporting &lt;/font&gt;&lt;/em&gt;&lt;a href="http://www.expandframework.com"&gt;&lt;em&gt;&lt;font size="1"&gt;eXpand&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;font size="1"&gt;. This framework follows XAF to the letter and takes things even further. &lt;a href="http://www.expandframework.com"&gt;&lt;em&gt;&lt;font size="1"&gt;eXpand&lt;/font&gt;&lt;/em&gt;&lt;/a&gt; gets its inspiration from real life situations and bases itself on examples from DX &lt;a href="http://www.devexpress.com/Support/Center/" target="_blank"&gt;SUPPORT CENTER&lt;/a&gt;. &lt;a href="http://www.expandframework.com"&gt;&lt;em&gt;&lt;font size="1"&gt;eXpand&lt;/font&gt;&lt;/em&gt;&lt;/a&gt; is the first open source project based on the &lt;a href="http://devexpress.com/Products/NET/Application_Framework/" target="_blank"&gt;DevExpress eXpressApp Framework (XAF)&lt;/a&gt;. More info is available at &lt;/font&gt;&lt;/em&gt;&lt;a href="http://www.expandframework.com"&gt;&lt;em&gt;&lt;font size="1"&gt;www.expandframework.com&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;font size="1"&gt; and our very existence relies on your efforts! Anyone is welcome to contribute and enjoy the rewards. It is not necessary to be a XAF guru, we can all manage to create a behavior taken from &lt;a href="http://search.devexpress.com/?q=XPO+OR+XAF&amp;amp;p=T4|P2|0&amp;amp;d=16" target="_blank"&gt;DevExpress code central&lt;/a&gt;. Let’s work together to enhance our beloved XAF!&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Using an eXpand module with an existing XAF application is an issue that is being raised a lot recently and I am sure it deserves a post and a place in &lt;a href="http://www.expandframework.com/support/help.html" target="_blank"&gt;Xpand Wiki&lt;/a&gt;. The following information applies to any Xpand module. Note that installing an Xpand module is almost as easy as using a XAF one.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;u&gt;Introduction&lt;/u&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Firstly, as a base type for our application components it is imperative to use XpandWinApplication or XpandWebApplication. Therefore we need to reference Xpand.ExpressApp.Win or Xpand.ExpressApp.Web assemblies from our application projects and replace their components’ base types accordingly,&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-RhFXBoyaMOc/TjbTV0zjdTI/AAAAAAAABJs/bdgHE3Qr_pw/s1600-h/image22.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-Rwdo0fip1Dc/TjbTWih4kgI/AAAAAAAABJw/euVaGNX13-s/image_thumb14.png?imgmax=800" width="714" height="155" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Additionally we need to reference Xpand.Persistent.BaseImpl. Having similar architecture with XAF, eXpand modules use interfaces and their implementations are hosted in the BaseImpl assembly. Xpand modules know how to locate the Business Objects they require so this is all we need to do at this point. &lt;/p&gt;  &lt;p align="justify"&gt;Note; BaseImpl assembly has no references to DX BaseImpl and it is possible to use a replace it with a custom one .&lt;/p&gt;  &lt;p align="justify"&gt;&lt;u&gt;Registering in Toolbox&lt;/u&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Now, unless we are a XAF guru, we have to register the assemblies in the VS toolbox. I suggest creating the toolbox items within a new Xpand Tab as shown. At this point we don’t have the resources to create our own ToolBoxCreator utility. If any VS IDE guru wants to contribute such a tool, we owe him one!&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="500"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="250"&gt;&lt;a href="http://lh6.ggpht.com/-4cfS9-yfmbU/TjbTXUDW7XI/AAAAAAAABJ0/IX2ZqcocFcQ/s1600-h/image6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-Vi4GX6yO5HM/TjbTYg9YrBI/AAAAAAAABJ4/Ge1B-9vOzLM/image_thumb4.png?imgmax=800" width="298" height="480" /&gt;&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="250"&gt;&lt;a href="http://lh4.ggpht.com/-6qvBYNJQ9kI/TjbTZbeAfzI/AAAAAAAABJ8/YQ-Ywr0luUw/s1600-h/image1.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-cg6kIAqZ4Ck/TjbTaYtb-qI/AAAAAAAABKA/0zD6UM8Ws-k/image_thumb1.png?imgmax=800" width="448" height="312" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p align="justify"&gt;&lt;u&gt;Registration&lt;/u&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Registering and using a module is as easy as dragging and dropping it into the &lt;a href="http://documentation.devexpress.com/#Xaf/CustomDocument2827" target="_blank"&gt;Application Designer&lt;/a&gt;. The designer will then add all required references and modules for us.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-u9LhvJlKT88/TjbTbT4rCXI/AAAAAAAABKE/H1fOT5Ut3Jc/s1600-h/image16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-ZmTbA3N0Jdc/TjbTc8pvi5I/AAAAAAAABKI/ueI6GBN5wiE/image_thumb10.png?imgmax=800" width="522" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Give us your feedback&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Was this post useful to you? Do you want to learn more about Xpand framework? We would love to hear your feedback!&lt;/p&gt;  &lt;p&gt;Happy eXpanding!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-2268913375094887601?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lmmU8lD563QqCtitH9PuqJua2hQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lmmU8lD563QqCtitH9PuqJua2hQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lmmU8lD563QqCtitH9PuqJua2hQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lmmU8lD563QqCtitH9PuqJua2hQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/SnZE2kyrD_E" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-01T19:33:09.767+03:00</app:edited><media:thumbnail url="http://lh5.ggpht.com/-Rwdo0fip1Dc/TjbTWih4kgI/AAAAAAAABJw/euVaGNX13-s/s72-c/image_thumb14.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/08/how-to-use-expand-module-with-existing.html</feedburner:origLink></item><item><title>New ImportWizard on eXpand v11</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/x_BHzr6xCck/new-importwizard-on-expand-v11.html</link><category>IO</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Thu, 09 Jun 2011 07:00:03 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-7811728365878011649</guid><description>&lt;p&gt;I am very happy to announce the release of eXpandFramwework v11. Our team has already tested the framework in production. However any feedback or discussions on the new version are most welcome. Please you our &lt;a href="http://www.expandframework.com/forum.html" target="_blank"&gt;forums&lt;/a&gt; for better collaboration.&lt;/p&gt;  &lt;p&gt;In addition we most welcome &lt;a href="http://mdworkstuff.blogspot.com/" target="_blank"&gt;Martynas Dauciunas&lt;/a&gt; as the newest eXpandframework member. Martys joined our team along with his ImportWizard module. The module can map and import Excel files! &lt;/p&gt;  &lt;p&gt;You can read more about it and see the demo video in our &lt;a href="http://www.expandframework.com/blog.html" target="_blank"&gt;blog&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As always eXpandFramework is available for download &lt;a href="http://www.expandframework.com/downloads/download.html" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-7811728365878011649?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9y3lcPJzs2EugTgdqgRAzleuQNU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9y3lcPJzs2EugTgdqgRAzleuQNU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9y3lcPJzs2EugTgdqgRAzleuQNU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9y3lcPJzs2EugTgdqgRAzleuQNU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/x_BHzr6xCck" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-09T17:00:03.996+03:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/06/new-importwizard-on-expand-v11.html</feedburner:origLink></item><item><title>Evangelizing XAF,XPO and leading eXpand framework</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/Hj48l2YIapI/evangelizing-xafxpo-and-leading-expand.html</link><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Mon, 04 Apr 2011 10:01:13 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-8547123987792703822</guid><description>&lt;p&gt;I am very very happy to announce that I have joined DevExpress as technical evangelist for the Frameworks Team. I believe that it’s not a coincidence that my first name “Apostolos” has a very similar meaning to Evangelist!&lt;/p&gt;  &lt;p&gt;I promise to myself and to all of you very exciting times to come&amp;#160; I will do my best to honor this great opportunity and evangelize &lt;a href="http://www.devexpress.com/xaf/" target="_blank"&gt;XAF&lt;/a&gt; through out the universe, because its the greatest framework I ever came across.&lt;/p&gt;  &lt;p&gt;I am completely overwhelmed and let this movie clip be an expression of my feelings.&lt;/p&gt;  &lt;p&gt;&lt;iframe title="YouTube video player" src="http://www.youtube.com/embed/aWL6R1rQLqY" frameborder="0" width="640" height="390" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;/p&gt;  &lt;p&gt;My new responsibilities will include posting to XAF and XPO blogs and publish videos for DevExpress TV. I will be than more happy to discuss any problems, questions, and ideas you have and these can easily end up as blog posts or webcasts. I will also be attending lots of meetings around the world so I hope I am able to shake hands with many of you and soon enough.&lt;/p&gt;  &lt;p&gt;You can also be sure that I will continue to lead and support &lt;a href="http://github.com/eXpand" target="_blank"&gt;eXpand&lt;/a&gt; Framework and this blog will remain devoted to it.&lt;/p&gt;  &lt;p&gt;I am already in LA to catch up with The Team,and would be absolutely delighted to have a beer or two with anybody who is around. I am can now be reached at &lt;a href="mailto:apostolis.bekiaris@devexpress.com"&gt;apostolis.bekiaris@devexpress.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And for those of you that wanted to see a picture of the headquarters. here is a nice one&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_5YPm4JGkfwE/TZn5Vbjg9_I/AAAAAAAABI4/uoC05X0OjH8/s1600-h/dx-headquarters%5B3%5D.jpg"&gt;&lt;img title="dx-headquarters" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="290" alt="dx-headquarters" src="http://lh4.ggpht.com/_5YPm4JGkfwE/TZn5WLD61yI/AAAAAAAABI8/MuZDNHC-j-o/dx-headquarters_thumb%5B1%5D.jpg?imgmax=800" width="378" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Happy DXing to all of you!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-8547123987792703822?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Zt5vf6kIaJJLMw5HW5SgTIbC1uI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Zt5vf6kIaJJLMw5HW5SgTIbC1uI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Zt5vf6kIaJJLMw5HW5SgTIbC1uI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Zt5vf6kIaJJLMw5HW5SgTIbC1uI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/Hj48l2YIapI" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-04T20:01:13.289+03:00</app:edited><media:thumbnail url="http://img.youtube.com/vi/aWL6R1rQLqY/default.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/04/evangelizing-xafxpo-and-leading-expand.html</feedburner:origLink></item><item><title>XAF - Quartz JobScheduler module</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/7jvdK8gOxEU/xaf-quartz-jobscheduler-module.html</link><category>JobSceduler</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Fri, 29 Apr 2011 07:38:49 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-1727442212921444014</guid><description>&lt;p&gt;In the past few weeks I have been working on creating a &lt;a href="http://www.devexpress.com/xaf/" target="_blank"&gt;XAF&lt;/a&gt; wrapper module for &lt;a href="http://quartznet.sourceforge.net/" target="_blank"&gt;Quartz.Net&lt;/a&gt; v2 which is is a full-featured, open source job scheduling system that can be used from smallest apps to large scale enterprise systems.&lt;/p&gt;  &lt;p&gt;For those who are not familiar with concept of job scheduling, here is some &lt;a href="http://en.wikipedia.org/wiki/Job_scheduler" target="_blank"&gt;background information&lt;/a&gt;. Also, there great &lt;a href="http://quartznet.sourceforge.net/tutorial/index.html" target="_blank"&gt;tutorial&lt;/a&gt; for Quartz, which will give you a good and necessary introduction&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Quartz default implementation&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Quartz supports several datastores (sqlserver,ce,mysql,imemory etc) that you can utilize by providing an appropriate connection string, same as XPO.&lt;/p&gt;  &lt;p&gt;It has a decoupled architecture with just 2 basic entities (JobDetails and Triggers) which are related by Group property. For instance you can create a number of JobDetails, set its Group to “LongRunning”, than create a Trigger with the same Group property. When the trigger is executed, all jobs for that group will run. &lt;/p&gt;  &lt;p&gt;There is also a JobDataMap which represents a dictionary that holds serialized values and is used for jobs-triggers communication. You fill it with data when you create a trigger or a job and when they are executed you get that values back for further use. &lt;/p&gt;  &lt;p&gt;JobDetails holds a reference of the Type that implements the Quartz.IJob interface where you put the code specific to your job. Quartz instantiates that type using reflection and runs its Execute method using the context parameter that passes all available information (Scheduler instance, JobDataMaps, etc.)&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;namespace&lt;/span&gt; &lt;span style="color: #00008b"&gt;Quartz&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; public&lt;/span&gt; &lt;span style="color: blue"&gt;interface&lt;/span&gt; &lt;span style="color: #00008b"&gt;IJob&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;Execute&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IJobExecutionContext&lt;/span&gt; context);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;That was a description of how Quartz works by default. Now we would want to put a nice-looking and functional UI on top, and we have XAF (+Xpand) to come for the rescue. To provide as much decoupling as possible from the original Quartz implementation I resorted to creating persistent classes with the same set of properties as Quartz ones. I also needed to have a set of controllers to call Quartz API when the Xpand classes are changed. This allows me to be able to design any XAF domain and use the API to interface with Quartz datastore.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Xpand JobScheduler Domain description&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;First of all we have the same basic entities XpandJobDetail, XpandJobTrigger. A JobSchedulerGroup was introduced to achieve the default quartz relationship as shown below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_5YPm4JGkfwE/TZW20nimm-I/AAAAAAAABIU/FhQ1qK3Wl8A/s1600-h/image4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_5YPm4JGkfwE/TZW21d3VjiI/AAAAAAAABIY/mVgOoSjjUTM/image_thumb2.png?imgmax=800" width="612" height="318" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Additionally a many to many relationship between XpandJobDetail and XpandJobTrigger has been added allowing you to associate triggers, and jobs (even if they not belong to any group).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_5YPm4JGkfwE/TZW21wImmBI/AAAAAAAABIc/RQRm3o1BdsY/s1600-h/image9.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_5YPm4JGkfwE/TZW22QSgDMI/AAAAAAAABIg/JircDAPoFLM/image_thumb5.png?imgmax=800" width="557" height="274" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;A new type of trigger the JobListenerTrigger was introduced in order to be able to trigger a job after an event of another job was executed&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_5YPm4JGkfwE/TZW220uHAMI/AAAAAAAABIk/CP0etdrAD78/s1600-h/image13.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_5YPm4JGkfwE/TZW23k4Hf7I/AAAAAAAABIo/kXITrKk7XOk/image_thumb7.png?imgmax=800" width="472" height="344" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now our XpandJobDetail stores a reference to the Quartz.IJob interface using the Persistent XpandJob object (the same way Quarz does). However, one would have to decorate this class with JobDetailDataMapType or JobDataMapType attribute in order to tell XAF which XpandJobDataMap to associate with the XpandJobDetail or XpandJob And, as you already guessed, JobDataMap, that is dictionary instance for Quartz, is populated from XAF persistent classes. &lt;/p&gt;  &lt;p&gt;Bellow you see the sample ThresholdCalculationJob provided by Xpand.ExpressApp.JobScheduler.Jobs assembly:&lt;/p&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;     &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;System&lt;/span&gt;.&lt;span style="color: #00008b"&gt;ComponentModel&lt;/span&gt;.&lt;span style="color: #00008b"&gt;DisplayName&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;ThresholdJob&amp;quot;&lt;/span&gt;)]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;[&lt;span style="color: #00008b"&gt;JobDetailDataMapType&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;ThresholdJobDetailDataMap&lt;/span&gt;))]&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #00008b"&gt;ThresholdCalculationJob&lt;/span&gt; : &lt;span style="color: #00008b"&gt;IJob&lt;/span&gt; {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; public&lt;/span&gt; &lt;span style="color: blue"&gt;const&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; &lt;span style="color: purple; font-weight: bold"&gt;ThresholdCalcCount&lt;/span&gt; = &lt;span style="color: #a31515"&gt;&amp;quot;ThresholdCalcCount&amp;quot;&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; readonly&lt;/span&gt; &lt;span style="color: #00008b"&gt;ILog&lt;/span&gt; &lt;span style="color: purple"&gt;log&lt;/span&gt; = &lt;span style="color: #00008b"&gt;LogManager&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;GetLogger&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #00008b"&gt;ThresholdCalculationJob&lt;/span&gt;));&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160; public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; &lt;span style="color: #008b8b"&gt;Execute&lt;/span&gt;(&lt;span style="color: #00008b"&gt;IJobExecutionContext&lt;/span&gt; context) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: purple"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; log&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Info&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;EXECUTING:ThresholdCalculationJob&amp;quot;&lt;/span&gt;);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var&lt;/span&gt; application = ((&lt;span style="color: #00008b"&gt;IXpandScheduler&lt;/span&gt;)context.&lt;span style="color: purple"&gt;Scheduler&lt;/span&gt;).&lt;span style="color: purple"&gt;Application&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var&lt;/span&gt; objectSpaceProvider = application.&lt;span style="color: purple"&gt;ObjectSpaceProvider&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var&lt;/span&gt; jobDataMap = context.&lt;span style="color: purple"&gt;JobDetail&lt;/span&gt;.&lt;span style="color: purple"&gt;JobDataMap&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var&lt;/span&gt; typeInfo = objectSpaceProvider.&lt;span style="color: purple"&gt;TypesInfo&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;FindTypeInfo&lt;/span&gt;((&lt;span style="color: #00008b"&gt;Type&lt;/span&gt;)jobDataMap.&lt;span style="color: #008b8b"&gt;Get&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ThresholdJobDetailDataMap&lt;/span&gt;&amp;gt;(map =&amp;gt; map.&lt;span style="color: purple"&gt;DataType&lt;/span&gt;));&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; object&lt;/span&gt; count;&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; using&lt;/span&gt; (&lt;span style="color: blue"&gt;var&lt;/span&gt; unitOfWork = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #00008b"&gt;UnitOfWork&lt;/span&gt;(((&lt;span style="color: #00008b"&gt;ObjectSpaceProvider&lt;/span&gt;)objectSpaceProvider).&lt;span style="color: purple"&gt;WorkingDataLayer&lt;/span&gt;)) {&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; count = unitOfWork.&lt;span style="color: #008b8b"&gt;GetCount&lt;/span&gt;(typeInfo.&lt;span style="color: purple"&gt;Type&lt;/span&gt;, &lt;span style="color: #00008b"&gt;CriteriaOperator&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;Parse&lt;/span&gt;(jobDataMap.&lt;span style="color: #008b8b"&gt;GetString&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ThresholdJobDetailDataMap&lt;/span&gt;&amp;gt;(map =&amp;gt; map.&lt;span style="color: purple"&gt;Criteria&lt;/span&gt;)));&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; jobDataMap.&lt;span style="color: #008b8b"&gt;Put&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ThresholdJobDetailDataMap&lt;/span&gt;&amp;gt;(&lt;span style="color: purple; font-weight: bold"&gt;ThresholdCalcCount&lt;/span&gt;, count);&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;      &lt;p style="margin: 0px"&gt;}&lt;/p&gt;      &lt;p style="margin: 0px"&gt;&lt;/p&gt;   &lt;/div&gt;    &lt;p style="margin: 0px"&gt;Viola! We get a XafApplication instance and off we go using our usual XAF routines!&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;/p&gt; &lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;Apart from the XafApplication instance, the above code has some other interesting details, e.g.&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;&lt;span style="color: blue"&gt;var&lt;/span&gt; typeInfo = objectSpaceProvider.&lt;span style="color: purple"&gt;TypesInfo&lt;/span&gt;.&lt;span style="color: #008b8b"&gt;FindTypeInfo&lt;/span&gt;((&lt;span style="color: #00008b"&gt;Type&lt;/span&gt;)jobDataMap.&lt;span style="color: #008b8b"&gt;Get&lt;/span&gt;&amp;lt;&lt;span style="color: #00008b"&gt;ThresholdJobDetailDataMap&lt;/span&gt;&amp;gt;(map =&amp;gt; map.&lt;span style="color: purple"&gt;DataType&lt;/span&gt;));&lt;/div&gt;  &lt;div style="font-family: consolas; background: white; color: black; font-size: 10pt"&gt;   &lt;p style="margin: 0px"&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;Here we are requesting the DataType property value from &lt;span style="color: #00008b"&gt;ThresholdJobDetailDataMap&lt;/span&gt; object (didn’t I already tell you that our XpandJobDetails have JobDataMaps are simply XAF persistent objects?).&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;strong&gt;The server&lt;/strong&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;Xpand provides a very easy way to configure Xpand.Quartz.Server assembly. Server is built with the &lt;a href="http://topshelf-project.com/" target="_blank"&gt;TopShelf&lt;/a&gt; framework, that means you can either run it as a console app or as a windows service (using –install as parameter) . Server is responsible of executig all jobs (classes that implement that Quartz.IJob interface). &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;em&gt;One thing you have to remember is that, since Server instantiates XafApplication, the configuration file on the server has to be synchronized with the one on the client.&lt;/em&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;In order for the server to know which XafAppliation to create the following change is needed:&lt;a href="http://lh4.ggpht.com/_5YPm4JGkfwE/TZW24PCqSwI/AAAAAAAABIs/_V-aGiOjUMg/s1600-h/image17.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_5YPm4JGkfwE/TZW24nHtr7I/AAAAAAAABIw/QptCmvL9FQ0/image_thumb9.png?imgmax=800" width="725" height="74" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;strong&gt;The Demo&lt;/strong&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Xpand FeatureCenter has a special assembly (Xpand.ExpressApp.JobScheduler.Jobs) that provides 2 sample job, the ThresholdCalculationJob that you saw already and SendThresholdCalculationEmailJob. Also there is a new EmailTemplateEngine that has been build in order to support the SendThresholdCalculationEmailJob which is naturally based on persistent objects and that can be configured runtime.&lt;/p&gt;  &lt;p&gt;The scripts that create a Quartz database can be found in &lt;a href="http://github.com/eXpand" target="_blank"&gt;eXpand&lt;/a&gt; sources under Resource/Quartz folder. Quartz database has to be created in order to run the demo from FeatureCenter.&lt;/p&gt;  &lt;p&gt;To give you a better idea about above mentioned functionality and to show what the sample application (Feature Center in this case) that uses JobScheduler module may look like, here is a short screen cast:&lt;/p&gt;  &lt;p&gt;&lt;embed src="http://blip.tv/play/AYKv6AkA" type="application/x-shockwave-flash" width="900" height="500" allowscriptaccess="always" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/p&gt;  &lt;p&gt;You can d/l eXpand Framework latest version from &lt;a href="http://expandframework.com/downloads"&gt;http://expandframework.com/downloads&lt;/a&gt; and sent use your feed back at our &lt;a href="http://expandframework.com/forum.html" target="_blank"&gt;forums&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-1727442212921444014?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TqdWZjKuzvT47CTX9azBWv4Zoz8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TqdWZjKuzvT47CTX9azBWv4Zoz8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TqdWZjKuzvT47CTX9azBWv4Zoz8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TqdWZjKuzvT47CTX9azBWv4Zoz8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/7jvdK8gOxEU" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-29T17:38:49.516+03:00</app:edited><media:thumbnail url="http://lh4.ggpht.com/_5YPm4JGkfwE/TZW21d3VjiI/AAAAAAAABIY/mVgOoSjjUTM/s72-c/image_thumb2.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><media:content url="http://feedproxy.google.com/~r/AbekiarisBlog/~5/WVgwErhp81o/AYKv6AkA" fileSize="352724" type="application/x-shockwave-flash" /><itunes:explicit>no</itunes:explicit><itunes:subtitle> In the past few weeks I have been working on creating a XAF wrapper module for Quartz.Net v2 which is is a full-featured, open source job scheduling system that can be used from smallest apps to large scale enterprise systems. For those who are not famil</itunes:subtitle><itunes:author>noreply@blogger.com (Apostolis Bekiaris)</itunes:author><itunes:summary> In the past few weeks I have been working on creating a XAF wrapper module for Quartz.Net v2 which is is a full-featured, open source job scheduling system that can be used from smallest apps to large scale enterprise systems. For those who are not familiar with concept of job scheduling, here is some background information. Also, there great tutorial for Quartz, which will give you a good and necessary introduction Quartz default implementation Quartz supports several datastores (sqlserver,ce,mysql,imemory etc) that you can utilize by providing an appropriate connection string, same as XPO. It has a decoupled architecture with just 2 basic entities (JobDetails and Triggers) which are related by Group property. For instance you can create a number of JobDetails, set its Group to “LongRunning”, than create a Trigger with the same Group property. When the trigger is executed, all jobs for that group will run. There is also a JobDataMap which represents a dictionary that holds serialized values and is used for jobs-triggers communication. You fill it with data when you create a trigger or a job and when they are executed you get that values back for further use. JobDetails holds a reference of the Type that implements the Quartz.IJob interface where you put the code specific to your job. Quartz instantiates that type using reflection and runs its Execute method using the context parameter that passes all available information (Scheduler instance, JobDataMaps, etc.) namespace Quartz { &amp;#160;&amp;#160;&amp;#160; public interface IJob { &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; void Execute(IJobExecutionContext context); &amp;#160;&amp;#160;&amp;#160; } } That was a description of how Quartz works by default. Now we would want to put a nice-looking and functional UI on top, and we have XAF (+Xpand) to come for the rescue. To provide as much decoupling as possible from the original Quartz implementation I resorted to creating persistent classes with the same set of properties as Quartz ones. I also needed to have a set of controllers to call Quartz API when the Xpand classes are changed. This allows me to be able to design any XAF domain and use the API to interface with Quartz datastore. Xpand JobScheduler Domain description First of all we have the same basic entities XpandJobDetail, XpandJobTrigger. A JobSchedulerGroup was introduced to achieve the default quartz relationship as shown below: Additionally a many to many relationship between XpandJobDetail and XpandJobTrigger has been added allowing you to associate triggers, and jobs (even if they not belong to any group). A new type of trigger the JobListenerTrigger was introduced in order to be able to trigger a job after an event of another job was executed Now our XpandJobDetail stores a reference to the Quartz.IJob interface using the Persistent XpandJob object (the same way Quarz does). However, one would have to decorate this class with JobDetailDataMapType or JobDataMapType attribute in order to tell XAF which XpandJobDataMap to associate with the XpandJobDetail or XpandJob And, as you already guessed, JobDataMap, that is dictionary instance for Quartz, is populated from XAF persistent classes. Bellow you see the sample ThresholdCalculationJob provided by Xpand.ExpressApp.JobScheduler.Jobs assembly: [System.ComponentModel.DisplayName(&amp;quot;ThresholdJob&amp;quot;)] [JobDetailDataMapType(typeof(ThresholdJobDetailDataMap))] public class ThresholdCalculationJob : IJob { &amp;#160;&amp;#160;&amp;#160; public const string ThresholdCalcCount = &amp;quot;ThresholdCalcCount&amp;quot;; &amp;#160;&amp;#160;&amp;#160; readonly ILog log = LogManager.GetLogger(typeof(ThresholdCalculationJob)); &amp;#160;&amp;#160;&amp;#160; public void Execute(IJobExecutionContext context) { &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; log.Info(&amp;quot;EXECUTING:ThresholdCalculationJob&amp;quot;); &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var application = ((IXpandScheduler)context.Scheduler).Application; &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var objectSpaceProvider = ap</itunes:summary><itunes:keywords>JobSceduler</itunes:keywords><feedburner:origLink>http://apobekiaris.blogspot.com/2011/04/xaf-quartz-jobscheduler-module.html</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/AbekiarisBlog/~5/WVgwErhp81o/AYKv6AkA" length="352724" type="application/x-shockwave-flash" /><feedburner:origEnclosureLink>http://blip.tv/play/AYKv6AkA</feedburner:origEnclosureLink></item><item><title>eXpand moves to Interactive development</title><link>http://feedproxy.google.com/~r/AbekiarisBlog/~3/_kkk6dQ4eyg/expand-moves-to-interactive-development.html</link><category>eXpand</category><author>noreply@blogger.com (Apostolis Bekiaris)</author><pubDate>Tue, 29 Mar 2011 10:34:20 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3509234234245012858.post-2814434194264016597</guid><description>&lt;p&gt;For the past two years we concentrated on working with real world projects. We also worked with SC and forum issues from DevExpress. All this we used to gather requirements for eXpand Framework. It was a good starting point and we need your active input to move further. In order to build a proper road map for &lt;a href="http://github.com/eXpand" target="_blank"&gt;eXpand&lt;/a&gt; we have created several ways which we can use to work together.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The voting system&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;First off is a voting system based on &lt;a href="https://expandframework.uservoice.com/" target="_blank"&gt;UserVoice&lt;/a&gt; that has been in operation for some time now. Follow the link and you can see the most popular suggestions and you don’t even need to login to cast your votes.&lt;/p&gt;  &lt;p&gt;For some time now a voting system based on &lt;a href="https://expandframework.uservoice.com/" target="_blank"&gt;UserVoice&lt;/a&gt; is functional for our site.There you see the most popular suggestions.     &lt;br /&gt;But how it works? You just click on Cast your votes &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_5YPm4JGkfwE/TZHHwG4rQCI/AAAAAAAABHc/O0MnqcOkEsU/s1600-h/image%5B10%5D.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="584" alt="image" src="http://lh5.ggpht.com/_5YPm4JGkfwE/TZHHxl8BZwI/AAAAAAAABHg/22SbtmwTAJ0/image_thumb%5B6%5D.png?imgmax=800" width="749" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Searching for an idea is always preferred before posting a new suggestion :) &lt;/li&gt;    &lt;li&gt;Remember that you only have 10 votes for all the suggestions in the list. But you get those back if the suggestion you voted for gets implemented. So, vote carefully. Top right frame gives you the summary of the suggestions you voted for. &lt;/li&gt;    &lt;li&gt;To stay on top of the changes to the suggestions you can subscribe to the General activity feed &lt;/li&gt;    &lt;li&gt;The most important feature is the discussion that we would ideally have about each suggestion. And this is in your own benefit. You have to convince others of the importance of any given suggestion and have then cast their precious votes. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You can also see top 3 suggestions straight from eXpand’s home page:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_5YPm4JGkfwE/TZHHypUrgkI/AAAAAAAABHk/NL4rrvgrQpA/s1600-h/image%5B3%5D.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="400" alt="image" src="http://lh5.ggpht.com/_5YPm4JGkfwE/TZHHzc8OuJI/AAAAAAAABHo/1apEHBhRIsg/image_thumb%5B1%5D.png?imgmax=800" width="392" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The project management system&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In the first picture (top of this page) at the right frame the first suggestion is “&lt;em&gt;Provide what's new, changed, fixed&lt;/em&gt;”. We agree with you that this one should be taken very seriously - users should have a good reason to download latest revision. This suggestion is already assigned to our web master and CI expert &lt;a href="http://www.mash2.com/" target="_blank"&gt;Dima Janzen&lt;/a&gt; and as far as I know he is considering &lt;a href="http://www.redmine.org/"&gt;http://www.redmine.org/&lt;/a&gt; pas a project management system for our web site and he might speak about it when the time comes. We think that Redmine is an excellent and mature system, but do have a look at their web site (which is built on… Redmine!) and contribute to the discussion (&lt;a href="https://expandframework.uservoice.com/forums/95335-general/suggestions/1478633-provide-a-what-s-new-changed-fixed?ref=title"&gt;Provide a what's new, changed, fixed&lt;/a&gt;) if you have a comment or an alternative to suggest.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The blog&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Big thanks go to our irreplaceable Dima again who takes care of the web site and who just announced that our blog can republish YOUR blog (it is already republishing mine).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_5YPm4JGkfwE/TZHH0J7V4VI/AAAAAAAABHs/N4l4ZkV2df4/s1600-h/image%5B15%5D.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="377" alt="image" src="http://lh3.ggpht.com/_5YPm4JGkfwE/TZHH2IBR9QI/AAAAAAAABHw/1twUPAAs_BQ/image_thumb%5B9%5D.png?imgmax=800" width="494" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Do you have a blog?    &lt;br /&gt;Do you blog about &lt;a href="http://www.devexpress.com/xaf/" target="_blank"&gt;XAF&lt;/a&gt; / eXpandFramework ?     &lt;br /&gt;Do you want us to host your article on our blog?     &lt;br /&gt;    &lt;br /&gt;Please email &lt;a href="mailto:expand@expandframework.com" target="_blank"&gt;expand@expandframework.com&lt;/a&gt;, and we are more than happy to republish your articles on our site.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509234234245012858-2814434194264016597?l=apobekiaris.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MCo60-C74XHDAWxgDK86wBSS78Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MCo60-C74XHDAWxgDK86wBSS78Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MCo60-C74XHDAWxgDK86wBSS78Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MCo60-C74XHDAWxgDK86wBSS78Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AbekiarisBlog/~4/_kkk6dQ4eyg" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-29T20:34:20.358+03:00</app:edited><media:thumbnail url="http://lh5.ggpht.com/_5YPm4JGkfwE/TZHHxl8BZwI/AAAAAAAABHg/22SbtmwTAJ0/s72-c/image_thumb%5B6%5D.png?imgmax=800" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://apobekiaris.blogspot.com/2011/03/expand-moves-to-interactive-development.html</feedburner:origLink></item><media:rating>nonadult</media:rating></channel></rss>

