Hello,
I often have validation error when I want to import in-parameters in a child workflow.
During my workflow, one string is initialize with a number (strValue). I‘ve checked that the value is correctly set (System.debug(strValue)).
Later in my workflow, it’s launching a child workflow which needs this string (strValue). At this point, I have fatal errors :
If I hard-code the value “strValue” in the attributes tab in my workflow, I don’t experience the error. The same if I transform “strValue” as a worklow input and enter it in the presentation view when I submit my workflow to start.
Any ideas how to avoid such errors ?
Thank you for your inputs.
Fred
OK, validation issue at runtime on the subworkflow. My previous statement was only valid for running a validation on the parent workflow.
Include a System.log(System.getObjectType(strTaskID)); in the scriptable box before the subworkflow that fails.
If it does not come as a string you will need to cast when assigning to the value with adding + "";
Christophe.
Hi,
Could you please provide a sample package with 2 workflows having the problem ?
The validation does not check the content of your variables, it checks the binding (must be bound and with the same type).
Christophe.
OK, validation issue at runtime on the subworkflow. My previous statement was only valid for running a validation on the parent workflow.
Include a System.log(System.getObjectType(strTaskID)); in the scriptable box before the subworkflow that fails.
If it does not come as a string you will need to cast when assigning to the value with adding + "";
Christophe.
Christophe,
Thank you very much for your answer. I've included System.log(System.getObjectType(strTaskID)) and it came as a "number". I've cast my value and it worked !
Is-it not strange that attribute change during workflow even if it's declared as a String in the attribute tab? Moreover, "Invoke AddDeviceToScheduleTask" worked but it's just the Invoke "StartTaskNow" which didn't work.... Anyway, all is now working fine !
Many thanks,
Regards,
Fred
JavaScript is not strongly typed. Initializing the string may have helped avoid this. The types in vCO are mostly visual helpers to bind parameters.
These are not checked when getting out from one box but are checked through the inptut validation.
Christophe.