CU Sync Interface
CU Messages are sent to the q.se.ps.azure.data.messages.cumessage Queue on the Tenant Service Bus.
If a Dynamic Workflow is configured to preprocess the message, they should be sent to the q.se.ps.azure.data.messages.cumessage.pre Queue instead.
The WmsCode is the primary key in the interface. If it does not exist, the CU will be created, otherwise it will be updated.
If you do not want to update a certain property, do not include it in the message. Setting a property to null in the message will null it out in DXI.
The CU Interface supports setting the Asset Key or Subtype Key information for CUs or Macros generated. One or the other is expected for any implementation.
If the Asset Key or Subtype Key information is provided, all fields in these objects are required and must be provided. Asset Groups, Asset Types, and Subtypes
can be either the description or the code, but the descriptions and layer names must match exactly what is in the operational map (including casing, spaces, etc.).
Sample Message
{
"domain": 0,
"diagnostic": false,
"name": "Sample Name",
"workflowSessionId": null,
"description": "Sample Description",
"wmsCode": "SampleCUWMSCode",
"availableWorkFunctions": [
"Install",
"Remove"
],
"attributes": [
{
"key": "SampleKey",
"value": "SampleValue"
},
{
"key": "SampleKey2",
"value": "1234"
}
],
"cuCategories": [
{
"name": "Owner",
"values": [
"Company"
]
},
{
"name": "ConstructionType",
"values": [
"Continuous Run",
"Overhead"
]
}
],
"nonDrawnCuType": "INSULATOR",
"childCus": [
{
"wmsCode": "SampleChildWMSCode1",
"quantity": 1.0
},
{
"wmsCode": "SampleChildWMSCode2",
"quantity": 6.0
}
],
"status": "Active",
"transactionId": "263D7D08-615B-4A32-8DAB-261766F8B90B",
"isMacro": false,
"cuPhaseCount": 0,
"bulkcuid": null,
"date": null,
"user": null,
"assetKey": {
"layername": "Sample Layer Name",
"assetgroup": "Sample Asset Group",
"assettype": "Sample Asset Type"
},
"subtypeKey": {
"layername": "Sample Layer Name",
"subtype": "Sample Subtype"
}
}
Message Parameters
CuMessage
A message representing a CU or Macro CU
A message containing a MultiSpeak CU message converted to JSON
Domain
The DXI Domain of the CU. If not set, the configured default will be used
1 - Electric
2 - Gas
3 - Common
Diagnostic
If set to true, performers an internal diagnostic.
This is only meant to be used by the health monitoring service.
It does not need to be set on the message.
Name
The Name of the CU
WorkflowSessionId
Gets or sets the workflow session identifier.
Description
The description of the CU.
WmsCode
The unique ID of the CU
AvailableWorkFunctions
Gets or sets the available work functions.
Work functions can be used to control what designers can do with a given CU. For materials that are no longer used
the "Add" work function can be taken from the list of available work functions so that this CU can only be used for removes.
Currently supported values for available work functions are:
None - Indicates that there is no work function assigned to this CU
Install - Indicates that this CU is a new installation
Remove - Indicates the removal of something existing.
Abandon - Indicates the abandonment of something existing.
Replace - Replace something existing with something else.
AttributeArray
Attributes can be just about any string supported by WMS. These are often used to map components to the
correct subtype in GIS, map to GIS fields or to pass back to WMS.
CuCategories
A list of CU Category descriptions and the description of the value in that category
NonDrawnCuType
The description of the Non Drawn CU Type, if applicable
ChildCus
If this is a Macro, this will contain the list of child CUs
Status
The status of the CU. Different statuses have different functionality.
The CU will always be created, no matter its status, if it does not exist.
Active - Default status
Update - Updates the Macro CU
Delete - Deletes the CU or Inactivates Macro CUs
Pending - Removes Work Functions so the CU can not be used
Inactive - Removes Work Functions so the CU can not be used.
TransactionId
A unique ID that will appear in all log messages related to this message. If null, a random GUID is generated.
IsMacro
A field to indicate if the Message is a Macro or CU
CuPhaseCount
Specifies the # of phases to be created in default Marco(Not needed if Default Macro is not being created during cu create)
AssetKey
Holds the CU's Layer Name, Asset Group and Asset Type for DXI UN Implementations.
SubtypeKey
Holds the CU's Layer Name and Subtype for DXI GN Implementations.
Fields
An auto generated list of the fields that were sent in the message.
Bulk
A flag indicating if this is a bulk CU message or not
Message
The JSON message
TransactionId
A unique ID for this message for logging purposes
Id
The Id of the message
WorkflowSessionId
The session ID for the message. This is needed for putting the message in a Queue
CuAttribute
Key Value attributes for CUs.
Key
The Name of the attribute. Each Attribute should have a unique name.
Value
The Value of the attribute.
MergeCuAttributes
Merge CU attributes instead of overwriting.
CePopulateAllCuAttributes
If true, copies GIS attributes to all of the CUs associated to a component i.e. in the Macro, instead of just the driving CU.
ChildCu
Represents a child CU on a Macro
WmsCode
The unique ID of the CU
ChildCus
If this is a Macro, this will contain the list of child CUs