<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LieberLieber Software TeamBlog</title>
	<atom:link href="http://blog.lieberlieber.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lieberlieber.com</link>
	<description>was uns treibt und verfolgt!</description>
	<lastBuildDate>Mon, 30 Aug 2010 08:04:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Upgrading the AMUSEAuthenticationExample from Amuse 1.1 to Amuse 1.5</title>
		<link>http://blog.lieberlieber.com/2010/08/28/upgrading-the-amuseauthenticationexample-from-amuse-1-1-to-amuse-1-5/</link>
		<comments>http://blog.lieberlieber.com/2010/08/28/upgrading-the-amuseauthenticationexample-from-amuse-1-1-to-amuse-1-5/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 12:57:01 +0000</pubDate>
		<dc:creator>Simon Gorski</dc:creator>
				<category><![CDATA[AMUSE]]></category>
		<category><![CDATA[UML Simulation and Execution]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2539</guid>
		<description><![CDATA[As you might know, our Amuse team is working on the new release which should be finished next month. So I thought it would be good to have a first look at the new features &#8211; I took my first example which I created a few months ago and tried to use it with Amuse [...]]]></description>
			<content:encoded><![CDATA[<p>As you might know, our Amuse team is working on the <a href="http://blog.lieberlieber.com/2010/08/26/lieberlieber-amuse-version-1-5-to-be-released-in-september-2010/"  target="_blank">new release</a> which should be finished next month. So I thought it would be good to have a first look at the <a href="http://blog.lieberlieber.com/2010/07/08/lieberlieber-amuse-sneak-peak-of-upcoming-features/"  target="_blank">new features</a> &#8211; I took my <a href="http://blog.lieberlieber.com/2010/05/03/lieberlieber-amuse-using-statemachines-to-build-winforms-flows/"  target="_blank">first example</a> which I created a few months ago and tried to use it with Amuse 1.5.</p>
<p>I opened the existing project and wanted to execute the workflow but surprisingly there was no “Execute Workflow” context menu – so how to start the workflow?<span id="more-2539"></span><br />
As you might know in EA 8.0 there is now the support of dock able windows and at the moment there is no context menu (I hope there is one in the final release!) – You can find the “UML Simulation” window under “View” –&gt; “Add-In Windows”:<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image30.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb24.png" border="0" alt="image" width="244" height="234" /></a><br />
<strong>Tip</strong>: If your window is not docked you will always have to go to “View” –&gt; “Add-In Windows”. So maybe it is better to have the button on the main menu:<br />
1. Right click on the main menu.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image32.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb25.png" border="0" alt="image" width="124" height="244" /></a><br />
2. Customize<br />
3. Click on the “View” menu<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image33.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb26.png" border="0" alt="image" width="244" height="217" /></a><br />
4. Drag and drop the “Add-In Windows” item to the main menu.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image34.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb27.png" border="0" alt="image" width="244" height="240" /></a></p>
<p>Ok, after that you can always open the window by clicking the button.</p>
<p>I tried to start the workflow and got following error:<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image35.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb28.png" border="0" alt="image" width="244" height="108" /></a></p>
<p>Aha ok – mhm..</p>
<p>So I deleted the existing classes which I referenced last time and added it again.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image36.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb29.png" border="0" alt="image" width="244" height="155" /></a> <a href="http://blog.lieberlieber.com/wp-content/uploads/image37.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb30.png" border="0" alt="image" width="244" height="156" /></a><br />
I really like the new “ObjectSelectGrid” because it let us now import more types at one time but it would be great if there is a checkbox where I can select <strong>all</strong> types with one click – maybe something like in the following screenshot:<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image38.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb31.png" border="0" alt="image" width="244" height="155" /></a><br />
I started the workflow again – still same error – so I had to make sure that the attribute “MyLoginForm” is from the correct class type:<br />
1) I opened the “MyLoginForm” attribute under “AuthenticationExample”.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image39.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb32.png" border="0" alt="image" width="244" height="188" /></a><br />
2) Selected the type “<span style="color: #000000;">LoginForm”.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image40.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb33.png" border="0" alt="image" width="244" height="180" /></a><br />
3) But why can I not save the attribute? – The name is still the same! – So select first another type for example “bool” – Save and select “LoginForm” again.</span></p>
<p><span style="color: #000000;">4) I started the workflow again but I got following error message in the output window:<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image41.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb34.png" border="0" alt="image" width="244" height="104" /></a><br />
Aha…what does it mean? -  <a href="http://msdn.microsoft.com/en-us/library/3hdyz4dw%28VS.80%29.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/msdn.microsoft.com');" target="_blank">Compile Error CS1525</a>?<br />
The good thing is we don’t have to look in the generated code just double click on the error message and it will highlight the file where the error occured!!<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image42.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb35.png" border="0" alt="image" width="244" height="179" /></a><br />
Ok have a look at “ShowMainForm” there is a method called “OpenMainForm()” – if you click on the “Behavior” tab you will see that the &#8220;Behavior&#8221; text box is blank – the method was deleted when we removed the class references! So we have to add the “ShowDialog” method for the “MainForm” again.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image43.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb36.png" border="0" alt="image" width="244" height="145" /></a><br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image44.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb37.png" border="0" alt="image" width="244" height="163" /></a><br />
And the same error for “ShowMessageForm” &#8211; “OpenMessageForm()” &#8211; so we also have to add the method again:<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image43.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb36.png" border="0" alt="image" width="244" height="145" /></a><br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image45.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb38.png" border="0" alt="image" width="244" height="109" /></a> </span></p>
<p><span style="color: #000000;">Yep &#8211; now we have a running version for Amuse 1.5 <img src='http://blog.lieberlieber.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/image46.png"  rel="lightbox[2539]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.lieberlieber.com/wp-content/uploads/image_thumb39.png" border="0" alt="image" width="244" height="224" /></a><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/08/28/upgrading-the-amuseauthenticationexample-from-amuse-1-1-to-amuse-1-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LieberLieber AMUSE &#8211; Version 1.5 to be released in September 2010</title>
		<link>http://blog.lieberlieber.com/2010/08/26/lieberlieber-amuse-version-1-5-to-be-released-in-september-2010/</link>
		<comments>http://blog.lieberlieber.com/2010/08/26/lieberlieber-amuse-version-1-5-to-be-released-in-september-2010/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 12:59:00 +0000</pubDate>
		<dc:creator>Daniel Siegl</dc:creator>
				<category><![CDATA[AMUSE]]></category>
		<category><![CDATA[Enterprise Architect Erweiterungen]]></category>
		<category><![CDATA[Activity Diagram]]></category>
		<category><![CDATA[Enterprise Architect]]></category>
		<category><![CDATA[LieberLieber AMUSE]]></category>
		<category><![CDATA[Sequence Diagram]]></category>
		<category><![CDATA[UML Simulation]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/2010/08/27/lieberlieber-amuse-version-1-5-to-be-released-in-september-2010/</guid>
		<description><![CDATA[In my previous Post I already mentioned some of the Enhancements we are doing for AMUSE 1.5.
In the meanwhile we did a Blog Post showcasing the Integration for Embedded Devices, as we are Compact Framework guys we choose Windows CE/ Windows Mobile. In a second Post we show how to get things from Simulation to [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://blog.lieberlieber.com/2010/07/08/lieberlieber-amuse-sneak-peak-of-upcoming-features/" >my previous Post</a> I already mentioned some of the Enhancements we are doing for AMUSE 1.5.</p>
<p>In the meanwhile we did a <a href="http://blog.lieberlieber.com/2010/07/30/amuse-using-embedded-devices/" >Blog Post</a> showcasing the Integration for Embedded Devices, as we are Compact Framework guys we choose Windows CE/ Windows Mobile. In a <a href="http://blog.lieberlieber.com/?p=2472" >second Post</a> we show how to get things from Simulation to a shippable Product.</p>
<p>On the other hand we been successful in enhancing <a href="http://www.lieberlieber.com/unser-angebot/amuse.html" >LieberLieber AMUSE</a> capabilities to a new field.</p>
<p>We can now record Sequence Diagrams from Activity Diagrams – see the Video to get an Idea of the functionality.</p>
<p><a href="http://blog.lieberlieber.com/2010/08/26/lieberlieber-amuse-version-1-5-to-be-released-in-september-2010/#mediaPlayer_2490_0" >Play Video</a></p>
<p>You can also <a href="/wp-content/uploads/Amuse_-_Activity_to_Sequence.wmv' " target="_blank">dowload the Video</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/08/26/lieberlieber-amuse-version-1-5-to-be-released-in-september-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Continuance &#8211; AMUSE using Embedded Devices</title>
		<link>http://blog.lieberlieber.com/2010/08/26/continuance-amuse-using-embedded-devices/</link>
		<comments>http://blog.lieberlieber.com/2010/08/26/continuance-amuse-using-embedded-devices/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 12:45:45 +0000</pubDate>
		<dc:creator>Martin Lackner</dc:creator>
				<category><![CDATA[AMUSE]]></category>
		<category><![CDATA[Enterprise Architect]]></category>
		<category><![CDATA[Enterprise Architect Erweiterungen]]></category>
		<category><![CDATA[UML Simulation and Execution]]></category>
		<category><![CDATA[LieberLieber AMUSE]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2472</guid>
		<description><![CDATA[In my last Blog entry i showed an example for AMUSE using Embedded Devices. You can have a look here. Today i will give you some extra information.
It is also possible to start the executable which is deployed on the mobile device as standalone application/statemachine.
When starting the application (either on the mobile or on the [...]]]></description>
			<content:encoded><![CDATA[<p>In my last Blog entry i showed an example for AMUSE using Embedded Devices. You can have a look <a href="http://blog.lieberlieber.com/2010/07/30/amuse-using-embedded-devices/" >here</a>. Today i will give you some extra information.</p>
<p>It is also possible to start the executable which is deployed on the mobile device as standalone application/statemachine.</p>
<p>When starting the application (either on the mobile or on the pc), without using Enterprise Architect, the statemachine will be executed within the application.</p>
<p><span id="more-2472"></span></p>
<p>After starting the workflow in Enterprise Architect, you will find the executable in <em>“C:\tmp\simulation\someautogeneratednumber”</em>. You can use this executable as standalone application and it works.</p>
<p><a href="http://blog.lieberlieber.com/2010/08/26/continuance-amuse-using-embedded-devices/#mediaPlayer_2472_0" >Play Video</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/08/26/continuance-amuse-using-embedded-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interessting WP7 navigate back observation</title>
		<link>http://blog.lieberlieber.com/2010/08/20/interessting-wp7-navigate-back-observation/</link>
		<comments>http://blog.lieberlieber.com/2010/08/20/interessting-wp7-navigate-back-observation/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 10:42:48 +0000</pubDate>
		<dc:creator>Simon Bitschnau</dc:creator>
				<category><![CDATA[Programmierung Allgemein]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2487</guid>
		<description><![CDATA[It seems that when navigating back inside you application (not with tombstoning) the previous page seems to be kept in memory and retains its state. Class fields and properties are still set and don&#8217;t need to be reinstantiated. NavigatedTo and Page loaded events are still fired though.
I found this out the hard way when I dynamically added [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that when navigating back inside you application (not with tombstoning) the previous page seems to be kept in memory and retains its state. Class fields and properties are still set and don&#8217;t need to be reinstantiated. NavigatedTo and Page loaded events are still fired though.</p>
<p>I found this out the hard way when I dynamically added buttons to the ApplicationBar. I just added the buttons to the bar in the NavigatedTo event and wondered why it added more and more buttons whenever I navigated back to the page. It did not happen when I navigated directly to the page. This behaviour does not seem to be documented in the SDK.</p>
<p>So you might check your instance fields bevore recreating them. Might save you some processing time when going back.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/08/20/interessting-wp7-navigate-back-observation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mein Facebook ist in Outlook</title>
		<link>http://blog.lieberlieber.com/2010/08/11/mein-facebook-ist-in-outlook/</link>
		<comments>http://blog.lieberlieber.com/2010/08/11/mein-facebook-ist-in-outlook/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 09:08:58 +0000</pubDate>
		<dc:creator>Daniel Siegl</dc:creator>
				<category><![CDATA[Allgemeine Theorien]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Office 2010]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/2010/08/11/mein-facebook-ist-in-outlook/</guid>
		<description><![CDATA[Habe gerade ein nettes Outlook Plugin auf einem Blog von Microsoft Österreich gesehen:
Nun ist auch endlich der Facebook Connector für Outlook fertiggestellt – Zeit, das ganze mal genauer unter die Lupe zu nehmen.
Zuallererst muss man sich den Outlook Social Connector Provider für Facebook auf den Microsoft Download Seiten herunterladen. Zu finden ist das unter: http://www.microsoft.com/downloads/details.aspx?displaylang=de&#38;FamilyID=ce8b7517-234c-48a1-a655-
Mehr [...]]]></description>
			<content:encoded><![CDATA[<p>Habe gerade ein nettes Outlook Plugin auf einem Blog von Microsoft Österreich gesehen:</p>
<blockquote><p>Nun ist auch endlich der Facebook Connector für Outlook fertiggestellt – Zeit, das ganze mal genauer unter die Lupe zu nehmen.</p>
<p>Zuallererst muss man sich den Outlook Social Connector Provider für Facebook auf den Microsoft Download Seiten herunterladen. Zu finden ist das unter: <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=de&amp;FamilyID=ce8b7517-234c-48a1-a655-324a88893b02#filelist" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.microsoft.com');">http://www.microsoft.com/downloads/details.aspx?displaylang=de&amp;FamilyID=ce8b7517-234c-48a1-a655-</a></p></blockquote>
<p>Mehr findet Ihr hier. <a href="http://www.office-blog.at/post/2010/08/10/Mein-Facebook-ist-in-Outlook.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.office-blog.at');">Mein Facebook ist in Outlook</a></p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/FacebookOutlook.png"  rel="lightbox[2470]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="FacebookOutlook" src="http://blog.lieberlieber.com/wp-content/uploads/FacebookOutlook_thumb.png" border="0" alt="FacebookOutlook" width="244" height="75" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/08/11/mein-facebook-ist-in-outlook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chronos Flying Mouse</title>
		<link>http://blog.lieberlieber.com/2010/08/10/chronos-flying-mouse/</link>
		<comments>http://blog.lieberlieber.com/2010/08/10/chronos-flying-mouse/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 07:07:43 +0000</pubDate>
		<dc:creator>Richard Deininger</dc:creator>
				<category><![CDATA[Programmierung Allgemein]]></category>
		<category><![CDATA[chronos]]></category>
		<category><![CDATA[ez430]]></category>
		<category><![CDATA[texas instroments]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2464</guid>
		<description><![CDATA[Just recently I found this new application, for my TI eZ430-Chronos, a mouse input similar to my MediaCenter “gesture input”.
TI already delivered something like this with the “Control Center”, but I think they steped it up a notch.
Just have a look:
http://processors.wiki.ti.com/index.php/Chronos_Flying_Mouse
]]></description>
			<content:encoded><![CDATA[<p>Just recently I found this new application, for my TI <a href="http://processors.wiki.ti.com/index.php/EZ430-Chronos" onclick="javascript:pageTracker._trackPageview('/outbound/article/processors.wiki.ti.com');">eZ430-Chronos</a>, a mouse input similar to my <a href="http://blog.lieberlieber.com/2010/02/17/software-entwickler-und-ihre-gadgets-folge1-ti-ez430-chronos-media-player-steuerung/" >MediaCenter “gesture input”</a>.</p>
<p>TI already delivered something like this with the “Control Center”, but I think they steped it up a notch.</p>
<p>Just have a look:</p>
<p><a title="http://processors.wiki.ti.com/index.php/Chronos_Flying_Mouse" href="http://processors.wiki.ti.com/index.php/Chronos_Flying_Mouse" onclick="javascript:pageTracker._trackPageview('/outbound/article/processors.wiki.ti.com');">http://processors.wiki.ti.com/index.php/Chronos_Flying_Mouse</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/08/10/chronos-flying-mouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dunstan Thomas &#8211; LieberLieber AMUSE Webinar</title>
		<link>http://blog.lieberlieber.com/2010/08/06/dunstan-thomas-lieberlieber-amuse-webinar/</link>
		<comments>http://blog.lieberlieber.com/2010/08/06/dunstan-thomas-lieberlieber-amuse-webinar/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 12:25:14 +0000</pubDate>
		<dc:creator>Daniel Siegl</dc:creator>
				<category><![CDATA[AMUSE]]></category>
		<category><![CDATA[Enterprise Architect]]></category>
		<category><![CDATA[Enterprise Architect Erweiterungen]]></category>
		<category><![CDATA[UML Simulation and Execution]]></category>
		<category><![CDATA[UML mit Enterprise Architect]]></category>
		<category><![CDATA[LieberLieber AMUSE]]></category>
		<category><![CDATA[UML]]></category>
		<category><![CDATA[UML Execution]]></category>
		<category><![CDATA[UML Simulation]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/2010/08/06/dunstan-thomas-lieberlieber-amuse-webinar/</guid>
		<description><![CDATA[Our Partner company from the UK Dunstan Thomas will be conducting a Webinar on “LieberLieber AMUSE” in collaboration with us.

Register now:
To register you interest for this webinar please email us with your name, company, telephone number and email address along with the title of the webinar you wish to register for. We&#8217;ll then send you [...]]]></description>
			<content:encoded><![CDATA[<p>Our Partner company from the UK <a href="http://www.dthomas.co.uk/dtalm/products/plugins.htm#amuse" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.dthomas.co.uk');">Dunstan Thomas</a> will be conducting a Webinar on <a href="http://www.lieberlieber.com/unser-angebot/amuse.html" >“LieberLieber AMUSE”</a> in collaboration with us.</p>
<p><a href="http://www.dthomas.co.uk/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.dthomas.co.uk');" target="_blank"><img src="http://www.dthomas.co.uk/dtalm/images/eshot/20091020_webinar_mailing/new_e-shot_banner.jpg" alt="" width="781" height="127" /></a></p>
<p><strong>Register now:</strong><br />
To register you interest for this webinar please email us with your name, company, telephone number and email address along with the title of the webinar you wish to register for. We&#8217;ll then send you login details for the webinar on the week prior to the event. <a href="mailto:training@dthomas.co.uk?subject=Dunstan Thomas Webinars">Register your interest here.</a></p>
<p><strong>Unavailable on the day?</strong><br />
As before for those of you unable to attend any of our webinars, don&#8217;t worry, all of our webinars are available for <a href="http://www.dthomas.co.uk/dtalm/webinar.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.dthomas.co.uk');">download</a> from the <a href="http://www.dthomas.co.uk/dtalm/webinar.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.dthomas.co.uk');">Dunstan Thomas site</a>.</p>
<p>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/08/06/dunstan-thomas-lieberlieber-amuse-webinar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Never trust &#8220;Copy if newer&#8221;</title>
		<link>http://blog.lieberlieber.com/2010/07/30/never-turst-copy-if-newer/</link>
		<comments>http://blog.lieberlieber.com/2010/07/30/never-turst-copy-if-newer/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 21:31:40 +0000</pubDate>
		<dc:creator>Richard Deininger</dc:creator>
				<category><![CDATA[Programmierung Allgemein]]></category>
		<category><![CDATA[CF]]></category>
		<category><![CDATA[Compact Framework]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[WM6]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2453</guid>
		<description><![CDATA[Every CF developer knows and uses the “Copy if newer” option from time to time, when deploying on Compact Framework. This way the deployment is a little bit faster.  Since I tried to do some C# OpenGL ES stuff on my HTC Touch Diamon as a private project, I came across a real annoying [...]]]></description>
			<content:encoded><![CDATA[<p>Every CF developer knows and uses the “Copy if newer” option from time to time, when deploying on Compact Framework. This way the deployment is a little bit faster.  Since I tried to do some C# OpenGL ES stuff on my HTC Touch Diamon as a private project, I came across a real annoying bug.  Visual Studio 2008 shows an error during deployment of the:</p>
<blockquote><p>libGLES_CM.dll (I placed it as a “Content” file inside the project)</p></blockquote>
<p>The funny thing is the error varies from one deployment to another, top error messages are:</p>
<blockquote><p>“An operation was attempted on something that is not a socket.”</p></blockquote>
<blockquote><p>“Connection has been closed gracefully”</p></blockquote>
<blockquote><p>“Connection forcibly closed by remote host”</p></blockquote>
<p>No search brought a solution to this bug, till after some “testing” (I used my DPD = drinking/programming/drinking method again <img src='http://blog.lieberlieber.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
If you switch from “Copy if newer” to “Copy always” the errors are gone.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/07/30/never-turst-copy-if-newer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AMUSE using Embedded Devices</title>
		<link>http://blog.lieberlieber.com/2010/07/30/amuse-using-embedded-devices/</link>
		<comments>http://blog.lieberlieber.com/2010/07/30/amuse-using-embedded-devices/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 08:21:18 +0000</pubDate>
		<dc:creator>Martin Lackner</dc:creator>
				<category><![CDATA[AMUSE]]></category>
		<category><![CDATA[Enterprise Architect]]></category>
		<category><![CDATA[Enterprise Architect Erweiterungen]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[LieberLieber AMUSE]]></category>
		<category><![CDATA[Windows Ce]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2421</guid>
		<description><![CDATA[AMUSE provides now the functionallity to use Embedded Devices based on Compact Framework using HTTP communication between the simulation in Enterprise Architect and the state machine on an Embedded Device.
I will describe it based on a Windows Mobile 6 and &#8220;Sending a Message&#8221; example.

To use this service it is necessary to build a Compact Framework [...]]]></description>
			<content:encoded><![CDATA[<p>AMUSE provides now the functionallity to use Embedded Devices based on Compact Framework using HTTP communication between the simulation in Enterprise Architect and the state machine on an Embedded Device.</p>
<p>I will describe it based on a Windows Mobile 6 and &#8220;Sending a Message&#8221; example.</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/StateMachine.gif"  rel="lightbox[2421]"><img style="border-right-width: 0pt; display: inline; border-top-width: 0pt; border-bottom-width: 0pt; border-left-width: 0pt" title="StateMachine" src="http://blog.lieberlieber.com/wp-content/uploads/StateMachine_thumb.gif" border="0" alt="StateMachine" width="416" height="193" /></a></p>
<p><span id="more-2421"></span>To use this service it is necessary to build a Compact Framework compatible WinForm application.</p>
<p>Ad the class file (not the designer file) in EA and draw the state machine.</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/EAclass2.gif"  rel="lightbox[2421]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="EAclass" src="http://blog.lieberlieber.com/wp-content/uploads/EAclass_thumb2.gif" border="0" alt="EAclass" width="152" height="232" /></a></p>
<p>In this example we use a Trigger to change the state between „FillOutMessage“ state and „CheckContent“ state.</p>
<p>In „CheckContent“ state the “content” attribute will be checked. If the “content” attribute is not set, the “contentError” attribute will be set to true, otherwise false.</p>
<p>The guard checks if the “content” attribute is empty or not. If it is not empty, the “showErrorMsg” operation in the state “ShowError”will be executed. After that the state „FillOutMessage“ will be activated and waits until the Trigger will be fired again.</p>
<p>If the “contentError” attribute is set to false, the state „SendContent“ will be activated and after that the StateMachine will be finished.</p>
<p>This is the mobile application i used for this example:</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/CF_AmuseClient.gif"  rel="lightbox[2421]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CF_AmuseClient" src="http://blog.lieberlieber.com/wp-content/uploads/CF_AmuseClient_thumb.gif" border="0" alt="CF_AmuseClient" width="158" height="244" /></a></p>
<p>The trigger “ClickSend” can be fired with the button on the mobile device.</p>
<p>The “content” attribute can be set with the „set content“ button on the mobile device. The “content” attribute will get the value from the TextBox.</p>
<h3>Start the Workflow in EA</h3>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/startwf.gif"  rel="lightbox[2421]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="start workflow" src="http://blog.lieberlieber.com/wp-content/uploads/startwf_thumb.gif" border="0" alt="start workflow" width="244" height="122" /></a></p>
<p>The server component of the http communication will be started. A TCP Listener will be started and listens on a port. The simulation will be linked with the server communication component.</p>
<p>The Form, which includes the state machine and the client communication, will be compiled for Compact Framework, deployed and remotely started on the mobile device with the information on which http adress the client have to send the HTTP requests (local IP where the Simulation is running + port).</p>
<h3>Back to the Example – here are the first lines of the Simulation Output</h3>
<ol>
<li>Activate &#8211; StateMachine</li>
<li>Activate &#8211; InitForm</li>
<li>Entry &#8211; StateMachine/InitForm</li>
<li>Do &#8211; StateMachine/InitForm</li>
<li>Exit &#8211; StateMachine/InitForm</li>
<li>DeActivate &#8211; InitForm</li>
<li>Effect &#8211; StateMachine/InitForm_to_StateMachine/FillOutMessage</li>
<li>Effect &#8211; StateMachine/InitForm_to_StateMachine/FillOutMessage</li>
<li>Activate &#8211; FillOutMessage</li>
<li>Entry &#8211; StateMachine/FillOutMessage</li>
<li>NextStepPerformed &#8211; StateMachine/InitForm</li>
<li>Do &#8211; StateMachine/FillOutMessage</li>
<li>Do &#8211; StateMachine/FillOutMessage</li>
<li>Exit &#8211; StateMachine/FillOutMessage</li>
<li>DeActivate &#8211; FillOutMessage</li>
<li>Effect &#8211; StateMachine/FillOutMessage_to_StateMachine/CheckContent</li>
<li>Effect &#8211; StateMachine/FillOutMessage_to_StateMachine/CheckContent</li>
<li>Activate &#8211; CheckContent</li>
</ol>
<p>The simulation will be set to activate when the „InitializeStateMachine“ command from the Simulation is send to the client, processed on the client, the state machine in the client is set to active and the change is fired to the server. The client also processes the InitForm, the Entry, Do, Exit, DeActivate state and executes the transition. The client notiefies the server about each change via HTTP requests.</p>
<p>When the state machine is active the simulation sends NextStep commands which will be fetched from the client via the polling. After a transition has been executed in the state machine the NextStep performed command will be notified to the simulation. So the simulation knows that the next NextStep command can be executed. And so on…</p>
<p>Here you can see a demonstration of the new functionallity:</p>
<p><a href="http://blog.lieberlieber.com/2010/07/30/amuse-using-embedded-devices/#mediaPlayer_2421_0" >Play Video</a></p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/amuse_using_embedded_device.wmv" ></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/07/30/amuse-using-embedded-devices/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://blog.lieberlieber.com/wp-content/uploads/amuse_using_embedded_device.wmv" length="22518662" type="video/x-ms-wmv" />
<enclosure url="http://blog.lieberlieber.com/wp-content/uploads/amuse_using_embedded_device.wmv" length="22518662" type="video/x-ms-wmv" />
		</item>
		<item>
		<title>Web service orchestration with AMUSE</title>
		<link>http://blog.lieberlieber.com/2010/07/27/web-service-orchestration-with-amuse/</link>
		<comments>http://blog.lieberlieber.com/2010/07/27/web-service-orchestration-with-amuse/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 13:02:47 +0000</pubDate>
		<dc:creator>John-Paul Pazhedathuparambil</dc:creator>
				<category><![CDATA[AMUSE]]></category>
		<category><![CDATA[Programmierung Allgemein]]></category>
		<category><![CDATA[UML Simulation and Execution]]></category>
		<category><![CDATA[UML mit Enterprise Architect]]></category>
		<category><![CDATA[BEPEL]]></category>
		<category><![CDATA[orchestration]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[WS]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2378</guid>
		<description><![CDATA[Introduction
The goal of this entry is to show how a flight booking process with different web services  and a mock-up GUI can  be simulated and verified with AMUSE. The focus is on the orchestration of the web services, which are part of the flight booking process.  In a next step it would be interesting to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong><br />
The goal of this entry is to show how a flight booking process with different web services  and a mock-up GUI can  be simulated and verified with AMUSE. The focus is on the orchestration of the web services, which are part of the flight booking process.  In a next step it would be interesting to generate BEPEL out this state machine.</p>
<p><span id="more-2378"></span></p>
<p><strong>The flight booking process</strong><br />
The user of an online travel agency calls the appropriate website and enters his flight details on that page.  Then a search for possible flights, hotels and events taking place during the stay starts, which calls different web services. The Results are then finally displayed on the site.</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/uc.jpg"  rel="lightbox[2378]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="uc" src="http://blog.lieberlieber.com/wp-content/uploads/uc_thumb.jpg" border="0" alt="uc" width="244" height="131" /></a></p>
<p>This simple process is modeled in the following activity diagram:</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/ac.jpg"  rel="lightbox[2378]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ac" src="http://blog.lieberlieber.com/wp-content/uploads/ac_thumb.jpg" border="0" alt="ac" width="244" height="199" /></a></p>
<p><strong>Mock-up GUI</strong></p>
<p><strong><a href="http://blog.lieberlieber.com/wp-content/uploads/gui.jpg"  rel="lightbox[2378]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="gui" src="http://blog.lieberlieber.com/wp-content/uploads/gui_thumb.jpg" border="0" alt="gui" width="184" height="244" /></a> </strong></p>
<p>This GUI is used to feed the simulation with the user data and to present the results of a search to the user.</p>
<p><strong>Web Services</strong><br />
To illustrate this process, the following Web Services are needed. However, this Web Services are only implemented to some extent.  The level of the implementation is quite sufficient for the demonstration purpose of this example:</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/ws.jpg"  rel="lightbox[2378]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ws" src="http://blog.lieberlieber.com/wp-content/uploads/ws_thumb.jpg" border="0" alt="ws" width="244" height="116" /></a></p>
<p><span style="text-decoration: underline;">EventService:</span> Implements the method EventList, which displays all available events at a given time. In this example, every time the same events are described. It is enough for the demo.</p>
<p>[WebMethod]</p>
<p>public string EventList()</p>
<p>{</p>
<p>return &#8220;International film festival \n Rock konzerte  \n Music festival&#8221;;</p>
<p>}</p>
<p><span style="text-decoration: underline;">FlightService:</span> Implements the method FlightInfo, which displays the flights available from one location to another at a given time.</p>
<p>[WebMethod]</p>
<p>public string FlightInfo(string from, string to, DateTime departureDate,DateTime returnDate)</p>
<p>{</p>
<p>return from.ToUpper() + &#8220;–&#8221; + to.ToUpper() + &#8221; HG8010 &#8221; + departureDate + &#8221; 08:15 \n&#8221; +to.ToUpper()+&#8221;-&#8221;+from.ToUpper()+&#8221; HG8011 &#8220;+returnDate+&#8221; 11:55 \n &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; \n Rate:200€&#8221;;</p>
<p>}</p>
<p><span style="text-decoration: underline;">HotelService</span>: The method HotelInfo displays all available hotels during the stay</p>
<p>[WebMethod]</p>
<p>public string HotelInfo()</p>
<p>{</p>
<p>return &#8221; Grand Hotel(4 Stars) \n Rate per night 59€&#8221;;</p>
<p>}</p>
<p><span style="text-decoration: underline;">InputValidationService</span>:  The method ValidateInputData should check the data entered by the users to their validity. For demonstration purposes I have implemented the method in a way that it in one case it returns &#8220;true&#8221; and in another case it returns&#8221;false&#8221;.</p>
<p>[WebMethod]</p>
<p>public bool ValidateInputData(string from, string to, bool oneWay, bool returnFlight, DateTime departureDate, DateTime returnDate, string numAdult,string numChildren,string numInfant)</p>
<p>{</p>
<p>if (from.Equals(to))</p>
<p>return false;</p>
<p>else</p>
<p>return true;</p>
<p>}</p>
<p>I added this web services to the Simulation, all external dlls. In order to pursue a more detailed and systematic approach, see <a href="http://blog.lieberlieber.com/2010/05/07/lieberlieber-amuse-using-statemachines-and-asp-net-webservices/"  target="_blank">Simons</a> post .</p>
<p><strong>The flight booking process modeled as a state machine</strong></p>
<p><strong><a href="http://blog.lieberlieber.com/wp-content/uploads/sm.jpg"  rel="lightbox[2378]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sm" src="http://blog.lieberlieber.com/wp-content/uploads/sm_thumb.jpg" border="0" alt="sm" width="244" height="117" /></a></strong></p>
<p><strong>Demo</strong><br />
You can <a href="http://blog.lieberlieber.com/wp-content/uploads/AMUSE_Examples.zip" onclick="javascript:pageTracker._trackPageview('/downloadsblog./wp-content/uploads/AMUSE_Examples.zip');">download</a> the entire sample and try it yourself during the video.</p>
<p><a href="http://blog.lieberlieber.com/2010/07/27/web-service-orchestration-with-amuse/#mediaPlayer_2378_0" >Play Video</a></p>
<p>Download video: <a href="http://blog.lieberlieber.com/wp-content/uploads/AMUSE_WS_WMV-V9.wmv" >AMUSE web service orchestration</a></p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/AUME_WS.avi"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/07/27/web-service-orchestration-with-amuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blog.lieberlieber.com/wp-content/uploads/AMUSE_WS_WMV-V9.wmv" length="64745007" type="video/x-ms-wmv" />
		</item>
		<item>
		<title>Windows Phone 7 Devicetype</title>
		<link>http://blog.lieberlieber.com/2010/07/26/windows-phone-7-devicetype/</link>
		<comments>http://blog.lieberlieber.com/2010/07/26/windows-phone-7-devicetype/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 08:50:47 +0000</pubDate>
		<dc:creator>Andreas Bruckner</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Windows 7 Phone]]></category>
		<category><![CDATA[devicetype]]></category>
		<category><![CDATA[emulator]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2353</guid>
		<description><![CDATA[How to find out, if your app is running in an emulator, or on a real device?
In July&#8217;s beta, Microsoft has moved this property from System.Environment to Microsoft.Devices.Environment namespace.

//enum DeviceType contains: Device, Emulator
this.IsEmulator = (Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator);

]]></description>
			<content:encoded><![CDATA[<p>How to find out, if your app is running in an emulator, or on a real device?</p>
<p>In July&#8217;s beta, Microsoft has moved this property from System.Environment to Microsoft.Devices.Environment namespace.</p>
<pre>
<pre>//enum DeviceType contains: Device, Emulator
this.IsEmulator = (Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator);</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/07/26/windows-phone-7-devicetype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LieberLieber AMUSE &#8211; Using Statemachines and ASP.NET MVC</title>
		<link>http://blog.lieberlieber.com/2010/07/22/lieberlieber-amuse-using-statemachines-and-asp-net-mvc/</link>
		<comments>http://blog.lieberlieber.com/2010/07/22/lieberlieber-amuse-using-statemachines-and-asp-net-mvc/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 12:37:50 +0000</pubDate>
		<dc:creator>Simon Gorski</dc:creator>
				<category><![CDATA[AMUSE]]></category>
		<category><![CDATA[UML Simulation and Execution]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2322</guid>
		<description><![CDATA[Today I want to show how we can use “Enterprise Architect” and the LieberLieber “Amuse” Plug-In to integrate “ASP.NET Mvc Web Application” into a flowchart.
Here you can see the final solution.
Play Video
To download the video click here.
If you haven’t seen my previous posts please check out “LieberLieber AMUSE – Using Statemachines to Build Winforms flows” [...]]]></description>
			<content:encoded><![CDATA[<p>Today I want to show how we can use “Enterprise Architect” and the LieberLieber “Amuse” Plug-In to integrate “ASP.NET Mvc Web Application” into a flowchart.</p>
<p>Here you can see the final solution.<br />
<a href="http://blog.lieberlieber.com/2010/07/22/lieberlieber-amuse-using-statemachines-and-asp-net-mvc/#mediaPlayer_2322_0" >Play Video</a></p>
<p>To download the video click<a href="/wp-content/uploads/AmuseMvcExample.wmv"> here.</a></p>
<p>If you haven’t seen my previous posts please check out “<a href="http://blog.lieberlieber.com/2010/05/03/lieberlieber-amuse-using-statemachines-to-build-winforms-flows/"  target="_blank">LieberLieber AMUSE – Using Statemachines to Build Winforms flows</a>” and “<a href="http://blog.lieberlieber.com/2010/05/07/lieberlieber-amuse-using-statemachines-and-asp-net-webservices/"  target="_blank">LieberLieber AMUSE – Using Statemachines and ASP.NET WebServices</a>”.</p>
<p>Ok, first of all have a look at the Asp.net Mvc Solution.</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0011.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image001_thumb1.png" border="0" alt="clip_image001" width="144" height="244" /></a></p>
<p>As you can see I added an AuthenticationController (provides the controller methods), AuthenticationService (provides the authentication logic) and AuthenticationViewModel (provides the view model for the web form) to the solution.</p>
<p><span id="more-2322"></span></p>
<p>The authentication workflow looks similar like in my first example.</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0021.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image002_thumb1.png" border="0" alt="clip_image002" width="244" height="177" /></a></p>
<p>First we want to show the login form (ValidateUser.aspx) which provides username and password.</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0042.jpg"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image004_thumb2.jpg" border="0" alt="clip_image004" width="244" height="135" /></a></p>
<p>If the user enters the wrong username and password we want to show him the access denied form (AccessDenied.aspx).</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0062.jpg"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image006" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image006_thumb2.jpg" border="0" alt="clip_image006" width="244" height="97" /></a></p>
<p>If the authentication succeeds we want to show the user the succeed form (LoginSuccessful.aspx).</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image008.jpg"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image008" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image008_thumb.jpg" border="0" alt="clip_image008" width="244" height="79" /></a></p>
<p>In “Enterprise Architect” I created 4 “Packages” and loaded the necessary source files to have a good overview of the Asp.net Mvc solution.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0091.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image009" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image009_thumb1.png" border="0" alt="clip_image009" width="164" height="244" /></a></p>
<p>1. “AmuseMvc” which holds the “StateMachine”.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0101.jpg"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image010" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image010_thumb1.jpg" border="0" alt="clip_image010" width="244" height="177" /></a></p>
<p>2. “Controllers” which contains the Asp.net Mvc controllers.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0112.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image011" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image011_thumb2.png" border="0" alt="clip_image011" width="244" height="117" /></a></p>
<p>3. “Models” which contains the Asp.net Mvc view models and authentication service.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0122.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image012" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image012_thumb2.png" border="0" alt="clip_image012" width="244" height="123" /></a></p>
<p>4. “Views” which contains the Asp.net Mvc views.<br />
<a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0131.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image013" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image013_thumb1.png" border="0" alt="clip_image013" width="244" height="188" /></a></p>
<p>If you want to use your “Asp.net Mvc Web Application” in Amuse you have to build it and load it under “External References” at the “State Machine” diagram.</p>
<p>1. “Add-Ins” – “Amuse” – “External Reference”.</p>
<p>2. Now select your Asp.net Mvc library. In our example “AmuseMvcExample.dll”.</p>
<p>3. Then import all three “Types” into “Enterprise Architect”:</p>
<p>a. “AmuseMvcExample.Controllers. AuthenticationController”</p>
<p>b. “AmuseMvcExample.Models. AuthenticationViewModel”</p>
<p>c. “AmuseMvcExample.Models. AuthenticationService”</p>
<p>But hold on, one important reference is missing. Maybe you remember my last post<br />
“<a href="http://blog.lieberlieber.com/2010/05/07/lieberlieber-amuse-using-statemachines-and-asp-net-webservices/"  target="_blank">LieberLieber AMUSE – Using Statemachines and ASP.NET WebServices</a>” where we used the<br />
“ASP.NET Development Server” and had to use a batch file to start the “ASP.NET Web Development Server”? To avoid this and make it more confortable I created a “WebDevServer” class which provides the necessary functionality (for example: Start, Stop and RedirectToAction). You can find this in the “AmuseMvc.dll”<br />
So add also “AmuseMvc. WebDevServer” to the “StateMachine” diagram.</p>
<p>After we loaded all the external references, your “Project Browser” should look like in the following screenshot:</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image0141.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image014" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image014_thumb1.png" border="0" alt="clip_image014" width="166" height="244" /></a></p>
<p>Ok now I declared the attributes.</p>
<p>Name: “ValidUser”<br />
Type: “bool”<br />
Scope: “Public”<br />
Initial: “false”</p>
<p>Name: “MyAuthenticationViewModel”<br />
Type: “AuthenticationViewModel”<br />
Scope: “Public”</p>
<p>Name: “MyAuthenticationService”<br />
Type: “AuthenticationService”<br />
Scope: “Public”<br />
Initial: “new AuthenticationService()”</p>
<p>Name: “MyAuthenticationController”<br />
Type: “AuthenticationController”<br />
Scope: “Public”<br />
Initial: “new AuthenticationController ()”</p>
<p>Name: “MyWebDevServer”<br />
Type: “WebDevServer”<br />
Scope: “Public”<br />
Initial: “new WebDevServer<strong>(&#8221;</strong><strong>C:\YourProjectPath</strong><strong>&#8220;)</strong>”</p>
<p>&#8211;&gt; The WebDevServer needs the path to the “Asp.net Mvc Web Application” (without last backslash)!</p>
<p>Now we create the operations:</p>
<p>Name: “StartWebDevServer”<br />
Return Type: “void”<br />
Behavior – Initial Code: “MyWebDevServer.Start();”</p>
<p>Name: “StopWebDevServer”<br />
Return Type: “void”<br />
Behavior – Initial Code: “MyWebDevServer.Stop();”</p>
<p>Name: “OpenLoginForm”<br />
Return Type: “void”<br />
Behavior – Initial Code:<br />
“MyAuthenticationViewModel =<br />
(AuthenticationViewModel) MyDevServer.GetViewModelFromAction(&#8221;Authentication&#8221;, &#8220;ValidateUser&#8221;,typeof (AuthenticationViewModel))</p>
<p>&#8211;&gt; This operation redirects to the action and get the entered values back.</p>
<p>Name: “ValidateUser”<br />
Return Type: “void”<br />
Behavior – Initial Code: “ValidUser = MyAuthenticationService.ValidateUser(<br />
MyAuthenticationViewModel.UserName,MyAuthenticationViewModel.Password);”</p>
<p>&#8211;&gt; This operation validates against our “AuthenticationService” and set the “ValidUser” attribute.</p>
<p>Name: “OpenAccessDeniedForm”<br />
Return Type: “void”<br />
Behavior – Initial Code: “MyDevServer.RedirectToAction(&#8221;Authentication&#8221;,&#8221;AccessDenied&#8221;);”</p>
<p>&#8211;&gt; This operation opens the access denied form and we don’t need any return value.</p>
<p>Name: “OpenAccessDeniedForm”<br />
Return Type: “void”<br />
Behavior – Initial Code: “MyDevServer.RedirectToAction(&#8221;Authentication&#8221;,&#8221;LoginSuccessful&#8221;);”</p>
<p>&#8211;&gt; This operation opens the login successful form and we don’t need any return value.</p>
<p>So now we can call the operations in the workflow but first we will add two new “States” for “StartDevServer” and “StopDevServer” like in the following screenshot.</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image015.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image015" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image015_thumb.png" border="0" alt="clip_image015" width="244" height="226" /></a></p>
<p>So now we call the operations on the states:</p>
<p><a href="http://blog.lieberlieber.com/wp-content/uploads/clip_image016.png"  rel="lightbox[2322]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image016" src="http://blog.lieberlieber.com/wp-content/uploads/clip_image016_thumb.png" border="0" alt="clip_image016" width="244" height="228" /></a></p>
<p>Before we can start the flowchart we have to do two more things.</p>
<p>First import the namespaces in the “AmuseMvc” class.<br />
using AmuseMvcExample.Controllers;<br />
using AmuseMvcExample.Models;<br />
using AmuseMvc;</p>
<p>And second in the “Asp.net Mvc Web Application”, we have to add the “AmuseMvcWeb.dll” which provides the “AmuseHandler “. You have to set up this handler in the web.config.<br />
Add following line to the &lt;httpHandlers&gt; section:</p>
<pre>&lt;add verb="*" path="*.amusemvc" type="AmuseMvcWeb.AmuseHandler"/&gt;</pre>
<p>And also don’t forget to add following line into the “Global.asax.cs” – “RegisterRoutes” method:</p>
<pre> Public class MvcApplication : System.Web.HttpApplication {
   public static void RegisterRoutes(RouteCollection routes) {
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
<strong>     routes.IgnoreRoute("{resource}.amusemvc/{*pathInfo}");</strong></pre>
<p>The library also contains the “AmuseAttribute” for the controller classes. So if you want to use the controller in Amuse please mark the controller class with [Amuse]:</p>
<p>In our example over the “AuthenticationController”.</p>
<pre>[Amuse]
public class AuthenticationController : Controller {
  private readonly IauthenticationService _authenticationService;
  public AuthenticationController() {
    _authenticationService = new AuthenticationService();
  }</pre>
<p>After that we are ready to go and you can start the flowchart!</p>
<p><strong>If you want to try this example please make sure that you change the path for the WebDevServer to the Asp.net Mvc Application first!!</strong></p>
<p>Attribute: MyWebDevServer = new MyWebDevServer(“YOURPATH”);</p>
<p>To pass the validation use:<br />
Username:amuse<br />
Password:mvc</p>
<p>Here is the<a href="http://blog.lieberlieber.com/wp-content/uploads/AmuseMvcExample.zip" onclick="javascript:pageTracker._trackPageview('/downloadsblog./wp-content/uploads/AmuseMvcExample.zip');" target="_self"> source code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/07/22/lieberlieber-amuse-using-statemachines-and-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fulltext Search On XML Files using Linq.XDocument</title>
		<link>http://blog.lieberlieber.com/2010/07/22/fulltext-search-on-xml-files-using-linq-xdocument/</link>
		<comments>http://blog.lieberlieber.com/2010/07/22/fulltext-search-on-xml-files-using-linq-xdocument/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 09:58:12 +0000</pubDate>
		<dc:creator>Andreas Bruckner</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Fulltext]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[XDocument]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2279</guid>
		<description><![CDATA[Fulltext Search On XML Files using XDocument
Given the following XML-Document:
&#60;Customers&#62;
&#60;Customer&#62;
 &#60;Name&#62;Jerry&#60;/Name&#62;
 &#60;Age&#62;26&#60;/26&#62;
 &#60;Addresses&#62;
&#60;Address&#62;
&#60;Street&#62;Main Street&#60;/Street&#62;
&#60;Address&#62;
&#60;Addresses&#62;
&#60;Customers&#62;
1) How would you implement a fulltext search to return a List of Customer-Names?
public void StartRead(string searchTerm)
{
XDocument xDocument = XDocument.Parse(GetFile());
//get all retval-nodes (allthough it’s just 1)
var customers = from cmd in xDocument.Descendants(&#8221;Customer&#8221;)
select cmd;
//loop through retval-nodes (still only 1)
foreach (XElement cust in customers)
{
if (RecursiveParser(cust, searchTerm))
{
this.textBox1.Text += [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">Fulltext Search On XML Files using XDocument</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">Given the following XML-Document:</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">&lt;Customers&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">&lt;Customer&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;"><span style="white-space: pre;"> </span>&lt;Name&gt;Jerry&lt;/Name&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;"><span style="white-space: pre;"> </span>&lt;Age&gt;26&lt;/26&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;"><span style="white-space: pre;"> </span>&lt;Addresses&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">&lt;Address&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">&lt;Street&gt;Main Street&lt;/Street&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">&lt;Address&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">&lt;Addresses&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">&lt;Customers&gt;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">1) How would you implement a fulltext search to return a List of Customer-Names?</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">public void StartRead(string searchTerm)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">{</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">XDocument xDocument = XDocument.Parse(GetFile());</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">//get all retval-nodes (allthough it’s just 1)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">var customers = from cmd in xDocument.Descendants(&#8221;Customer&#8221;)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">select cmd;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">//loop through retval-nodes (still only 1)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">foreach (XElement cust in customers)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">{</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">if (RecursiveParser(cust, searchTerm))</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">{</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">this.textBox1.Text += cust.Element(&#8221;Name&#8221;).Value + @&#8221; ### &#8220;;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">}</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">else</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">{</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">this.textBox1.Text += @&#8221;empty ### &#8220;;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">}</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">}</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">}</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">public bool RecursiveParser(XElement element, string searchTerm)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">{</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">if (element.IsEmpty) return false;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">if (element.HasElements)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">{</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">foreach (XElement xElement in element.Elements())</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">{</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">if (xElement.Value.ToLower().Contains(searchTerm))</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">return true;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">if (RecursiveParser(xElement, searchTerm))</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">return true;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">}</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">}</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">return false;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">}</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">2. How would you implement a fulltext search for addresses only?</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">Just replace &#8220;Customer&#8221; by &#8220;Address&#8221;:</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">//get all retval-nodes (allthough it’s just 1)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">var customers = from cmd in xDocument.Descendants(&#8221;Address&#8221;)</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 0px; left: -10000px;">select cmd;</div>
<p>Given the following XML-Document (it&#8217;s the output of a serialized List&lt;Customer&gt;):</p>
<blockquote>
<pre class="brush:xml">&lt;ArrayOfCustomer&gt;
&lt;Customer&gt;
&lt;Name&gt;Jerry&lt;/Name&gt;
&lt;Age&gt;26&lt;/Age&gt;
&lt;Addresses&gt;
&lt;Address&gt;
&lt;Street&gt;Main Street&lt;/Street&gt;
&lt;/Address&gt;
&lt;/Addresses&gt;
&lt;/Customer&gt;
&lt;/ArrayOfCustomer&gt;</pre>
</blockquote>
<p><strong>1) How would you implement a fulltext search to return a List of Customer-Names?</strong></p>
<p><strong><span id="more-2279"></span></strong></p>
<blockquote>
<pre class="brush:xml">public void StartRead(string searchTerm)
{
XDocument xDocument = XDocument.Parse(GetXmlFile()); 

//get all retval-nodes (allthough it’s just 1)
var customers = from cmd in xDocument.Descendants("Customer")
select cmd;

//loop through retval-nodes (still only 1)
foreach (XElement cust in customers)
{
if (RecursiveParser(cust, searchTerm))
{
Log(cust.Name);
}

}

public bool RecursiveParser(XElement element, string searchTerm)
{
if (element.IsEmpty) return false;
if (element.HasElements)
{
foreach (XElement xElement in element.Elements())
{
if (xElement.Value.ToLower().Contains(searchTerm))
return true;

if (RecursiveParser(xElement, searchTerm))
return true;
}
}

return false;
}

 </pre>
</blockquote>
<p><strong>2. How would you implement a fulltext search for addresses only?</strong></p>
<p>Hint: just replace &#8220;Customer&#8221; by &#8220;Address&#8221; in Function StartRead:</p>
<blockquote>
<pre class="brush:xml">//get all retval-nodes (allthough it’s just 1)
var customers = from cmd in xDocument.Descendants("Address")</pre>
</blockquote>
<p><strong>3. Want to see a much shorter version of the code from question 1?</strong></p>
<blockquote>
<pre class="brush:xml">//this version is originally from franz!
public void StartRead(string searchTerm)
{
XDocument xDocument = XDocument.Parse(GetXmlFile());

//replace "Customer" by "Loan", if you just want to scan Loans
var customers = xDocument.Descendants("Customer").Where(i =&gt; i.Value.ToLower().Contains(searchTerm)); //.Select(j =&gt; j.Value).ToList();

//loop through retval-nodes
foreach (XElement cust in customers)
{
Log(cust.Name);
}
}</pre>
</blockquote>
<p><strong>Reason: </strong>The Property &#8220;Value&#8221; of an element<strong> contains ALL values from descendents </strong>also!<br />
That&#8217;s why there is no need to recursivly parse the childnodes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/07/22/fulltext-search-on-xml-files-using-linq-xdocument/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8230; immer wieder erfreulich</title>
		<link>http://blog.lieberlieber.com/2010/07/14/immer-wieder-erfreulich/</link>
		<comments>http://blog.lieberlieber.com/2010/07/14/immer-wieder-erfreulich/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 16:01:44 +0000</pubDate>
		<dc:creator>Christian Zauner</dc:creator>
				<category><![CDATA[Windows 7 Phone]]></category>
		<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[Windows Mobile Marketplace]]></category>
		<category><![CDATA[Apps; Spin the Bottle; Mäxchen; Mexico]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/2010/07/14/immer-wieder-erfreulich/</guid>
		<description><![CDATA[&#160; 
Windows Marketplace for Mobile: Anwendungen anzeigen
Es ist doch immer wieder erfreulich zu sehen, dass unsere gute, alte “Spin-the-Bottle” App immer noch zu den beliebtesten Apps für Windows Phone gehört !
In diesem Sinne …. viel Spass im Urlaub &#8211; egal ob beim Flaschendrehen oder Mäxchen spielen!
… und an den nächsten Games für Windows Phone7 und [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.lieberlieber.com/wp-content/uploads/image29.png"  rel="lightbox[2278]"><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://blog.lieberlieber.com/wp-content/uploads/image_thumb23.png" width="450" height="376" /></a>&#160; </p>
<p><a href="http://marketplace.windowsphone.com/Default.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/marketplace.windowsphone.com');">Windows Marketplace for Mobile: Anwendungen anzeigen</a></p>
<p>Es ist doch immer wieder erfreulich zu sehen, dass unsere gute, alte “Spin-the-Bottle” App immer noch zu den beliebtesten Apps für Windows Phone gehört !</p>
<p>In diesem Sinne …. viel Spass im Urlaub &#8211; egal ob beim Flaschendrehen oder <a href="http://blog.lieberlieber.com/?s=mexico" >Mäxchen</a> spielen!</p>
<p>… und an den nächsten Games für Windows Phone7 und MS Surface arbeiten wir schon <img src='http://blog.lieberlieber.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/07/14/immer-wieder-erfreulich/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
