NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Offline Results processing only when the server is unavalible

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?

0 Kudos
Message 1 of 3
(2,049 Views)

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

https://www.linkedin.com/in/trentweaver
Message 2 of 3
(1,851 Views)

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.

0 Kudos
Message 3 of 3
(1,827 Views)