I Have a Requirement like, I have a Process Variable called 'DETAILS' which is of 'RECORD TYPE'.post submitting a particular form the data will be writes to Records. Then I have to use a Script task in order to change the PV 'DETAILS' Type from Record to CDT and use the PV as a CDT type value for upcoming nodes
Discussion posts and replies are publicly visible
in the project I'm working, in the past they're using CDT'S as a traditional way,Now as an expansion to that I have to replace all those CDTs to RECORD types, such that the application's user screen performance will becomes better. so here in this example I changed the DETAILS type to Record. so that I have to make the changes in all nodes wherever the pv!DETAILS present.but I don't want to make changes everywhere and make it complex.instead, I just want the record type data to be inserted in to Record post submitting the form and then change the particular variable type to CDT, such that all other existing flows will not be disturbed..
You don't have change all the nodes. Just add one script task where you cast the record type to CDT and save in the same Process Variable (Type CDT) that is being used everywhere. Can follow the same in different processes where you are having this issue.But eventually you would end up Writing your Entity Expression as Query records and your all other CDT based expressions to Record Type. I would recommend not to delay the changes at all levels as you are trying to transition from CDT's to Record Types. This would avoid any failure of referenced Items in the Application.
YELSOJU UPENDRA CHARY said:but I don't want to make changes everywhere and make it complex.
For now it's gonna look complex and lot of work , But using records and entities together to achieve output , isn't it too much of work?? I call this as complex.
Still you want to go in that direction like everyone said cast() would help & you can query back using "Queryentity()" in a script task (No one said it so i'm adding it), simpler configuration but impacts a little to overall performance.