Skip to content

Process event in new state #78

Description

@RockWood66

How do I handle an event in one state, transition to another state and handle the same instance of the event in the new state?

        builder.In(States.NoReadHeader)
            .On(TAEvents.TriggerCamera)
                .If(HeaderNRComplete).Goto(States.GoodHeader)
                .Otherwise().Execute(SendHeaderNR_SM);

        builder.In(States.GoodHeader)
            .On(TAEvents.TriggerCamera)
                .If(HeaderComplete).Goto(States.Labels)
                .Otherwise().Execute(SendHeaderSM);

If I fire trigger camera on state NoReadHeader and the guard transitions to GoodHeader I need to run the guard/otherwise when the GoodHeader transtions, so in the above if HeaderNRComplete is true and HeaderComplete is false it executes SendHeaderSM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions