Hello,
I've an issue with a record type. I pass it to a process model, but when I start the process, the relative process variable result to be null, or with null fields. I tryed also to cast the record type in cdt before sending to process model, but anything changed. Someone can help me please? I leave some code below.
Thank you
version 1:
link: a!startProcessLink( label: "SALVA", processModel: {cons!PVATRP_PRC_SALVA_OPERAZIONI}, processParameters: { operazioniInput:ri!operazioni, autorizzazioni: ri!autorizzazioni
)
version 2:
edit:
I realized that by running the process from the designer, it works correctly. The problem occurs only from the web site
Discussion posts and replies are publicly visible
Did you configure these process variables as parameters?
yes, of course.
Your rule input is the type of record and you are casting it to CDT. Not sure how it is working fine in the interface level. What have you configured in the process model? Is it designed using Write Records or Write to Data store entities? Also I would not run the forEach inside the startProcessLink function rather have it configured in some local and call it there. Have you checked if the process parameters are of the same naming convention as they are case-sensitive.
Your rule input and the Process variables are of different types. Please use both as same unless you are casting the data somewhere. Also your "autorizzazioni" variable is not configured as multiple in the process variable tab.
I'm casting to cdt because in the process model I cannot choose the record type variable. The cast should be automatic, because I've done a similar thing in another interface with another object, and there aren't problems. I also tried removing the foreach in the processlink and entering it as a local variable but nothing changed
Yes, as I have mentioned you missed the Multiple check in the Process variables tab for the variable "autorizzazioni".
I had removed the multiple check to do a test, but even putting it back in, the result is the same
By any chance, did you publish the model or only save it.
If this does not help, I suggest to create a separate model, and try this out with just passing a simple text value.
I always publish the model, not only save. However, the other one variable, "operazioni" is always loaded without any problem. The problem is only with "autorizzazioni" variable
I cannot use the same type because our customer wants to use Record type on interface, but the process model doesn't find record type variable but only cdt, I don't know why