Script Action Type
The Script action type is used to run a specified VB script that will process well test data and produce the values needed for the well test record. See Processing and Storing Well Test Results for more information about how the Well test results are written out to the VHS.
To learn about how these elements relate to other elements in a well test configuration XML structure, see Well Test Hierarchy.
Example
|
<TrueAction> <Action type="Script" script="c:\temp\ProcessCalculations.vbs" source="Local" processTestResults="False" udc="WELLTEST" relativeFacilityLink=""> <Parameters> <Parameter> <Part type="Text" value="value=" /> <Part type="PointValue" udc="POMSV" relativeFacilityLink="Separator" attribute="Value" /> </Parameter> <Parameter> <Part type="Text" value="Timestamp=" /> <Part type="PointAttribute" udc="POMSV" relativeFacilityLink="Separator" attribute="Timestamp" /> </Parameter> <Parameter> <Part type="Text" value="PointTag=" /> <Part type="PointAttribute" udc="POMSV" relativeFacilityLink="Separator" attribute="PointIdLong" /> </Parameter> <Parameter> <Part type="Text" value="FacilityDescription=" /> <Part type="FacilityAttribute" relativeFacilityLink="Separator" attribute="FacilityDescription" /> </Parameter> </Parameters> </Action> </TrueAction> |
Script Action Type Attributes
The Script action type has the following associated configuration attributes:
| Attribute | Required | Description |
|---|---|---|
|
processTestResults |
No |
Indicates whether to execute the script without processing return data into a well test record. When the Process output option is selected, the Well Test module will attempt to process the output as a well test result. |
|
relativeFacilityLink |
No |
Used with the UDC for the override point to use when posting the well test record. |
|
script |
Yes |
Specifies a path to a file to perform additional scripted actions, including processing the well test data and producing the values needed for the well test record. For example:
|
|
source |
Yes |
Specifies the path to the script file. Options include Local, BSS, or Point. |
|
type |
Yes |
Specifies the action type for the action. E.g., type="Script" |
|
udc |
No |
Specifies the UDC for the point to use when posting the well test record. This is an optional override value. The "Result" UDC defined in the UdcDef element will be used by default. E.g., WELLTEST. Click the browse button to open the Select UDC dialog box and select an appropriate UDC. |
Parameters, Parameter, Part
The Script action type can contain optional <Parameters> elements. These are used to pass in any parameters to the VBScript . A <Parameters> element has defined <Parameter> elements, each containing one or more <Part> elements. Parts are used to build strings that are used to further configure the action.
Parameters, Parameter, and Part elements can also be used with the UisCommand action type.
Part Type Attributes
|
<Parameters> <Parameter> <Part type="Text" value="OIL=" /> <Part type="PointValue" udc="ROIL" relativeFacilityLink="Separator" attribute="" /> </Parameter> <Parameter> <Part type="Text" value="WATER=" /> <Part type="PointValue" udc="RH2O" relativeFacilityLink="Separator" attribute="" /> </Parameter> <Parameter> <Part type="Text" value="GAS=" /> <Part type="PointValue" udc="RGAS" relativeFacilityLink="Separator" attribute="" /> </Parameter> <Parameter> <Part type="Text" value="DURATION=" /> <Part type="PointValue" udc="TMWTACT" relativeFacilityLink="" attribute="" /> </Parameter> <Parameter> <Part type="Text" value="FACILITYTAG=" /> <Part type="FacilityAttribute" relativeFacilityLink="" attribute="FacilityTag" /> </Parameter> <Parameter> <Part type="Text" value="TIMESTAMP=" /> <Part type="PointAttribute" udc="TMWTACT" relativeFacilityLink="" attribute="Timestamp" /> </Parameter> </Parameters> |
There are four types of <Part> elements, with the following associated configuration attributes:
Text Part Type
| Attribute | Required | Description |
|---|---|---|
|
type |
Yes |
Specifies the type of value for the part type. There are four part types: Text, Point Value, Point Attribute, and Facility Attribute. |
|
value |
Yes |
Specifies the value to be used for the text part type. |
PointValue Part Type
| Attribute | Required | Description |
|---|---|---|
|
type |
Yes |
Specifies the type of value for the part type. There are four part types: Text, Point Value, Point Attribute, and Facility Attribute. |
|
attribute |
Yes |
Specifies a value, a point attribute, or a facility attribute. The available values to use for this field can be found in the CygNet.API Help file under the CygNet.Data.Core > CygNetCoreProperties.CygNetProperty Enumeration section. |
|
relativeFacilityLink |
No |
Specifies the base facility tag to use to determine the resolved relative facility tag to use for this point, point attribute, or facility attribute. |
|
udc |
Yes |
Specifies the UDC to use to obtain the value for this point, point attribute, or facility attribute. Click the browse button to open the Select UDC dialog box and select an appropriate UDC. |
PointAttribute Part Type
| Attribute | Required | Description |
|---|---|---|
|
type |
Yes |
Specifies the type of value for the part type. There are four part types: Text, Point Value, Point Attribute, and Facility Attribute. |
|
attribute |
Yes |
Specifies a value, a point attribute, or a facility attribute. The available values to use for this field can be found in the CygNet.API Help file under the CygNet.Data.Core > CygNetCoreProperties.CygNetProperty Enumeration section. |
|
relativeFacilityLink |
No |
Specifies the base facility tag to use to determine the resolved relative facility tag to use for this point, point attribute, or facility attribute. |
|
udc |
Yes |
Specifies the UDC to use to obtain the value for this point, point attribute, or facility attribute. Click the browse button to open the Select UDC dialog box and select an appropriate UDC. |
FacilityAttribute Part Type
| Attribute | Required | Description |
|---|---|---|
|
type |
Yes |
Specifies the type of value for the part type. There are four part types: Text, Point Value, Point Attribute, and Facility Attribute. |
|
attribute |
Yes |
Specifies a value, a point attribute, or a facility attribute. The available values to use for this field can be found in the CygNet.API Help file under the CygNet.Data.Core > CygNetCoreProperties.CygNetProperty Enumeration section. |
|
relativeFacilityLink |
No |
Specifies the base facility tag to use to determine the resolved relative facility tag to use for this point, point attribute, or facility attribute. |
|
udc |
Yes |
Specifies the UDC to use to obtain the value for this point, point attribute, or facility attribute. Click the browse button to open the Select UDC dialog box and select an appropriate UDC. |


