| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 05/11/2009 15:13:08
|
craig
Initiate
Joined: 06/08/2007 16:50:46
Messages: 144
Offline
|
I've encountered a few errors trying to duplicate mango instances for testing and backup purposes.
1.If a point fails to import, because of an invalid data source XID or bad point event detector, the entire point hierarchy also fails to import if one referenced datapoint is missing. Would it be possible to change this behaviour so the missing point is left out of the point hierarchy but the rest of the point hierarchy is imported?
2.It appears that Multistate points with High Limit Point Event Detectors are exported with a "state" property on the point event detector instead of a "limit", generating this error:
The point import fails in JsonReader.populateObject.
3. I've modified some VOs, such as reports and HttpImagePointLocatorVO. The new properties get exported, but import fails at JsonReader.populateObject.
In this case overlayPoints is a list of integers represeting datapointId. Should I be using a list of datapoint XID instead or are the datapointId meant to be converted to XID in the export process?
4. The SNMP data source fails to import if it is SNMP version 1 but this is an easy fix:
It looks like in SnmpDataSourceVo.validate()
should be
since in jsp/datasourceEdit/editSnmp.jsp
outputs
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 27/11/2009 12:34:06
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
Hi Craig,
1. This would be a complicated change since the import doesn't have a "warning" mechanism, and i wouldn't be comfortable letting such a case pass without a notification to the user.
2. Multistate points can't have High/Low limit detectors. Check out PointEventDetectorVO in the method getImplementations for the detectors that support multistate points.
3. I can't comment too much on code i can't see, but yes, you should be exporting points using the XID. This is because you cannot be guaranteed on import that you will be able to get the same id on insert, or that existing points will have the same id.
4. Good catch. The code has been changed as follows:
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 27/11/2009 16:45:04
|
craig
Initiate
Joined: 06/08/2007 16:50:46
Messages: 144
Offline
|
mlohbihler wrote:
2. Multistate points can't have High/Low limit detectors. Check out PointEventDetectorVO in the method getImplementations for the detectors that support multistate points.
The point in question is a multistate point on a virtual data source. Here is the point as represented by the export data:
And the error I was getting on the multistate point was "point event detector must have a 'limit'", but in the export data above it has a state and is of type HIGH_LIMIT.
So maybe the problem is in PointEventDetectorVO.java:
maybe
TYPE_CODES.addElement(TYPE_MULTISTATE_STATE, "HIGH_LIMIT");
should be
TYPE_CODES.addElement(TYPE_MULTISTATE_STATE, "MULTISTATE_STATE");
or anything other than "HIGH_LIMIT" so it has a different value than TYPE_ANALOG_HIGH_LIMIT?
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 27/11/2009 16:53:02
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
Yes, you're correct. I've changed the code accordingly. Thanks for pointing this out.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 02/12/2009 20:46:56
|
craig
Initiate
Joined: 06/08/2007 16:50:46
Messages: 144
Offline
|
As per #3. above I was missing code to translate the list of integer data point id to a list of String xid in the point locator jsonSerialize method. I borrowed from metapointlocatorVo and now 1. is no longer an issue since we've taken care of 2,3, and 4.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 02/12/2009 22:58:19
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
Sweet. Thanks for the update.
|
Best regards,
Matthew Lohbihler |
|
|
 |
|
|
|
|