statemachine

Is the StateMachine on Windows WorkFlow Thread Safe?

Hello I am planning to use the State Machine WorkFlow of Windows Workflows. The state machine will be receiving events from two separate threads, the state machine of course will both change its state and execute actions based on its current state and the event that came in. My question is, is the state machine of windows workflow thr...

Are Windows Workflow Foundation Statemachines suitable for high performance scenarios?

hi there, i´m currently dealing with a system where i have to track the state for several thousand objects in parallel that send possible state updates a few times every minute. In addition i have to perform additional computation (no slow IO stuff, just using CPU). I currently use a custom state machine implementation. however, as WF ...

state machines tutorials

Hello, C99 I am just wondering if anyone know of some good tutorials on the Internet for developing state machines. Or ebooks? I am starting working on state machines and just need something general to get me started. Many thanks, ...

big vs. nested statemachines

I have a statemachine in a real-time system with very few (3) states. typedef enum { STATE1, STATE2, STATE3 } state_t; However, the transitions between those states need considerable time and have their own subdivisions. So I have two choices, either I extend the main statemachine such that all the intermediate states are ...

.NET Workflow Engine Suggestions ( currently considering stateless )

I came across stateless, a hierarchical state machine framework based on Simple State Machine for Boo, but configured using C# 3.0 It is easy to configure and use, I will probably use it soon. But I was just wondering if Anyone used stateless for real projects (If so what is your opinion?) Are there any other good workflow engines fo...

state_machine only works for new records

I can't seem to get the state_machine gem (http://github.com/pluginaweek/state_machine/) to work on existing records (it works correctly on new records). Here's my model: class Comment < ActiveRecord::Base state_machine :state, :initial => :pending do event :publish do transition all => :published end end end and he...

Ruby AlterEgo: Is there a way to find out what was the transition called in on_enter/on_exit/anywhere?

As title, I am talking about the alter-ego gem (http://alter-ego.rubyforge.org). I need to determine if I am going to execute my validation depending on the transition called. The best alternative I have now is add a callback to transition, but that's rather clumsy as I have to do it on every transition. ...

Which exceptions to catch in a FaultHandler activity in Windows Workflow

Im learning Windows Workflow at the minute and am now looking at exception handling in state machines. Basically I can see that a FaultHandler can be used to catch a specific exception thrown in an activity. My question is do I need to specifically catch each type of exception or is there a way I can catch all exceptions with one Fault...

Is Workflow Foundation StateFinalizationActivity blocking a thread?

This is the scenario: I have a State Machine Workflow using ManualWorkflowScheduler. Say there are 2 states: State1 and State2. State1 contains an EventDrivenActivity1 that has a SetStateActivity1 moving the workflow from State1 to State2. State1 also has a StateFinalizationActivity1. So my question is: When an event is raised and Set...

Is there a programming language with built-in state machine construct?

I am just curious if there is a programming language which has state machines (similar to boost::statechart) as primary language construct. Analogies - c# has delegates where java uses the observer pattern and C has callbacks. Perl and python have built-in hashes while C++ and java needs a library. Update: This should be general prog...

Statefinalization/initialization activity only runs on leaf states

I am trying to get my Windows State Machine workflow to communicate with end users. The general pattern I am trying to implement within a StateActivity is: StateInitializationActivity: Send a message to user requesting an answer to a question (e.g. "Do you approve this document?"), together with the context for... ...EventDrivenActivity...

Ownnership of QState. Do I need to delete all QStates?

I added my state to m. This code will delete mystate? QStateMachine *m = new QStateMachine(); QState *mystate = new QState(); m->addState(mystate); delete m; ...

A proposal to add statemachine support to C++-like language

Lately as part of my day job I've been learning IBM Rhapsody and using it to generate code in C++ from the UML. Yesterday it struck me that it might be cool to think about adding state machine support to my C++ compiler, so I jotted a few notes here: http://ellcc.org/wiki/index.php/State%5Fmachines%5Fand%5FActive%5FClasses My motivatio...

How to properly implement a statemachine/Factory with structuremap?

Lets say i have a traditional statemachine/Factory implemented like public class StateMachine { public void ProcessState(StateEnum CurrentState) { switch (CurrentState) { case StateEnum.New: ProcessNewState(); break; case StateEnum.Waiting: P...

Get to the handled event instance in HandleExternalEventActivity

I have state machine, some state owns by HandleExternalEventActivity. It accepts some event with simple string flag. Basing on this string I need dispatch which next state must be activated. Most obvious is use IfElseActivity, but I have no idea how to get to this string from IfElse. Most simplest way to place property on entire state-ma...

Are State Machines created in Windows Workflow 3.5 compatible with version 4.0?

If I have a State Machine created in version 3.5 will I be able to upgrade to .Net/WF 4.0, or will I have to re-create the functionality? I heard / read that 4.0 does not support State Machines. Finally, if you have a State Machine in 3.5, what is your plan for migrating to 4.0? ...

State machine implementation

I have a state machine as described below. We can start in one of two starting states, but we must hit all 4 states of the handshake. From there, we can either transfer a payload of data or receive a payload of data. Then, we return to our original starting state. Handshake: -> StartingState1 -> FinalState1 -> StartingState2 -> FinalS...

Finite State Machine : Bad design?

Are Finite State Machines generally considered as bad design in OOP ? I hear that a lot. And, after I had to work on a really old, undocumented piece of C++ making use of it, I tend to agree. It was a pain to debug. what about readability/maintainability concerns? ...

When do you favor the use of state machines over linear workflows

State machines can reduce complexity of workflows when there are multiple loops and branching or logic when the workflow must "react" to answers supplied by users. This would be an event-driven workflow. In what circumstances have you elected to use a state machine and what type of pain did reduce in terms of time and complexity? ...

Comparison between Stateless (on google code) and Windows Workflow

I'm starting to think that I should ditch Windows WF in favor of something simpler. I don't necessarily need to pause workflow execution for extended periods of time and restore them later. I would like a simple state machine framework that does have basic suspend / resume / abort (without serialization), however. I've downloaded the ...