What happens If we add one column into cdt how that will be affected to running processes ?

Hi Friends,

How to handle inflight processes when we update CDT and release the same to prod ?

Regards

Ravi Babu.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    When CDT's are updated all the inflight processes are not affected by the change as they run on the older version of the CDT. E.g. sya when you add one column to the CDT, the inflight proccess's CDT will still run on the version which didnt have that column.

    But the rules- interface/expressions they take in the CDT change as soon as the CDT is modified. So when inflights call any expression/interface rule latest CDT version is called by an older process's CDT version.

    TO handle this,

    1. Always Keyword syntax should be used when rules are called from a process or an interface. In general, whenever a rule should be called use keyword syntax to pass the parameters. 

    2. Always have null checks within the rule to handle null data.

    There are few practices related to process models too - deigning scalable process models by breaking them into sub-processes and have as few nodes as possible in a process so that as soon s subprocess is triggered the latest CDT changes can take effect and there remains minimum number of processes with older version of CDT.

    On the other hand, to handle the negative effect due to changes on inflights if the above measures were not taken initially, we have smart services or plugins that can be explored to correct those said instances, so that all the inflight processes can keep running without any errors.

    Hope this helps.

  • To add, neither the Process Upgrade service or IFM Manager plugin (only methods to update running process instances), will update CDT types.

    I typically record a "version" integer field with all of my primary CDTs.  This is stored to the CDT at the beginning of the process model.  When a new field is added, update the version setting in the process model.  In this example, we added "field2" and updated the version to 2.  Any interface in the process that references the new field will only show it if the version is > 1 (new processes) as:

    a!localVariables(
      local!version: property(ri!CDT,"version",1),
      {
        a!textField(
          label: "Field 1",
          value: ri!CDT.field1,
          saveInto: ri!CDT.field1
        ),
        a!textField(
          label: "Field 2",
          showWhen: local!version>1, /* new field at v2! */
          value: ri!CDT.field2,
          saveInto: ri!CDT.field2
        )
      }
    )

Reply
  • To add, neither the Process Upgrade service or IFM Manager plugin (only methods to update running process instances), will update CDT types.

    I typically record a "version" integer field with all of my primary CDTs.  This is stored to the CDT at the beginning of the process model.  When a new field is added, update the version setting in the process model.  In this example, we added "field2" and updated the version to 2.  Any interface in the process that references the new field will only show it if the version is > 1 (new processes) as:

    a!localVariables(
      local!version: property(ri!CDT,"version",1),
      {
        a!textField(
          label: "Field 1",
          value: ri!CDT.field1,
          saveInto: ri!CDT.field1
        ),
        a!textField(
          label: "Field 2",
          showWhen: local!version>1, /* new field at v2! */
          value: ri!CDT.field2,
          saveInto: ri!CDT.field2
        )
      }
    )

Children
No Data