So.. for instance:
States -> Open, Closed, Approved, Returned.
I can go to any state basically.. but once I go to Approved, I can only go to Returned.
TriggerWithParameters
class but it feels kinda weird to use and maybe that's not what they are intended for. (Imagine for example asking the user to input some text, a state that could be triggered from various other states)
Hello everyone, I'm a newbie here so really appreciate any help.
I have a use case, in which I would like to abstract the Configure out of the place where the StateMachine is created. Here is it:
I want to have a PaymentStateMachine
, the status and event can be simple like this:
Status: Initial, CollectingInfo, Authorized, Capture
Event: New, SetPaymentInfo, ExecuteAuthorize, ExecuteCapture
Let’s say I have to implement the plugins for two payment provider:
At this point, I would like each payment plugin to be able to control how the payment flow should be by configuring their own transitions without touching the StateMachine instance. Which can be something like:
```
StateMachineFactory
.AddConfiguration(State, Trigger, TargetState, OnEntryAction)
.AddConfiguration(State, Trigger, TargetState, OnEntryAction)
...
.Build()
Sorry for a long question
Hello everyone!
Could anyone to help me with this:
1) I have parametrized trigger with 2 parameters
2) Can I pass these parameters when I call CanFire method?
As far as I can see CanFire can accept only original trigger but not StateMachine<TState, TTrigger>.TriggerWithParameters<TArg0, TArg1>
GetPermittedTriggers accepts input parameters.
Thank you for your time.