Changing the datatype of a virtual procedure parameter did not trigger revalidation. This means that errors caused by trying to convert the parameter to an incompatible datatype in the transformation would not disappear after fixing the datatype, and conversely, changing the datatype did not trigger validation errors when the new datatype was incompatible. To fix this, the T-form listener was modified to invalidate a t-root when a virtual parameter changed. As a result, virtual procedures are now re-validated after parameters are changed.
Changing the datatype of a virtual procedure parameter does not trigger revalidation. This means that errors caused by trying to convert the parameter to an incompatible datatype in the transformation do not disappear after fixing the datatype, and conversely, changing the datatype does not trigger validation errors when the new datatype is incompatible.
Steps to reproduce:
1. Create new virtual procedure
2. Add a parameter p1 with datatype 'string'
3. Set the following transformation:
CREATE VIRTUAL PROCEDURE BEGIN DECLARE xml VARIABLES.IN_P1 = p1; END
4. Save the model, an error is shown as expected (TEIID30082 Expected value of type 'xml' but 'p1' is of type 'string' and no implicit conversion is available.)
5. Change the datatype of the paramter to XMLLiteral
6. Validate the SQL, save the model, the error does not go away
7. Change the procedure to force revalidation (e.g. by adding DECLARE string VARIABLES.S = ''; to the procedure body)
8. Validate and save, the error disappears.
9. Change the datatype of the parameter back to string
10. Validate and save, no error appears
11. Change the procedure again, validate and save, the error appears again
Comment 1JBoss JIRA Server
2014-07-08 21:11:56 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2198 to Resolved
Comment 2JBoss JIRA Server
2014-11-17 16:25:41 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2198 to Closed
Changing the datatype of a virtual procedure parameter does not trigger revalidation. This means that errors caused by trying to convert the parameter to an incompatible datatype in the transformation do not disappear after fixing the datatype, and conversely, changing the datatype does not trigger validation errors when the new datatype is incompatible. Steps to reproduce: 1. Create new virtual procedure 2. Add a parameter p1 with datatype 'string' 3. Set the following transformation: CREATE VIRTUAL PROCEDURE BEGIN DECLARE xml VARIABLES.IN_P1 = p1; END 4. Save the model, an error is shown as expected (TEIID30082 Expected value of type 'xml' but 'p1' is of type 'string' and no implicit conversion is available.) 5. Change the datatype of the paramter to XMLLiteral 6. Validate the SQL, save the model, the error does not go away 7. Change the procedure to force revalidation (e.g. by adding DECLARE string VARIABLES.S = ''; to the procedure body) 8. Validate and save, the error disappears. 9. Change the datatype of the parameter back to string 10. Validate and save, no error appears 11. Change the procedure again, validate and save, the error appears again