I am going to validate multiple objects but individually (one at a time) using ilog jrules.
My current thought is wrap all items needs to be validated in a input param called "itemToValidate" as follows
<xs:element name="itemToValidate">
<xs:complexType>
<xs:sequence>
<xs:element name="employer" type="tns:employer" minOccurs="0" />
<xs:element name="department" type="tns:department" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
then in a rule called "init" in package called "init" get each item and set to a variable for example "the employer" then for each item (element) in "itemToValidate" would have a package such as "employer" for all rules related to "the employer"
issue i am facing with this is I need to check the null ness for all rules before the actual validation.
is there a way to avoid that? or is there any wrong with my implementation?
Thanks