From what I can tell anytime a valve is set to on you just need to turn it off.
Here is some JSON you can import for the Scripting Data Source that has a simple example of this. There is a data point called valve-1. Add this point to a watch list and set it to open. You'll see it open and then turn off again. If you replace the valve-1 data point with the actual datapoint the same thing will happen any time it turns on. The script runs every 5 seconds which could probably reduce if you need to.
{
"dataSources":[
{
"xid":"DS_168518",
"name":"Pulse Test Script",
"enabled":true,
"type":"SCRIPTING",
"alarmLevels":{
"SCRIPT_ERROR":"URGENT",
"DATA_TYPE_ERROR":"URGENT",
"LOG_ERROR":"URGENT"
},
"purgeType":"YEARS",
"context":[
],
"logLevel":"NONE",
"cronPattern":"0\/5 * * * * ?",
"executionDelaySeconds":0,
"historicalSetting":false,
"script":"if (valve1.value == true)\n{\nvalve1.set(false)\n}",
"purgeOverride":true,
"purgePeriod":1
}
],
"dataPoints":[
{
"xid":"DP_185394",
"name":"valve-1",
"enabled":true,
"loggingType":"ON_CHANGE",
"intervalLoggingPeriodType":"MINUTES",
"intervalLoggingType":"INSTANT",
"purgeType":"YEARS",
"pointLocator":{
"dataType":"BINARY",
"settable":true,
"varName":"valve1"
},
"eventDetectors":[
],
"plotType":"STEP",
"unit":"",
"chartColour":"",
"chartRenderer":{
"type":"TABLE",
"limit":10
},
"dataSourceXid":"DS_168518",
"defaultCacheSize":1,
"deviceName":"Pulse Test Script",
"discardExtremeValues":false,
"discardHighLimit":0.0,
"discardLowLimit":0.0,
"intervalLoggingPeriod":15,
"intervalLoggingSampleWindowSize":0,
"overrideIntervalLoggingSamples":false,
"purgeOverride":true,
"purgePeriod":1,
"textRenderer":{
"type":"BINARY",
"oneColour":null,
"oneLabel":"Open",
"zeroColour":null,
"zeroLabel":"Closed"
},
"tolerance":0.0
}
]
}