We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4 export - import works fine:
import {createMachine} from 'xstate' export const machine = createMachine({ "id": "Test Machine", "context": {}, "initial": "Incomming message", "states": { "Incomming message": { "always": [ { "target": "Admin-Group", "cond": "Mode: First" }, { "target": "Client-bot", "cond": "Mode: Second" } ] }, "Admin-Group": { "initial": "Idle", "states": { "Idle": {} } }, "Client-bot": { "initial": "Main Menu", "states": { "Main Menu": {} } } }, "predictableActionArguments": true, "preserveActionOrder": true }, { actions: {}, services: {}, guards: {"Mode: First": (context, event) => false, "Mode: Second": (context, event) => false}, delays: {}, })
v5 export - import breaks guard condition:
import {createMachine} from 'xstate' export const machine = createMachine({ "id": "Test Machine", "context": {}, "initial": "Incomming message", "states": { "Incomming message": { "always": [ { "target": "Admin-Group", "guard": "Mode: First" }, { "target": "Client-bot", "guard": "Mode: Second" } ] }, "Admin-Group": { "initial": "Idle", "states": { "Idle": {} } }, "Client-bot": { "initial": "Main Menu", "states": { "Main Menu": {} } } } }, { actions: {}, actors: {}, guards: {"Mode: First": ({ context, event }) => false, "Mode: Second": ({ context, event }) => false}, delays: {}, })
I expect to have kind of interop with my implementation to have a way both to make changes in code and on the chart.
Re-imporing treats Else statement as never reachable. First "always" action lost its Guard.
https://stately.ai/viz/209cd168-afb1-4168-b967-85c078ee7229
No response
The text was updated successfully, but these errors were encountered:
Where are you exporting and importing v4 and v5?
Sorry, something went wrong.
I see the same, if I try to import code in v5, it losses my guard definitions. I haven't figured out what the repro is, since I can take a functioning studio project, export in v5 and then re-import in v5, but I have a specific project that loses the guards. The machine is here: https://github.com/dreamcatcher-tech/ether-dream/blob/d8e45d66764a6e7a6d439ca56227ff54ce109303/test/multi/multiMachine.js
Sorry I can't be more use - that is a big machine, and it was exported using v5, now I can't re-import it.
I see the same, if I try to import code in v5, it losses my guard definitions. I haven't figured out what the repro is, since I can take a functioning studio project, export in v5 and then re-import in v5, but I have a specific project that loses the guards. The machine is here: https://github.com/dreamcatcher-tech/ether-dream/blob/d8e45d66764a6e7a6d439ca56227ff54ce109303/test/multi/multiMachine.js Sorry I can't be more use - that is a big machine, and it was exported using v5, now I can't re-import it.
A fix for this is in progress (cc. @farskid)
No branches or pull requests
Description
v4 export - import works fine:
v5 export - import breaks guard condition:
Expected result
I expect to have kind of interop with my implementation to have a way both to make changes in code and on the chart.
Actual result
Re-imporing treats Else statement as never reachable. First "always" action lost its Guard.
Reproduction
https://stately.ai/viz/209cd168-afb1-4168-b967-85c078ee7229
Additional context
No response
The text was updated successfully, but these errors were encountered: