<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>SimpleStateMachine Forum Rss Feed</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/List.aspx</link><description>SimpleStateMachine Forum Rss Description</description><item><title>New Post: Timed Events</title><link>http://simplestatemachine.codeplex.com/Thread/View.aspx?ThreadId=67148</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;For the timer, you would need some kind of a long running process to manage the timers, so you probably will need to implement that in whatever process is hosting your workflow and have the timer handler load your workflow and fire an event, TimeoutExpired or something. You could also do something sneaky using the .NET web cache (which is availble in all apps, not just ASP.NET apps)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.codeproject.com/KB/aspnet/ASPNETService.aspx"&gt;http://www.codeproject.com/KB/aspnet/ASPNETService.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think I would also impelment the rule based logic srrounding the pin validation in a context or business object that provides context and events to the state machine. This particular state machine library is intended only to manage events and transitions, and leaves actually managing the state (how many times a user has failed with their pin) to the underlying business or context objects. I have considered having expression based conditional rules that can prevent or allow state transitions, but I haven't found the time to build that in. In the mean time, you can place such logic around event firing code in your business logic.&lt;/p&gt;&lt;/div&gt;</description><author>PlasticLizard</author><pubDate>Tue, 01 Sep 2009 15:59:02 GMT</pubDate><guid isPermaLink="false">New Post: Timed Events 20090901035902P</guid></item><item><title>New Post: Timed Events</title><link>http://simplestatemachine.codeplex.com/Thread/View.aspx?ThreadId=67148</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;What would be the best way to have a timed based trigger. An example of what I mean is:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Imaging the scenario of a Call management workflow&lt;/p&gt;
&lt;p&gt;After the call ages to being 24 hours old, its state should transition to an urgent state&lt;/p&gt;
&lt;p&gt;A second question I have is whether or not you could have a transition being conditional upon a variable. An example of what I mean is:&lt;/p&gt;
&lt;p&gt;Enter PIN, Validate.....if ok continue, else report invalid pin. If pin invalid 3 times, lock account.&lt;/p&gt;
&lt;p&gt;Any ideas on both of these?&lt;/p&gt;&lt;/div&gt;</description><author>myersd</author><pubDate>Thu, 27 Aug 2009 08:17:38 GMT</pubDate><guid isPermaLink="false">New Post: Timed Events 20090827081738A</guid></item><item><title>New Post: Parallel Process</title><link>http://simplestatemachine.codeplex.com/Thread/View.aspx?ThreadId=54829</link><description>&lt;div style="line-height: normal;"&gt;That's a tough one. If you were using a sequential workflow, this would be a no brainer, you'd do a branch and join. We also have this need in our process flows, and I haven't settled on the right answer yet. Our workaround has been to handle it at a higher level, but I'm not terribly happy with our workaround, so I won't bother explaining it. Of your two options, I don't think I'd start creating states that represent combinations of other states, that sounds like a slipper slope. Instead you may want to have a single state, AwaitingDocumentResults, and this state can either host an inner state machine for each document, or can handle waiting for the responses in application logic. In the end, I think the state machine library should probably be given the ability to manage multiple child states automatically, but it will take care not to drift into re-creating WF and building a sequential workflow library into the state machine library, where it doesn't belong. Probably not a hugely helpful answer, but it's all I've got :)&lt;/div&gt;</description><author>PlasticLizard</author><pubDate>Thu, 30 Apr 2009 18:30:12 GMT</pubDate><guid isPermaLink="false">New Post: Parallel Process 20090430063012P</guid></item><item><title>New Post: Parallel Process</title><link>http://simplestatemachine.codeplex.com/Thread/View.aspx?ThreadId=54829</link><description>&lt;div style="line-height: normal;"&gt;I have a system that use a single column for case status. SimpleStateMachine state drives the value of this case status. So right now I have a design dillema.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I have a situation where I need to start two things at the same time. Say that the current state is DocumentsPending. Now I have to send two types of different documetns, which normal will move the state to DistrictLetterDocumentPrinted and ApprovalLetterDocumentPrinted. The next step of each of these statuses are DistrictDocumentWaitForResult and ApprovalLetterlDocumentWaitForResult.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Essentially I am sending two categories of documents to separate institution and I am waitng for both of their results to arrive before I move forward and I want the ability to check where the status of the case are at any given time.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Now should I add an additional case status column so that i can store both DistrictLetterDocumentPrinted and ApprovalLetterDocumentPrinted or should I create a third combination status which says &amp;quot;DOAndApprLetterPrinted&amp;quot; which adds 2/3 additional statuses for each combination but enable me to use just a single column.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;</description><author>nirataro</author><pubDate>Wed, 29 Apr 2009 13:13:57 GMT</pubDate><guid isPermaLink="false">New Post: Parallel Process 20090429011357P</guid></item><item><title>New Post: Injecting dependencies into Tasks</title><link>http://simplestatemachine.codeplex.com/Thread/View.aspx?ThreadId=28812</link><description>&lt;div style="line-height: normal;"&gt;hi nirataro,&lt;br&gt;
&lt;br&gt;
first you need to define your implementation of IObjectBuilder. I have defined mine as below:&lt;br&gt;
&lt;blockquote&gt;public class WindsorObjectBuilder : IObjectBuilder&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private readonly IWindsorContainer _container;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public WindsorObjectBuilder(IWindsorContainer container) &lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _container = container;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public T Create&amp;lt;T&amp;gt;() where T : class&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _container.Resolve&amp;lt;T&amp;gt;();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public T Create&amp;lt;T&amp;gt;(Type type) where T : class&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _container.Resolve&amp;lt;T&amp;gt;();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;/blockquote&gt;then register it as suggested by plastic lizard: &lt;blockquote&gt;ServiceLocator.RegisterService&amp;lt;IObjectBuilder&amp;gt;(new WindsorObjectBuilder(windsorContainer));&lt;/blockquote&gt;
&lt;/div&gt;</description><author>k03123</author><pubDate>Tue, 24 Mar 2009 00:17:22 GMT</pubDate><guid isPermaLink="false">New Post: Injecting dependencies into Tasks 20090324121722A</guid></item><item><title>New Post: Injecting dependencies into Tasks</title><link>http://simplestatemachine.codeplex.com/Thread/View.aspx?ThreadId=28812</link><description>&lt;div style="line-height: normal;"&gt;Is there any example to do accomplish these tasks? Sorry, I'm lost with all the DI techniques being described here.&lt;/div&gt;</description><author>nirataro</author><pubDate>Sun, 22 Mar 2009 08:53:57 GMT</pubDate><guid isPermaLink="false">New Post: Injecting dependencies into Tasks 20090322085357A</guid></item><item><title>New Post: Injecting dependencies into Tasks</title><link>http://simplestatemachine.codeplex.com/Thread/View.aspx?ThreadId=28812</link><description>&lt;div style="line-height: normal;"&gt;We do use the CommonServiceLocator. The recent release of Prism 2.0 also uses it, as well as the Caliburn beta. But yes, still asking out of curiosity.&lt;br&gt;
&lt;/div&gt;</description><author>katokay</author><pubDate>Sun, 01 Mar 2009 23:33:07 GMT</pubDate><guid isPermaLink="false">New Post: Injecting dependencies into Tasks 20090301113307P</guid></item><item><title>New Post: Injecting dependencies into Tasks</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=28812</link><description>&lt;div style="line-height: normal;"&gt;thanks a lot. it works as expected.&lt;br&gt;
&lt;br&gt;
been busy with other stuff and couldn't try it out till today.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;</description><author>k03123</author><pubDate>Wed, 25 Feb 2009 00:52:01 GMT</pubDate><guid isPermaLink="false">New Post: Injecting dependencies into Tasks 20090225125201A</guid></item><item><title>New Post: Injecting dependencies into Tasks</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=28812</link><description>&lt;div style="line-height: normal;"&gt;Yes, I have thought about it a few times - I wasn't sure if anyone is actually using the CommonServiceLocator, so I haven't actually bothered to make the change thus far, as I hate to take a dependency on an external library without a good reason - are you actually using CommonServiceLocator + adapters, or are you asking out of curiosity?&lt;/div&gt;</description><author>PlasticLizard</author><pubDate>Fri, 20 Feb 2009 20:14:05 GMT</pubDate><guid isPermaLink="false">New Post: Injecting dependencies into Tasks 20090220081405P</guid></item><item><title>New Post: Injecting dependencies into Tasks</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=28812</link><description>&lt;div style="line-height: normal;"&gt;Any thoughts on adding support for CommonServiceLocator?&lt;br&gt;
&lt;/div&gt;</description><author>katokay</author><pubDate>Thu, 19 Feb 2009 10:33:24 GMT</pubDate><guid isPermaLink="false">New Post: Injecting dependencies into Tasks 20090219103324A</guid></item><item><title>New Post: Injecting dependencies into Tasks</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=28812</link><description>&lt;div style="line-height: normal;"&gt;Yes, it looks like something changed. There is a service locator now (although it doesn't seem to be getting much use in the library, might have been overkill). Anyway, if you have an implementation of IObjectBuilder you want to use to create your tasks, you can register it when your app inits like this:&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;ServiceLocator.RegisterService&amp;lt;IObjectBuilder&amp;gt;(myObjectBuilder);&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;</description><author>PlasticLizard</author><pubDate>Thu, 19 Feb 2009 05:18:01 GMT</pubDate><guid isPermaLink="false">New Post: Injecting dependencies into Tasks 20090219051801A</guid></item><item><title>New Post: Injecting dependencies into Tasks</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=28812</link><description>&lt;div style="line-height: normal;"&gt;i am trying to inject dependencies into Task. Here you have mentioned to pass IObjectBuilder to the constructor of StateMachine. But i see the constructor doesn't accept any parameters. Has the code changed since then or am I missing the obvious?&lt;br&gt;
&lt;br&gt;
cheers&lt;br&gt;
&lt;/div&gt;</description><author>k03123</author><pubDate>Thu, 19 Feb 2009 04:00:51 GMT</pubDate><guid isPermaLink="false">New Post: Injecting dependencies into Tasks 20090219040051A</guid></item><item><title>New Post: on_event_fired</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=33552</link><description>&lt;div style="line-height: normal;"&gt;The feature works well - I've incorporated this to our soon to be production system - we chose this library over WF. Good work.&lt;/div&gt;</description><author>nirataro</author><pubDate>Tue, 17 Feb 2009 15:10:27 GMT</pubDate><guid isPermaLink="false">New Post: on_event_fired 20090217031027P</guid></item><item><title>New Post: on_event_fired</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=33552</link><description>&lt;div style="line-height: normal;"&gt;No problem - let me know if it gives you any trouble.&lt;br&gt;
&lt;/div&gt;</description><author>PlasticLizard</author><pubDate>Tue, 17 Feb 2009 05:43:05 GMT</pubDate><guid isPermaLink="false">New Post: on_event_fired 20090217054305A</guid></item><item><title>New Post: on_event_fired</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=33552</link><description>&lt;div style="line-height: normal;"&gt;I was doing my usual checks to see if anything new had happened with this project and saw this. Looking forward to this change. Very much appreciated!&lt;br&gt;
&lt;/div&gt;</description><author>katokay</author><pubDate>Mon, 16 Feb 2009 17:48:47 GMT</pubDate><guid isPermaLink="false">New Post: on_event_fired 20090216054847P</guid></item><item><title>New Post: on_event_fired</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=33552</link><description>&lt;div style="line-height: normal;"&gt;thanks heaps.&lt;br&gt;
&lt;br&gt;
appreciated.&lt;br&gt;
&lt;/div&gt;</description><author>k03123</author><pubDate>Mon, 16 Feb 2009 00:26:24 GMT</pubDate><guid isPermaLink="false">New Post: on_event_fired 20090216122624A</guid></item><item><title>New Post: Raising event from the definition</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=46656</link><description>&lt;div style="line-height: normal;"&gt;Brilliant. Thank you so much.&lt;br&gt;
&lt;/div&gt;</description><author>nirataro</author><pubDate>Sun, 15 Feb 2009 19:59:36 GMT</pubDate><guid isPermaLink="false">New Post: Raising event from the definition 20090215075936P</guid></item><item><title>New Post: Raising event from the definition</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=46656</link><description>&lt;div style="line-height: normal;"&gt;There are a few ways to skin this cat. Probably the most straightforward would be to use the just added &amp;quot;event action&amp;quot; feature that allows actions to be fired in response to individual events, instead of simply state transitions, like this:&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:rgb(48, 51, 45);font-family:'segoe ui';font-size:13px"&gt;&lt;div&gt;state @RequiredApprovalsRejected:&lt;/div&gt;&lt;div&gt;    when @Cancel &amp;gt;&amp;gt; @Cancelled&lt;/div&gt;&lt;div&gt;    on_event @assign_call_task &amp;quot;Approval Rejected&amp;quot;, &amp;quot;&amp;quot;&amp;quot;Case {CaseNumber} approval has been rejected. Please notify to pick up original &amp;quot;&amp;quot;&amp;quot; , 20&lt;span style="white-space:pre"&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;		&lt;/span&gt;&lt;/div&gt;&lt;div&gt;state @PaymentPending:&lt;/div&gt;&lt;div&gt;    when @PayFee &amp;gt;&amp;gt; @LicensePrintingPending&lt;/div&gt;&lt;div&gt;    when @Cancel &amp;gt;&amp;gt; @Cancelled&lt;/div&gt;&lt;div&gt;    on_event @assign_call_task &amp;quot;Pay Initial Fee&amp;quot;, &amp;quot;&amp;quot;&amp;quot;Case {CaseNumber} has pending payment. Please come to the office to pay. &amp;quot;&amp;quot;&amp;quot; , 2&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;You will need to download the latest version to be able to use this feature.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><author>PlasticLizard</author><pubDate>Sun, 15 Feb 2009 05:03:35 GMT</pubDate><guid isPermaLink="false">New Post: Raising event from the definition 20090215050335A</guid></item><item><title>New Post: on_event_fired</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=33552</link><description>&lt;div style="line-height: normal;"&gt;Better late than never, hopefully :) I just checked in support for this feature. I adopted both styles, so you can add event actions to the state machine as a whole, which means that any time that event is received at any time during the life of the state machine the defined task will be executed, or you can add an even action to a specific state, which limits the scope of the action to events received while in the specified state.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#Event Definitions&lt;/div&gt;&lt;div&gt;#--------------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;trigger @OrderPlaced&lt;/div&gt;&lt;div&gt;trigger @CreditCardApproved&lt;/div&gt;&lt;div&gt;trigger @CreditCardDenied&lt;/div&gt;&lt;div&gt;trigger @OrderCancelledByCustomer&lt;/div&gt;&lt;div&gt;trigger @OutOfStock&lt;/div&gt;&lt;div&gt;trigger @OrderStocked&lt;/div&gt;&lt;div&gt;trigger @OrderShipped&lt;/div&gt;&lt;div&gt;trigger @OrderReceived&lt;/div&gt;&lt;div&gt;trigger @OrderLost:&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;on_event @WriteToHistory, &amp;quot;Order Lost event occured. Oh No! Sorry Mr. Customer!&amp;quot;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;##AND/OR##&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;state @AwaitingPayment:&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;when @CreditCardApproved       &amp;gt;&amp;gt; @AwaitingShipment&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;when @CreditCardDenied         &amp;gt;&amp;gt; @OrderCancelled&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;when @OrderCancelledByCustomer &amp;gt;&amp;gt; @OrderCancelled&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;on_event @WriteToHistory, &amp;quot;The order was cancelled prior to payment. Probably accidentally clicked 'One Click Checkout'&amp;quot;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><author>PlasticLizard</author><pubDate>Sun, 15 Feb 2009 04:52:52 GMT</pubDate><guid isPermaLink="false">New Post: on_event_fired 20090215045252A</guid></item><item><title>New Post: on_event_fired</title><link>http://www.codeplex.com/SimpleStateMachine/Thread/View.aspx?ThreadId=33552</link><description>&lt;div style="line-height: normal;"&gt;This discussion has been copied to a work item. Click &lt;a href="http://www.codeplex.com/SimpleStateMachine/WorkItem/View.aspx?WorkItemId=3204"&gt;here&lt;/a&gt; to go to the work item and continue the discussion.&lt;/div&gt;</description><author>PlasticLIzard</author><pubDate>Sat, 14 Feb 2009 22:19:37 GMT</pubDate><guid isPermaLink="false">New Post: on_event_fired 20090214101937P</guid></item></channel></rss>