Products | Versions |
---|---|
TIBCO BPM Enterprise (formerly TIBCO ActiveMatrix BPM) | 4.x |
Suppose a case class has multiple identifier fields (non-identifier attributes are elided)
CustomerChatHistory::
CustomerId : text(20), no default
ChatNumber : integer, default = 1
CommentNumber : integer, default = 1
...
It's not necessary (or productive) to set default values for case identifier attributes in the model.
Setting the initial identifying values for each new instance is an implementation detail; the required logic or rules will be expressed in code and/or documented appropriately, as required.
Having declared default values, we cannot use findByCompositeIdentifier() API to locate a case whose identifiers include any default values!
When called, this API checks that values were provided for all caseIdentifier attributes; it (wrongly) infers that a default-value argument means "not set", so rejects the search attempt.
Symptoms:
JavaScript function findByCompositeIdentifier() fails,with root cause:
cause: javax.script.ScriptException: com.tibco.n2.javascript.WrappedException: Wrapped com.tibco.bds.services.CaseDataAccessFault: com.tibco.bds.common.exception.BDSDAMissingCIDORSearchableAttributeException: BDS DA: Finding by CID an object with composite CIDs requires all CIDs to be specified