<?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>OpenSpan &#187; Automation</title>
	<atom:link href="http://blogs.openspan.com/category/automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.openspan.com</link>
	<description>OpenSpan - User Process Improvement</description>
	<lastBuildDate>Thu, 02 Feb 2012 22:53:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Eliminating Copying &amp; Pasting Between Applications</title>
		<link>http://blogs.openspan.com/2011/05/eliminating-copying-pasting-between-applications/</link>
		<comments>http://blogs.openspan.com/2011/05/eliminating-copying-pasting-between-applications/#comments</comments>
		<pubDate>Tue, 03 May 2011 17:29:10 +0000</pubDate>
		<dc:creator>twelsch</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Call Center]]></category>
		<category><![CDATA[OpenSpan]]></category>
		<category><![CDATA[Process Improvement]]></category>
		<category><![CDATA[business process improvement]]></category>
		<category><![CDATA[copy and paste]]></category>
		<category><![CDATA[copy paste]]></category>
		<category><![CDATA[eliminate copying and pasting]]></category>
		<category><![CDATA[end user experience]]></category>
		<category><![CDATA[process improvement software]]></category>
		<category><![CDATA[user experience software]]></category>

		<guid isPermaLink="false">http://blogs.openspan.com/?p=352</guid>
		<description><![CDATA[Every day, EVERY DAY, when I was at work I would have to copy and paste between multiple applications. And not just once or twice but over and over throughout the day. And it was always the same, first names, last names, addresses, phone numbers, etc. And even though I had gotten very good at [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F05%2Feliminating-copying-pasting-between-applications%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F05%2Feliminating-copying-pasting-between-applications%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Every day, EVERY DAY, when I was at work I would have to copy and paste between multiple applications. And not just once or twice but over and over throughout the day. And it was always the same, first names, last names, addresses, phone numbers, etc. And even though I had gotten very good at it and could Ctrl-C, Ctrl-V and tab or mouse my way through with the best of them, I just new that they time it was taking must really add up, especially when multiplied out by all my co-workers who had to go through the same thing.  I would always wonder, ‘why am I still doing this’ and ‘can there not be a way for me not to have to do this anymore’? I think it became one of those tasks at work that I, along with my co-workers and millions and millions of others I am sure, was resigned to doing.</p>
<p>So why was it like this? Why did I have to accept the fact that my SAP applications couldn’t talk, so to speak, to my Salesforce ones or my company’s custom built or legacy applications for that matter? I think two reasons contributed to this more than anything else.  First, copying and pasting had become a natural flow of keystrokes or mouse clicks that I was just willing to accept as part of what I had to do. To me it was just an extension of typing. Second, and perhaps the biggest reason, is that I didn’t think getting rid of task like copying and pasting was even possible.</p>
<p>The first reason makes sense. I, like most of us, learned a task the way I learned it and then as it became more and more repetitive, I just became better and better at it to the point where even though I still had to do it, I was so fast at it, I didn’t really care about doing it or look at it as a real hindrance to my job performance. So copying and pasting of basic information between applications had just become an accepted part of the process. I could also look at the fact that copying and pasting the information rather than having to re-type it all from one application to another was in itself a significant process improvement. Now the second the reason, regarding it being even possible to eliminate the need to copy and paste all together, I guess it’s one of those things where I thought to myself, someone has probably figured this out, but it probably takes a lot of custom coding and wouldn&#8217;t be easy to implement especially not when dealing with multiple systems and even some that were custom built. Something like that just wouldn’t really seem a high priority for most IT departments who support multiple users of multiple applications.</p>
<p>It wasn&#8217;t until I came to OpenSpan that I found the way that there was an easy solution for this common task that affects millions of users on a daily basis. OpenSpan’s software has <a href="http://www.youtube.com/user/OpenSpan#p/u/6/3RP4UwJkgHk">eliminated the need to copy and paste between applications has been solved and the solution itself can be implemented in under 5 minutes</a>.  Better still, once rolled out to all users who work with multiple applications and need to copy and paste information between them, it can really save a tremendous amount of time. To really grasp the amount of time it can save, imagine what solution like this could mean for a 600 seat call center or a bank with 50 branches. The more opportunities at the user level to eliminate copying and pasting, the more time is saved and the more productive your employees can become. To see just how easy it is, <a href="http://www.youtube.com/user/OpenSpan#p/u/6/3RP4UwJkgHk">watch our short video demonstration</a> using the OpenSpan technology and then <a href="http://www.openspan.com/download">register on our community site</a> and try it yourself.</p>
<p><iframe width="425" height="349" src="http://www.youtube.com/embed/3RP4UwJkgHk" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.openspan.com/2011/05/eliminating-copying-pasting-between-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Power of the Contextual Help</title>
		<link>http://blogs.openspan.com/2011/04/the-power-of-the-contextual-help/</link>
		<comments>http://blogs.openspan.com/2011/04/the-power-of-the-contextual-help/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 21:08:00 +0000</pubDate>
		<dc:creator>Marcelo Jabali</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[OpenSpan]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I spent this week onsite in Baltimore helping a customer architect some automation scenarios where the goal of this exercise was not only to reduce the average handling time of the contact center agents but also make them more productive and provide be...]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F04%2Fthe-power-of-the-contextual-help%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F04%2Fthe-power-of-the-contextual-help%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I spent this week onsite in Baltimore helping a customer architect some automation scenarios where the goal of this exercise was not only to reduce the average handling time of the contact center agents but also make them more productive and provide better customer service.</p>
<p>One of the issues we identified during the discovery phase of this project was the lack of ability of the users to recognize customers with flagged accounts or important alerts to need to be reviewed when get in touch with the contact center.</p>
<p>The current system provides a black triangle image close to the right corner of the screen while the account information is on the left corner. Ha! Don&#8217;t get me wrong but who in the world designed a condition like that? <br />Something that has to be brought to the agent&#8217;s attention in black on a gray background. Nah! It&#8217;s not gonna work.</p>
<p>Frankly, now I understand why these agents were not able to check that alert and keep that in mind during the call or take action according to the information provided there. They couldn&#8217;t see it. Agents working all day long taking calls and in front of their computers with the exact same applications all day start not recognizing small changes. It&#8217;s a fact! You gotta do something better and give them a better experience if you want to have a better customer service.</p>
<p>So, we fixed that issue&#8230; and more than that&#8230; We didn&#8217;t change a line of code on their systems.<br />OpenSpan has a very nice capability to recognize when a control (button, image, textbox, dropbox, etc) is created, changed, clicked or whatever happens with it.<br />OpenSpan also has a method called ShowToolTip which works for Windows and Web applications.<br />The quick solution to the issue described here was to combine these two OpenSpan capabilities.<br />To give you some details, when the agent was getting the account information for the call we setup an event &#8220;listening&#8221; for the alert image creation on the screen. As soon as we recognize that condition we then read the Outer HTML property of that image because that would be the text displayed on our tooltip and finally display the tooltip for 10 seconds. In a non-intrusive way we brought the agent&#8217;s attention to where we needed so they could see the alert without clicking on anything and kept working on their call without any interruption.<br />What colors we decided to use??? Well, we decided to do it in <a href="http://www.openspan.com">OpenSpan Orange-like</a> and since we were in Baltimore why not to say that was an <a href="http://baltimore.orioles.mlb.com/">Orioles</a> sponsored tool tip.</p>
<p>It came out similar to this:
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-q7_SVYj2hAg/TZ93fJk8ZOI/AAAAAAAAAG0/A29GEoUhkuI/s1600/1.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="105" width="174" src="http://2.bp.blogspot.com/-q7_SVYj2hAg/TZ93fJk8ZOI/AAAAAAAAAG0/A29GEoUhkuI/s400/1.png" /></a></div>
<p>There are so many use cases for an implementation like that. From process guidance to bringing the agent&#8217;s attention to certain aspects and everything in between. </p>
<p>If you&#8217;re interested about the tooltip capability take a look on the OpenSpan Online Documentation available <a href="http://help.openspan.com/Adapters_Interrogation/Using_ShowToolTip.htm">here</a>.
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7850628466108183059-8496676691059026761?l=marcelojabali.blogspot.com' alt='' /></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.openspan.com/2011/04/the-power-of-the-contextual-help/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Items from Comboboxes to Windows Forms</title>
		<link>http://blogs.openspan.com/2011/03/how-to-add-items-from-comboboxes-to-windows-forms/</link>
		<comments>http://blogs.openspan.com/2011/03/how-to-add-items-from-comboboxes-to-windows-forms/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 19:15:00 +0000</pubDate>
		<dc:creator>Marcelo Jabali</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[OpenSpan]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[On a recent PoC (Proof-of-Concept) I had to add items from two comboboxes to a Windows Form combobox. Here is a simple solution to that:1. Highlight the combobox control in Object Explorer and click the Explore Component Properties button at the top of...]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F03%2Fhow-to-add-items-from-comboboxes-to-windows-forms%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F03%2Fhow-to-add-items-from-comboboxes-to-windows-forms%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>On a recent PoC (Proof-of-Concept) I had to add items from two comboboxes to a Windows Form combobox. Here is a simple solution to that:</p>
<p>1. Highlight the combobox control in Object Explorer and click the Explore Component Properties button at the top of the Object Explorer.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-OOApsWJVRV4/TZTK-c4WM_I/AAAAAAAAAGM/ceivOgqgETA/s1600/1.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="134" width="363" src="http://2.bp.blogspot.com/-OOApsWJVRV4/TZTK-c4WM_I/AAAAAAAAAGM/ceivOgqgETA/s400/1.png" /></a></div>
<p>2. You should see the list of properties available for the combobox control. Select the &#8220;Items&#8221; property and then select Configure Type to see Properties and Methods of the combobox.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-bVDQ7UJQftw/TZTOczY7eMI/AAAAAAAAAGU/ixWQvqCPN4I/s1600/2.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="263" width="362" src="http://1.bp.blogspot.com/-bVDQ7UJQftw/TZTOczY7eMI/AAAAAAAAAGU/ixWQvqCPN4I/s400/2.png" /></a></div>
<p>3. Select the Methods you would like to use and then click OK. The methods you selected will appear in the Object Explorer. I&#8217;ve added Items.AddRange(Object[] items) to add an Array of items Commonly used methods are:</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-S57P7kwHrLU/TZTPlAQD1gI/AAAAAAAAAGc/Se7QhpCuysw/s1600/3.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="144" width="357" src="http://2.bp.blogspot.com/-S57P7kwHrLU/TZTPlAQD1gI/AAAAAAAAAGc/Se7QhpCuysw/s400/3.png" /></a></div>
<p>4. Then on my Automation I just added the AddRange method to be populated by the combobox from a Windows Application. Something similar to the following:</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-WU5EdpqEqeo/TZTSKMvoc1I/AAAAAAAAAGs/nZIwujW9dLY/s1600/4.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="172" width="355" src="http://3.bp.blogspot.com/-WU5EdpqEqeo/TZTSKMvoc1I/AAAAAAAAAGs/nZIwujW9dLY/s400/4.png" /></a></div>
<p>I just did the same thing for the other combobox items I wanted to add to my Windows Form combobox and ended up with all of them in one single control.
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7850628466108183059-5305759043487659784?l=marcelojabali.blogspot.com' alt='' /></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.openspan.com/2011/03/how-to-add-items-from-comboboxes-to-windows-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Change the Default Drag And Drop Behavior for Properties, Methods or Events</title>
		<link>http://blogs.openspan.com/2011/03/how-to-change-the-default-drag-and-drop-behavior-for-properties-methods-or-events/</link>
		<comments>http://blogs.openspan.com/2011/03/how-to-change-the-default-drag-and-drop-behavior-for-properties-methods-or-events/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 22:59:00 +0000</pubDate>
		<dc:creator>Marcelo Jabali</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[OpenSpan]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[There are some cases during a project you're constantly working with the same control and you want to change the default behavior when you drag and drop it from the Object Explorer. Well, here is what you have to do to change the default behavior in Op...]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F03%2Fhow-to-change-the-default-drag-and-drop-behavior-for-properties-methods-or-events%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F03%2Fhow-to-change-the-default-drag-and-drop-behavior-for-properties-methods-or-events%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There are some cases during a project you&#8217;re constantly working with the same control and you want to change the default behavior when you drag and drop it from the Object Explorer. Well, here is what you have to do to change the default behavior in OpenSpan Studio (MS-Visual Studio plugin):</p>
<p>1. Select the control type you want and click Configure Type. Here is an example for a button.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-w7vm7ZcoFKE/TZJhFKIQdZI/AAAAAAAAAF0/XX8pCIz9aVw/s1600/1.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="335" width="320" src="http://1.bp.blogspot.com/-w7vm7ZcoFKE/TZJhFKIQdZI/AAAAAAAAAF0/XX8pCIz9aVw/s400/1.png" /></a></div>
<p>2. The Button Control Configuration pops up and now you can select the property, event or method you want to be the default behavior. For the button control the &#8220;Click&#8221; event is the default behavior.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-NhNzADIXaTk/TZJhtTPh8oI/AAAAAAAAAF8/dKJBMagwh6w/s1600/2.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="400" width="293" src="http://3.bp.blogspot.com/-NhNzADIXaTk/TZJhtTPh8oI/AAAAAAAAAF8/dKJBMagwh6w/s400/2.png" /></a></div>
<p>3. Select the new configuration you want to be the default behavior, right-click on it and then select Set As Default Member.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-cNDB4YCuCW4/TZJivsbUGCI/AAAAAAAAAGE/mWdg2Q-yhVM/s1600/3.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="400" width="296" src="http://3.bp.blogspot.com/-cNDB4YCuCW4/TZJivsbUGCI/AAAAAAAAAGE/mWdg2Q-yhVM/s400/3.png" /></a></div>
<p>In the example above I&#8217;ve set the PerformClick method to be the default behavior.</p>
<p>The next time I drag and drop a button to the automation it will be the PerformClick method instead of the Click event.
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7850628466108183059-645157354960808079?l=marcelojabali.blogspot.com' alt='' /></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.openspan.com/2011/03/how-to-change-the-default-drag-and-drop-behavior-for-properties-methods-or-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create Code-Based OpenSpan Solutions</title>
		<link>http://blogs.openspan.com/2011/03/how-to-create-code-based-openspan-solutions/</link>
		<comments>http://blogs.openspan.com/2011/03/how-to-create-code-based-openspan-solutions/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 20:39:00 +0000</pubDate>
		<dc:creator>Marcelo Jabali</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[OpenSpan]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[OpenSpan Studio and its counterpart MS-Visual Studio plugin do a pretty good job when you have to integrate applications where you don’t have the source code available, service-enabled applications and/or exposed APIs. Having all the properties, even...]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F03%2Fhow-to-create-code-based-openspan-solutions%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblogs.openspan.com%2F2011%2F03%2Fhow-to-create-code-based-openspan-solutions%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>OpenSpan Studio and its counterpart MS-Visual Studio plugin do a pretty good job when you have to integrate applications where you don’t have the source code available, service-enabled applications and/or exposed APIs. Having all the properties, events and methods graphically available make the development effort much easier than coding from scratch.</p>
<p>But, let’s say you’re an avid developer and feel pretty good handling code. Well, here is something you would really appreciate then. OpenSpan 4.5 has the capability of write automations directly in C#, VB or other .NET languages.</p>
<p>This is really powerful when you have the source code available and you want to drive your automations from a .NET-based application. Also, this approach would make the deployment sometimes simpler than the traditional approach.</p>
<p>Here is an example of code-based automation project:</p>
<p>1. Create a new .NET project. In this example we’ll be using a Visual C# project as the base project. Then, name it CodeBasedDemo.<br />2. You don’t the auto generated Form1.cs so feel free to remove it from your project.<br />3. In the same solution, create a new Empty OpenSpan project and name it CodeBasedOSDemo. Make sure you set the Solution field to Add to Solution instead of creating a new one.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-2NwFLRZCvz4/TYJpOr4KfXI/AAAAAAAAAC4/gQ989gqPLUs/s1600/1.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="287" width="400" src="http://1.bp.blogspot.com/-2NwFLRZCvz4/TYJpOr4KfXI/AAAAAAAAAC4/gQ989gqPLUs/s400/1.png" /></a></div>
<p>4. Your solution should be similar to the following Solution Explorer image:</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-LgHT-guzl_M/TYJu2UHCt1I/AAAAAAAAADA/GeGUxFVNGZ4/s1600/2.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="314" width="400" src="http://4.bp.blogspot.com/-LgHT-guzl_M/TYJu2UHCt1I/AAAAAAAAADA/GeGUxFVNGZ4/s400/2.png" /></a></div>
<p>5. Now, it’s time to interrogate the required applications. We’re going to use a Windows-based application and a Web-based application for the purpose of the sample project. We’re not going to cover the interrogation process in details but feel free to take a look on the OpenSpan Online Help for more information. The OpenSpan Online Help is available at <a href="http://help.openspan.com/">http://help.openspan.com/</a></p>
<p>6. After interrogating the two sample applications (MyCRM Windows-based application and the Web-based Fedex.com website) you should have something similar to the following in the Object Explorer panel:</p>
<p>Windows-based application</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-F1hujPtPL9o/TYJvQJGaBVI/AAAAAAAAADI/XlceONiyXCQ/s1600/3.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="400" width="341" src="http://3.bp.blogspot.com/-F1hujPtPL9o/TYJvQJGaBVI/AAAAAAAAADI/XlceONiyXCQ/s400/3.png" /></a></div>
<p>Web-based application</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-IF5pay8Ly6M/TYJvgJA29JI/AAAAAAAAADQ/Qkg_I5Vw94Q/s1600/4.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="244" width="400" src="http://3.bp.blogspot.com/-IF5pay8Ly6M/TYJvgJA29JI/AAAAAAAAADQ/Qkg_I5Vw94Q/s400/4.png" /></a></div>
<p>7. You’re now ready to dive into the code-based solution once everything we needed from the OpenSpan side is completed at this point. But before you start typing real code, make sure you import the right references to your .NET C# project. You may reference the same ones that OpenSpan automatically add when you interrogated the Windows and Web based applications.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-hs0sLHEoIY0/TYJvvvtI4aI/AAAAAAAAADY/fOkILDzPq6U/s1600/5.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="400" width="257" src="http://3.bp.blogspot.com/-hs0sLHEoIY0/TYJvvvtI4aI/AAAAAAAAADY/fOkILDzPq6U/s400/5.png" /></a></div>
<p>8. Make sure you also add the CodeBasedOSDemo (the OpenSpan project) as a reference to your .NET C# project.<br />9. Right-click on your OpenSpan project and Build it to make all the necessary assemblies available to the parent project.<br />10. Open the Program.cs class file and create instances of the OpenSpan interrogated applications:</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-G0ck-Hfdgn8/TYJwAMt6MSI/AAAAAAAAADg/KrWgPpgAdzw/s1600/6.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="281" width="400" src="http://3.bp.blogspot.com/-G0ck-Hfdgn8/TYJwAMt6MSI/AAAAAAAAADg/KrWgPpgAdzw/s400/6.png" /></a></div>
<p>11. You’re ready to start interacting with the interrogated controls.  Some of the possibilities like checking the state of checkboxes, making fields read-only, copying the required fields when the user take actions on any of the running applications, etc are listed on the commented code below:</p>
<p><code><br />using System;<br />using System.Collections.Generic;<br />using System.Linq;<br />using System.Windows.Forms;</p>
<p>namespace CodeBasedDemo<br />{<br />static class Program<br />{<br />//Create instances of the MyCRM and Fedex objects<br />static CodeBasedOSDemo.MyCRM myCRM = new CodeBasedOSDemo.MyCRM();<br />static CodeBasedOSDemo.Fedex fedex = new CodeBasedOSDemo.Fedex();</p>
<p>///<br />
<summary>/// The main entry point for the application.<br />/// </summary>
<p>[STAThread]<br />static void Main()<br />{<br />//Start Applications<br />myCRM.Start();<br />fedex.Start();</p>
<p>//Make some fields Read-Only<br />myCRM.txttxtCreditLimit.ReadOnly = true;<br />myCRM.txttxtAccountBalance.ReadOnly = true;</p>
<p>//Handle the Do Not Call checkbox behavior<br />myCRM.cbDo_Not_Call.Click += new EventHandler(cbDo_Not_Call_Click);</p>
<p>//Handle the OK button click<br />myCRM.btnOK.Click += new EventHandler(btnOK_Click);<br />//Handle the Click on the Last Tracking Number label<br />myCRM.lblLast_Tracking_.Click += new EventHandler(lblLast_Tracking__Click);</p>
<p>Application.EnableVisualStyles();<br />Application.SetCompatibleTextRenderingDefault(false);<br />Application.Run();<br />}</p>
<p>// Close the Applications and shutdown the running instance<br />static void btnOK_Click(object sender, EventArgs e)<br />{<br />if(myCRM.IsRunning)<br />myCRM.Stop();<br />if(fedex.IsRunning)<br />fedex.Stop();<br />Application.Exit();<br />}</p>
<p>// Copy the Last Tracking Number from the MyCRM application<br />// to the text area on the Fedex website, perform the click on<br />// the Track button and return the Delivery Date to the Notes field<br />// on the MyCRM application. By the way, 3 lines of code to do that.<br />static void lblLast_Tracking__Click(object sender, EventArgs e)<br />{<br />fedex.textArea1.Text = myCRM.txttxtLastTrackNum.Text;<br />fedex.Track.PerformClick();<br />myCRM.txttxtNotes.Text = "Delivered Date: " + fedex.txtDeliveredDate.Text;</p>
<p>}</p>
<p>// Show or Hide the Phone field depending on the status of <br />// the Do Not Call checkbox<br />static void cbDo_Not_Call_Click(object sender, EventArgs e)<br />{<br />if (myCRM.cbDo_Not_Call.Checked)<br />myCRM.txttxtPhone.Hide();<br />else<br />myCRM.txttxtPhone.Show();</p>
<p>}<br />}<br />}<br /></code></p>
<p>12. Set the CodeBasedDemo project as the startup project of your solution</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-EkSs8HAB7hQ/TYJwYs8Y-aI/AAAAAAAAADo/4awc8KPmT18/s1600/7.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="242" width="400" src="http://3.bp.blogspot.com/-EkSs8HAB7hQ/TYJwYs8Y-aI/AAAAAAAAADo/4awc8KPmT18/s400/7.png" /></a></div>
<p>13. When you finish coding your automations, copy the .dll files under the CodeBasedOSDemo\bin\Debug directory to CodeBasedDemo\bin\Debug<br />14. Build the solution and run it.</p>
<p>If you have any problems building the solution take a look on the first few lines of the exception as it can point you to probably missing libraries in your project.</p>
<p>The sample code for this tutorial is also available here: <a href="http://dl.dropbox.com/u/10511857/CodeBasedDemo.zip">Code-Based Demo Source</a>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7850628466108183059-879157933244518595?l=marcelojabali.blogspot.com' alt='' /></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.openspan.com/2011/03/how-to-create-code-based-openspan-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4.1 Feature Spotlight: Automation Stack</title>
		<link>http://blogs.openspan.com/2009/06/4-1-feature-spotlight-automation-stack-2/</link>
		<comments>http://blogs.openspan.com/2009/06/4-1-feature-spotlight-automation-stack-2/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 19:26:00 +0000</pubDate>
		<dc:creator>Damon Lockwood</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[OpenSpan]]></category>

		<guid isPermaLink="false">http://blogs.openspan.com/?guid=0d02c75c6326fdbc46eeae0e2250e9f6</guid>
		<description><![CDATA[It's that time again! As our 4.1 release nears completion, it's time to start posting about our new features. One of the new features we're testing currently is a new automation stack implementation. As our platform has evolved, we have begun to use ou...]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblogs.openspan.com%2F2009%2F06%2F4-1-feature-spotlight-automation-stack-2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblogs.openspan.com%2F2009%2F06%2F4-1-feature-spotlight-automation-stack-2%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>It&#8217;s that time again! As our 4.1 release nears completion, it&#8217;s time to start posting about our new features. One of the new features we&#8217;re testing currently is a new automation stack implementation. As our platform has evolved, we have begun to use our automation engine in new and more complicated environments. Previously, most of our environments were single-threaded <span class="blsp-spelling-error" id="SPELLING_ERROR_0">automations</span> of applications on the user desktop. Now, our platform is being used on the server to automate back-office requests, process messages and expose applications as web services. In this new environment, it quickly became clearly that our automation engine needed a proper stack to ensure that our <span class="blsp-spelling-error" id="SPELLING_ERROR_1">automations</span> remained thread safe.</p>
<p>If you&#8217;re not familiar with <span class="blsp-spelling-error" id="SPELLING_ERROR_2">OpenSpan</span>, one of your first questions might be how the heck don&#8217;t you already have a stack? To explain that, I need to go under the hood for a little bit. Looking at the automation your first instinct would be to assume that <span class="blsp-spelling-error" id="SPELLING_ERROR_3">OpenSpan</span> is a visual programming language that generates source code. For example, the automation below could be expressed in a C# class as:
<pre>private string <span class="blsp-spelling-error" id="SPELLING_ERROR_4">varString</span>;private void Setup(){   <span class="blsp-spelling-error" id="SPELLING_ERROR_5">btnSubmit</span>.Click += delegate   {      <span class="blsp-spelling-error" id="SPELLING_ERROR_6">varString</span> = <span class="blsp-spelling-error" id="SPELLING_ERROR_7">txtPhone</span>.Text;      webBrowser.Navigate(txtUrl.Text);   };}</pre>
<p><a href="http://2.bp.blogspot.com/_f_me7LYm8dE/SjphEzFOVII/AAAAAAAAA1g/SrCCeXB8HLk/s1600-h/AutomationStack+-+Automation1.jpg"><img id="BLOGGER_PHOTO_ID_5348694242515375234" style="MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 124px" alt="" src="http://2.bp.blogspot.com/_f_me7LYm8dE/SjphEzFOVII/AAAAAAAAA1g/SrCCeXB8HLk/s400/AutomationStack+-+Automation1.jpg" border="0" /></a><br />Pretty straightforward, right? How about this automation? In this case we&#8217;ve made one of the links asynchronous indicating that the next step should be performed on a new thread.
<pre>private string <span class="blsp-spelling-error" id="SPELLING_ERROR_8">varString</span>;private void Setup(){   <span class="blsp-spelling-error" id="SPELLING_ERROR_9">btnSubmit</span>.Click += delegate   {      <span class="blsp-spelling-error" id="SPELLING_ERROR_10">varString</span> = <span class="blsp-spelling-error" id="SPELLING_ERROR_11">txtPhone</span>.Text;      <span class="blsp-spelling-error" id="SPELLING_ERROR_12">NavigateDelegate</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_13">navDel</span> = delegate(string <span class="blsp-spelling-error" id="SPELLING_ERROR_14">url</span>)      {         <span class="blsp-spelling-error" id="SPELLING_ERROR_15">webBrowser</span>.Navigate(<span class="blsp-spelling-error" id="SPELLING_ERROR_16">url</span>);      };      navDel.BeginInvoke(txtUrl.Text, null, null);   };}</pre>
<p><a href="http://2.bp.blogspot.com/_f_me7LYm8dE/SjphE1gmcVI/AAAAAAAAA1o/8YW2g-9-TtU/s1600-h/AutomationStack+-+Automation2.jpg"><img id="BLOGGER_PHOTO_ID_5348694243167072594" style="MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 128px" alt="" src="http://2.bp.blogspot.com/_f_me7LYm8dE/SjphE1gmcVI/AAAAAAAAA1o/8YW2g-9-TtU/s400/AutomationStack+-+Automation2.jpg" border="0" /></a><br />Now it&#8217;s starting to get more complicated. Every time we need to execute an asynchronous link we would need to generate a delegate type. I&#8217;m using anonymous methods which makes it easier, but it&#8217;s still pretty difficult. How about this automation? We have two execution threads from different events converging on a single block. Easy to express in <span class="blsp-spelling-error" id="SPELLING_ERROR_17">OpenSpan</span>, but we would need to use another method or delegate in C#.
<pre>private string <span class="blsp-spelling-error" id="SPELLING_ERROR_18">varString</span>;private void Setup(){   <span class="blsp-spelling-error" id="SPELLING_ERROR_19">btnSubmit</span>.Click += delegate { <span class="blsp-spelling-error" id="SPELLING_ERROR_20">NextStep</span>(); };   <span class="blsp-spelling-error" id="SPELLING_ERROR_21">webForm</span>.Submitting += delegate(object sender, <span class="blsp-spelling-error" id="SPELLING_ERROR_22">CancelEventArgs</span> e)   {      <span class="blsp-spelling-error" id="SPELLING_ERROR_23">NextStep</span>();   };}

private void <span class="blsp-spelling-error" id="SPELLING_ERROR_24">NextStep</span>(){   <span class="blsp-spelling-error" id="SPELLING_ERROR_25">varString</span> = <span class="blsp-spelling-error" id="SPELLING_ERROR_26">txtPhone</span>.Text;   <span class="blsp-spelling-error" id="SPELLING_ERROR_27">NavigateDelegate</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_28">navDel</span> = delegate(string <span class="blsp-spelling-error" id="SPELLING_ERROR_29">url</span>)   {      <span class="blsp-spelling-error" id="SPELLING_ERROR_30">webBrowser</span>.Navigate(<span class="blsp-spelling-error" id="SPELLING_ERROR_31">url</span>);   };   navDel.BeginInvoke(txtUrl.Text, null, null);}</pre>
<p><a href="http://4.bp.blogspot.com/_f_me7LYm8dE/SjphFGOH93I/AAAAAAAAA1w/hZNU5ZqTpv8/s1600-h/AutomationStack+-+Automation3.jpg"><img id="BLOGGER_PHOTO_ID_5348694247652980594" style="MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 177px" alt="" src="http://4.bp.blogspot.com/_f_me7LYm8dE/SjphFGOH93I/AAAAAAAAA1w/hZNU5ZqTpv8/s400/AutomationStack+-+Automation3.jpg" border="0" /></a><br />Even more complicated, and I haven&#8217;t even added entry points to the automation. So what can we conclude from this exercise? As you might have guessed, <span class="blsp-spelling-error" id="SPELLING_ERROR_32">OpenSpan</span> does not generate source code. Instead, we model execution flow using a serialized object graph. This gives us greater flexibility to express logical concepts such as branches, joins, etc. without the limitations of traditional syntax. However, because we do not generate code we are unable to rely on the existing thread stack to manage our local variables for us. Thus, prior to 4.1, we simply didn&#8217;t have a stack at all.</p>
<p>So, how does the new stack work? For the most part, it works like the normal thread stack we all know and love. When an automation is entered, all of the local variables and components are allocated and pushed onto the automation stack. So far so good, right? But what about those pesky asynchronous links? In <span class="blsp-spelling-error" id="SPELLING_ERROR_33">OpenSpan</span> it&#8217;s perfectly legal to have two links on different threads in the same automation updating variables.</p>
<p><a href="http://3.bp.blogspot.com/_f_me7LYm8dE/SjpkM0Q3JoI/AAAAAAAAA2A/5BwebeiiXJI/s1600-h/AutomationStack+-+Automation4.jpg"><img id="BLOGGER_PHOTO_ID_5348697678806460034" style="MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 249px" alt="" src="http://3.bp.blogspot.com/_f_me7LYm8dE/SjpkM0Q3JoI/AAAAAAAAA2A/5BwebeiiXJI/s400/AutomationStack+-+Automation4.jpg" border="0" /></a><br />So what should we do here? In a traditional thread stack model, each asynchronous link gets it&#8217;s own stack. <span class="blsp-spelling-error" id="SPELLING_ERROR_34">OpenSpan</span>, however, makes creating new threads absurdly easy. Thus, it&#8217;s easy to create a number of parallel threads to accomplish tasks such as updating three or four application simultaneously. Should we allocate new variables and components every time we execute a new asynchronous link? Should we initialize them to their original defaults or should we initialize them to their current values?</p>
<p>As you probably guessed, the correct answer is none of the above. The new automation stack is not a thread stack. Local components and variables are allocated on a per automation basis not on a per thread basis. Thus, each of those asynchronous links in the example above are actually updating the same variable. This approach preserves the ease of threading <span class="blsp-spelling-error" id="SPELLING_ERROR_35">OpenSpan</span> traditionally provides, while adding the additional safety of stack-based variables.</p>
<p>Now that I&#8217;ve explained how the new automation stack works, I&#8217;ll cover some of the common questions I&#8217;ve been asked about this feature.</p>
<p><strong>What if I want my variables to be available to all <span class="blsp-spelling-error" id="SPELLING_ERROR_36">automations</span>?</strong><br />No problem. <span class="blsp-spelling-error" id="SPELLING_ERROR_37">OpenSpan</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_38">automations</span> now have a global and a local tray. Components in the global tray behave just like they did in previous versions of <span class="blsp-spelling-error" id="SPELLING_ERROR_39">OpenSpan</span>. They can be updated from any automation at any time. Components in the local tray can only be used on that automation and are not exposed to other <span class="blsp-spelling-error" id="SPELLING_ERROR_40">automations</span>.</p>
<p><strong>When are local and global components created?</strong><br />Global components are created when the project is started and can be used in any automation. Local components are only created when an automation is run. Local components can only be used in the automation that contains them.</p>
<p><strong>When are local and global components destroyed?</strong><br />Global components are destroyed when the project is stopped. Local components are destroyed when <em>all the threads in the automation have completed.</em></p>
<p><strong>When should I use a local component?</strong><br />Local components are appropriate when the component in question does not need to be accessed from other <span class="blsp-spelling-error" id="SPELLING_ERROR_41">automations</span> or when an automation can be run simultaneously on multiple threads. Local components are recreated every time an automation is run and thus will not maintain state across multiple runs. For instance, you could not create a local variable to keep track of the number of times an automation is run. Every time the automation runs the counter variable would be recreated and initialized to zero.</p>
<p><strong>What happens when I upgrade my old <span class="blsp-spelling-error" id="SPELLING_ERROR_42">automations</span>?</strong><br />Variables and components from old <span class="blsp-spelling-error" id="SPELLING_ERROR_43">automations</span> will automatically be placed in the global tray during the upgrade process. Thus, your old <span class="blsp-spelling-error" id="SPELLING_ERROR_44">automations</span> will continue to function as they did before. To take advantage of the automation stack, you can easily make any global components local by right-click and selected the &#8220;Make Local&#8221; menu item.
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2870112671300253509-6945914854879491377?l=doitonthedesktop.blogspot.com' alt='' /></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.openspan.com/2009/06/4-1-feature-spotlight-automation-stack-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
	</channel>
</rss>

