state-machine

Spring State Machine timeout always execute when using connection factory

半世苍凉 提交于 2019-12-08 09:23:53
问题 This time I have a question about timeouts on the state machine. My scenario is like this, referring to the below image On entering StateBasic, I perform some action and the machine given by the Factory waits at WaitForTemplateResult till one of the events either VAS_QRY_RES or MAIN_QRY_RES. Now theres also a timeout which fires after 30seconds. So what happens now is the timeout is however fired even if VAS_QRY_RES or MAIN_QRY_RES comes. I studied this problem and the explanation I was able

NPDA with exactly 2 states that might need 3 transitions to final state

孤街醉人 提交于 2019-12-08 09:10:00
问题 Let's say we want to draw the transition graph with two states of a NPDA that accepts that language L. And let's also say that this NPDA will have exactly 2 states. My thinking on this would be to do everything in the first state then use the second state as the grand finale. Like so: But I'm not sure that the lambda transitions will result in q1 or if there is a better way to do this, which there likely is a better way since I'm trying to teach this to myself. Perhaps someone can get me back

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

亡梦爱人 提交于 2019-12-08 05:40:41
问题 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_machines_and_Active_Classes My motivations for doing this are: It seems like a cool idea. The compiler could do much better semantic checking (with better error checking) than the current Rhapsody/normal C++

Rails: Model.human_attribute_name :field should raise an error when translation not found? (Maybe caused by state_machine?)

不羁的心 提交于 2019-12-08 01:54:45
问题 We often stumble over untranslated model attributes in our application. They most often come because an attribute was renamed or something like this. It would be really helpful to have I18n raise an error when Model.human_attribute_name :field doesn't find a translation. Is there a way to achieve this? Update : It seems there's some other problem. here are my I18n settings: I18n.enforce_available_locales = false config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb

In Boost.Statechart, what's the difference between state and simple_state?

随声附和 提交于 2019-12-07 23:23:57
问题 In implementing a state machine using Boost.Statechart, I came across a problem arising from attempting to access the outer context of a simple_state from its constructor. A comment in simple_state.hpp tells me: // This assert fails when an attempt is made to access an outer // context from a constructor of a state that is *not* a subtype of // state<>. To correct this, derive from state<> instead of // simple_state<>. Apart from apparently being able to access the outer context from its

How State machine diagram can be represented as a Behavior for an operation in UML?

丶灬走出姿态 提交于 2019-12-07 17:26:41
问题 Behaviors (Method Body)can be state machines or activities - activities are easy to understand, as they are the equivalent of procedural code. I don't understand how a state machine can be used as the behavior for an operation? Could you Please provide a simple example for that? ---Note--- Operation is a specification-only element - imagine it as the method signature in OO programming languages. It has a name and a list of parameters. Behavior is (among other things) what an operation (or

Data-driven state machine application

柔情痞子 提交于 2019-12-07 16:36:21
问题 We are currently working on a "data-driven" state machine application. Right now, the state flows are all configured in the database, but none of the decision/business logic is configurable in the DB with our current design. Because of this, the code has to basically "know" the state flow as well, so there's really no point in configuring the flow in the database. I have a design in mind that would allow us to wire together a state pattern using dependency-injection (Spring.NET), but I'm not

UML state machine: How to exit orthogonal child regions?

会有一股神秘感。 提交于 2019-12-07 12:29:40
问题 Base on Wikipedia, I can have a hierarchical state decomposition, where I have multiple orthogonal regions, which can change state independently. The diagram shows how the orthogonal regions are entered. I assume that the entry happens in parallel in all regions. What I want to know is, how do you express the exit? If each region has an exit, does the global parent state exits when the first child region exit, or when they have all exited? I want to express that the exit happens when they

Can somebody give an active record example for pluginaweek - statemachine?

自作多情 提交于 2019-12-07 11:14:51
问题 Can somebody give a simple example on howto use pluginaweek state_machine for a ticket model with active record? I do not understand the complex examples from the docs. Example states: new -> accepted, declined, feedback accepted -> solved or feedback feedback -> accepted or solved 回答1: Example ticket model (not tested) class Ticket < ActiveRecord::Base attr_accessible :name, :description attr_accessible :state_event validates :name, :presence => true state_machine :initial => :new do event

How to reset state machines when unit testing C

瘦欲@ 提交于 2019-12-07 10:10:53
问题 I have a se of embedded C for a TI processor that need to be unit tested. For target compilation IAR is used but i am running the tests on a Win7 machine using MinGW GCC. In the C code there are functions containing state machines that sometimes need to be reset between tests. These state machines often keep their state variable locally static, making that task difficult if not impossible. I'm not very C++ class savvy but i had an idea about "importing" the C functions into a wrapping C++