Hi! I read it isn´t possible to create an any type variable in a process. This is my use case, I hope you can help me:
I need to pass a process an array of cdt, but it could be different types of cdt, and the process, depending of the cdt type writes on a different table.
Any idea is welcomed, thanks!
Discussion posts and replies are publicly visible
You could use a Map() type to hold an array of different arrays of CDTs).
I think I resolved it, with typeof() i get the type of the CDT in a number, then i pass to the process a text variable with the value ToJson(pv!mycdts) and typeof number. In the process with a script task I do cast( typeofnumber , fromJson(pv!mycdts))
This was my first guess but I need the type of my cdt to determine the table to write
You can use "type!" more, eg.
I am casting local!lookUp_cdt into SOM_Lookup'() type. You can copy and pate into your rule and change the CDT name accordingly. Hpoe it will help.
local!lookUp_cdt : 'type!{urn:com:appian:types:SOM}SOM_Lookup'()
You can create a process variable of type datasubset, save the values to this process variable and cast it to of required cdt type based on your need
This is a 3-month-old post. And we have a better data type now - a!map()
Can you please explain more about this.
Use maps to store dynamic data in process variables.