Federation completes with an error that there is a Property constraint
violation.
Symptoms
The Federation Administration Rule Management tab reports that
federation completed with import errors. The error listing includes the following error:
CFS0100: Property constraint violation
Causes
One or more mapped properties that are included as part of the import request have a value
that is invalid with respect to the definition of the associated property on the target document.
Properties on objects in a
Content Platform Engine object store are defined
to be strongly typed. As a result, the set of possible values that can be assigned to a property is
limited to those values that conform to the data constraint rules that are associated with the
property definition. Attempts to assign values outside this set result in a constraint violation
error.
The primary data constraint that is associated with any property is its fundamental data
type. When you use IBM®
FileNet® Content Federation Services for Content
Integrator, you can federate properties with
the following fundamental types: String, Integer, Boolean, DateTime Float and ID. For more
information about the range of supported values for each data type, see Supported data types.
When IBM
FileNet Content Federation Services for Content
Integrator assigns a
value to a property on an object in the target object store, the value must conform to the data type
that is defined by the property definition or it must allow implicit conversion to that data type
without loss of information. For example, if the property definition on the target class specifies a
fundamental type of Integer, the mapped property must also have integer values or
strings that consist of numeric characters that can be implicitly converted to an integer value. A
string value that includes non-numeric characters results in a constraint violation.
Other
property constraints include whether the property allows null values, whether it is read-only, and
whether it can be updated after an initial value isssigned. Also, a property definition can include
a choice list, which is a constraint that requires the value to be a member of a fixed list of
possible values.
Resolving the problem
Because there are many ways that a constraint violation error can occur, the first step
is to identify the root cause of the error. Use the Federation Administration application to examine
the detail record that is associated with the error. The detail record includes a description of the
underlying cause and the name of the property that raised the error. It also includes the full
import request in XML form, from which the invalid property value can be determined.
After you
determine the exact error, you can take one of the following corrective actions to solve the problem:
- Correct the value on the associated document in the source repository so that it conforms to the
property constraints of the target property to which it is mapped.
- Modify the IBM Content Integrator data map that is associated with the rule
that failed so that it maps the source property to a different target property.
- Modify the property definition on the target class to relax the constraints to allow the
currently noncompliant value to be assigned to the target property.
Important: Modifying property definitions on a production system can have
far-reaching and potentially disruptive consequences, so exercise care if you choose the last
option.