Updating CDT within an existing application

hi all,

what it the best pratice of updating a CDT withing an exsiting application?

i'm doing an enhanement recently. some new fields are added into one CDT and related sail forms or dashboards are also changed.
it works well in new processes. however, when we open old process instances' forms or dashboards, it throws error, saying, eg, CDT_name^10 doesn't have this property.

Any help is appreciated.

OriginalPostID-181232

OriginalPostID-181232

  Discussion posts and replies are publicly visible

  • @eaglez To the best of my knowledge, one of the decent ways to handle it is to use fn!index() or fn!property() for accessing new fields so that the cdt (of older version) present in old process instances doesn't lead to breakage of forms or dashboards because of accessing new fields in it.
  • Hi Eaglez,
    In order to update the CDT at all places you need to follow the below mentioned steps:
    1) Make sure all the process models and forms are closed(is not being used by any user's) otherwise it will not get updated successfully.
    2) Go to System tab-> Data Management->Data Types
    3) search for the CDT you have updated and check the box next to it.
    4)On the top a "Dependents" link gets visible.
    5)Click on the link, it will open a window for impact analysis.
    6) It will highlight the places where this CDT is being used and is not updated. If it is not updated in some places you will see an "Update" button at the bottom of the screen click on it and it will update all the places with the latest changes that has been made to the cdt.
  • You have to perform a check for outdated dependents (otherwise called Impact Analysis), depending on which version of Appian you are using.

    Go to,
    Records > Appian Software > [Your Version] > Product Documentation

    For 7.9,
    forum.appian.com/.../Custom_Data_Types.html
    forum.appian.com/.../Trace_Relationships_for_Impact_Analysis.html


    Keep in mind that you have to understand the impact of doing this. Few considerations are,
    1. ri! variables used in SAIL rules called from new instance (or sub process instance created by parent process after you deploy this change) of process model will use the NEW cdt definition whereas rules called from existing running instance will still follow the old definition.
    2. Touch points should be updated carefully. Try to create a duplicate of your rule and make new instances refer to that.
    For example if you have added a new column say column5 in ur cdt say myCdt1,
    a. Form1 inside process1 is calling rule1
    b. When you update your cdt, ac! of form1 will refer to type myCdt1^1 which doesnt have the additional column cloumn5
    c. Now if u directly add a component in your rule1 and map to ri!myCdt1.column5, old instances will break
    d. To avoid this, create a new copy of rule say rule2 and update your Form1 to call rule2
    e. Now old instances of process model (referring old cdt version) will still refer to rule1 and new instances will start referring rule2.
    3. Your cdt should not be passed by reference anywhere in the process model.

    It also depends on the update you are making to the cdt and how you are using the fields in SAIL form.
    For the same example above, you can avoid creating new copy of rule, by checking if a field exists in cdt before mapping it to a SAIl component.
  • thank you all, fortunately i haven't make a lot changes so far. really painful to create new rules
  • Creating new rules (preferably using the /suite/design mode, inside an application, selecting New->Interface->Duplicate Existing Interface. Map the new process models to the new SAIL interfaces. Only the new process instances will contain the new logic in the new SAIL rules.

    The other option is to build logic inside the existing SAIL rules to handle both old and new processes (using the index function to check for new CDT fields). This approach is much more complex and risky to implement.
  • You may find the expression if(property(ri!cdt, "newField", "oldVersion")="oldVersion", {}, ri!cdt.newField) useful.