Comments (2)
Well, it's an interesting challenge. Technically, the event is handled in that state, but the event itself doesn't meet the filter requirements. I'll have to backlog this one until I have time to think about how I would signal that back out since it was technically handled, but ignored due to the event content.
from automatonymous.
There are multiple ways how that could be implemented. My actual use-case atm is as follows:
During( MenuWaitingForInput, When(UserInput, ctx => ctx.Instance.NumFailedAttemps > 1) .TransitionTo(Error), When(UserInput, ctx => ctx.Instance.UserInput == "1") .TransitionTo(Menu1), When(UserInput, ctx => ctx.Instance.UserInput == "2") .Then( (ctx) => { if (!ctx.Instance.UserState.IsSpecialUser) { ctx.Instance.NumFailedAttemps += 1; this.TransitionToState(ctx.Instance, MenuReprompt); } else { this.TransitionToState(ctx.Instance, Menu2); } } ), When(UserInput, ctx => ctx.Instance.UserInput == "#") .Finalize(), When(UserInput, ctx => new string[]{ "3", "4", "5", "6", "7", "8", "9" >}.Contains(ctx.Instance.UserInput)) .Then(ctx => ctx.Instance.NumFailedAttemps += 1) .TransitionTo(MenuReprompt) )
I have different menus and submenus with different choices available based on Instance state.
The general idea of this issue is lacking of "default" functionality of a naive switch-case fsm
from automatonymous.
Related Issues (20)
- Support for Else conditions HOT 3
- TypeLoadException when trying to create new MyStateMachine : MassTransitStateMachine<MySaga> HOT 4
- Is there any option to have Fault<> consumer in MassTransitStateMachine? HOT 4
- Missing release 4.1.6 HOT 1
- Does Automatonymous support entity framework core integration? HOT 2
- CompositeEventActivity<TInstance> and GraphStateMachineVisitor<TInstance>
- Support DI for Activities HOT 2
- .NET Core support for Automatonymous.Visualizer HOT 2
- Saga starts with non-initial event HOT 4
- How well is Automatonymous optimized? HOT 3
- How to re-use services from multiple sagas? HOT 3
- Expose Observers to derived class of AutomatonymousStateMachine HOT 3
- Finalize extension for Faulted path do not setup compensate activity
- Enhancement: Let Interfaces start with a cappital I HOT 1
- Activity Exception runs infinite loop in RabbitMQ HOT 1
- Catch in IfElse leads to Automatonymous.EventExecutionException HOT 3
- Synchronous version of the RaiseEvent method HOT 1
- Wrong licenseUrl in nuget
- State machine graph HOT 2
- Documentation link is down HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from automatonymous.