question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to add a method to get all eligible triggers from a current state?

See original GitHub issue

I’m thinking of keeping a simple dictionary keyed by state name with a defaultdict(list) of transition names that can be executed from this state. I am wondering if this is a responsibility of the core api or should this be an extension?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
aleneumcommented, Sep 23, 2016

Hi @guilhermecgs and @limdauto,

I just pushed get_triggers to the master. If you face some issues, fell free to reopen this issue.

1reaction
guilhermecgscommented, Sep 23, 2016

Hi Folks,

I have almost the same need … This issue is a must have… Any clues of when this feature will be available?

Please don’t forget that a state machine can have nested states…

ex:

image

So, if you are in “caffeinated_dithering” state, the get_triggers_for() would return:

  • Drink
  • Walk
  • Relax

Read more comments on GitHub >

github_iconTop Results From Across the Web

List Triggers and their Next States from current State #34
I want to generate list of Triggers and their Next States from current state. Just like you exposed StateMachine.
Read more >
Triggers - .NET MAUI | Microsoft Learn
Triggers allow you to express actions declaratively in XAML that change the appearance of controls based on events or property changes.
Read more >
13 Using Database Triggers
The possible options include DELETE, INSERT, and UPDATE. One, two, or all three of these options can be included in the triggering statement...
Read more >
Documentation: 15: 43.10. Trigger Functions - PostgreSQL
A trigger function is created with the CREATE FUNCTION command, declaring it as a function with no arguments and a return type of...
Read more >
Triggers - AWS Glue - AWS Documentation
This section describes the AWS Glue API related to Job triggers. ... The current state of the trigger. ... The name of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found