Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Lost DDL event Receive body settings after modification of WorkPart structure

    Lost DDL event Receive body settings after modification of WorkPart structure

    maj9bj
    Long-established Member

    In our internal  Addon there is a WorkPart structure. I found out there was a syntax mistake in name of one variable. I fixed this error and released new version of the addon.

    Now I have a problem. If I update project with new version of the addon I lose all linking in all Events which are using this structure. I understand I will lose only linking of items with changed name, but in this case linking of all variables in receive body is lost.

    Is it standard behaviour?

    maj9bj_0-1699866142603.pngmaj9bj_1-1699866153951.png

     

    3 REPLIES 3

    nexidator
    Community Moderator
    Community Moderator

    No, this is not the intended behavior. Usually, only the renamed variable should get lost.

    I have checked your project and found the reason why all links get lost in this case. It is a misbehavior of CpStudio that we will need to fix, but it only applies in a special case:

    nexidator_0-1699948932719.png

    Hard to explain without looking at implementation details, but all elements of the struct instance are removed and added again if the element being deleted has a local property (that is not inherited from the struct definition like MappingName). In other words, if you remove the ExcludeFromMes property before loading the new object version, the problem does not occur. The property is unnecessary anyway (also with the other struct elements), because it doesn't have any effect when it is false.

    But of course, also in this case the behavior is not intended, so thanks for reporting!

    nexidator
    Community Moderator
    Community Moderator

    One correction concerning the ExcludeFromMes property:

    It does have an effect that I wasn't aware of: It can be used to control if the elements of a DDL event extension are optional. But for this purpose, it has to be placed on the elements of the struct definition, i.e. in your case it would have to be inside the OSD file, not at the instance. And this is how it works:

    • No ExcludeFromMes property --> The element is compulsory
    • ExcludeFromMes property defined and true --> The element is optional and inactive by default
    • ExcludeFromMes property defined and false --> The element is optional and active by default

    Looking at your project, the DDL event must have been configured while the struct definition had an ExcludeFromMes property at every element, because the extension items are optional. The way the OSD file looks now, when you click the "Update" link, the checkboxes will disappear and all elements will become compulsory.

    nexidator
    Community Moderator
    Community Moderator

    By the way: The bug will be fixed in CpStudio V5.8.2

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist