AF Attribute Template
AF-Attribute-Template-Create
Inputs
| Inputs | Type | Mandatory | Description |
|---|---|---|---|
| CheckinLimit | int | N | The amount of items updated before checking in. |
| AttributeTemplates | object[] | Y | Array of AttributeTemplates to create |
| TargetPrimaryPath | string | Y | The complete path to the AttributeTemplate |
| CreateSubAttributes | bool | N | |
| SourceAttribute | object | Y | The object that contains the attribute properties |
| AttributeProperties | array | Y | The Attribute Properties |
| Name | string | Y | The name of the attribute |
| Description | string | Y | The description of the attribute |
| Categories | array of string | Y | |
| ConfigString | string | Y | |
| DataReferencePlugIn | string | Y | |
| DefaultUOM | string | Y | the Default UOM of the attribute |
| IsConfigurationItem | string | Y | |
| IsManualDataEntry | string | Y | |
| IsHidden | string | Y | Hidden property |
| IsExcluded | string | Y | Excluded property |
| Value | object | Y | object that stores information relating to the default value |
| IsAnythingValue | bool | Y | |
| T | N | Type of the value | |
| V | N | Value | |
| TypeQualifier | string | Y | The Enumeration Set name |
| IsTypeQualifierGlobal | bool | Y | When the Enumeration Set is from Global rather than Database e.g "System" |
| Categories | string[] | Y | All categories the attribute contains |
| Attributes | Y | Can continuously dig down due to child attributes | |
| AttributeProperties | array | Y | The Attribute Properties |
| Attributes | array | Y | Can continuously dig down due to child attributes |
Outputs
| Outputs | Type | Description | Example |
|---|---|---|---|
| array[1] | array | ||
| 0 | object | object | |
| Properties | object | object | |
| Name | string | "Sensor" | |
| PrimaryPath | string | "\NodeADSTestSystem\NodeTestCaseTarget\ElementTemplates[Pump]" | |
| Template | string | "" | |
| Action | string | "Created" |
Example Payload
msg.payload =
{"AttributeTemplates": [
{
"TargetPrimaryPath": "\\\\"+ env.get("TestSystem")+"\\" + env.get("TestDatabase") +"\\ElementTemplates[Pump]",
"SourceAttribute": {
"AttributeProperties": {
"Name": "Sensor",
"IsATemplate": true,
"Description": "",
"ValueType": "Double",
"ConfigString": "",
"SimpleConfig": "",
"DataReferencePlugIn": "",
"DefaultUOM": "",
"DefaultValue": 0,
"DisplayDigits": -5,
"IsConfigurationItem": "False",
"IsManualDataEntry": "False",
"IsExcluded": "False",
"IsHidden": "False",
"TypeQualifier": "",
"IsTypeQualifierGlobal": false
"Categories": [],
"Value": {
"IsAnythingValue": false,
"T": "Double",
"V": 0
}
},
"Attributes": null
},
"TargetAttribute": null
}
]
};