Skip to main content
April 15, 2021
Question

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

  • April 15, 2021
  • 2 replies
  • 0 views

Hi Friends,

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

Regards

Ravi Babu.

2 replies

harshas2775
Brainy
April 15, 2021

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.

csteward
April 15, 2021

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
    )
  }
)