There is a requirement to change some server import attribute views from mandatory to optional and some from optional to mandatory fields for some Proxy transactions .
Do the proxies for the relevant transactions need to be regenerated if there are optionality changes on server import view attributes?
Release : 8.6
Component : CA Gen Generator, Proxy
Support carried out some tests in a model with a mix of optional and mandatory server PStep import attribute views i.e.
1 +- P1
2 | IMPORTS:
3 | Work View in ws1 (mandatory,transient,import only)
4 | txt2_mand (mandatory)
5 | txt1_opt (optional)
6 | num2_mand (mandatory)
7 | num1_opt (optional)
8 | date2_mand (mandatory)
9 | date1_opt (optional)
Both the generated standard and classic java proxy sample applications were tested.
Both types of java proxy are checking for the presence of data for the mandatory attributes before going to the server. If mandatory is not present they will issue an exception e.g.
Standard java proxy: "java.lang.Exception: java.lang.IllegalArgumentException: Property InWs1.Txt2Mand is required and cannot be zero or empty"
Classic java proxy: "PropertyVetoException on InWs1Txt2Mand: java.beans.PropertyVetoException: InWs1Txt2Mand is required and may not be null or zero length"
So the generated proxy is checking the data input according to the optionality settings for the server PStep import attribute views.
Therefore in summary, the proxy needs to be regenerated to ensure it performs accurate data input validation checks in line with any server PStep import attribute view optional/mandatory properties that will be changing.
This advice applies to all Proxy types COM, C, Java, .NET.