Search code examples
foundry-scenarios

When applying a scenario, do we have to delete the scenario as well, to prevent applying the changes twice?


Running through the full loop for a scenarios-based workflow and noticed that the scenario once applied is NOT auto-deleted. What is considered best practice to prevent users from accidentally applying a scenario twice? Is it best to delete them afterwards? If so, why is auto-delete not enabled?


Solution

  • you could delete but usually I would add a flag called "applied" and filter my list of displayed scenarios by "applied" == false or something like that.

    If you ever want to use your scenarios for metrics. E.g. how many scenarios have been applied / maybe write some stats to the scenario object on apply this data is all lost if you're deleting on apply. I believe that's also why it's not part of the workflow by default. The idea is that you should make that decision for your use case.