01-16-2020 03:24 PM
I'm hoping to make an update to my companies process model to use the Offline Results Processing Utility but only when the network is down or the database is otherwise unavailable.The problem is the Offline Results Processing Utility seems to run every time causing two data-sets to be pushed if the database is up. Is there a way I can use the process model to control rather or not the Offline Results Processing Utility is used?
01-23-2020 09:44 AM
Why not just always use offline results and disable the standard database plugin?
If you really want to disable/enable it dynamically you could use the ModelPluginOptions callback to enable or disable the plugin and prevent the raw results from being stored. Something like this:
Parameters.ModelPlugin.Base.Enabled = False
precondition:
Parameters.ModelPlugin.Base.SequenceFileName == "NI_OfflineResultsGenerator.seq"
You'd need to add additional logic to only run this step if there's network connectivity. There's a hole in this if you lose network connectivity after this callback runs but before your reporting is complete - then you'd get an error connecting to your database and you wouldn't have a local copy of the raw results saved.
Hope this helps!
Trent
01-31-2020 02:11 PM
I appreciate the suggestion and I did try this, but the
Parameters.ModelPlugin.Base.Enabled = False
isn't quite doing what I need it to do. The issue is not only that this call back fails if we loose network connectivity during the test, it's that the system must have the logic to determine if it's using offline results processing when it runs the Callback. Always using offline results will be an option once a fixture is migrated to the new server, but in the interim the process model needs to continue using live results, the process model needs be able to use both methods.
I've already added logic to the process model to determine if the server is offline and flip the system into offline mode, but I need a way for the callback sequence to determine if it's being called by the offline processing utility, or by a live test.