Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

MutableObjectAttribute is not stored in ObjectAttributeBean

Dominik Hufnagel July 5, 2023
I am not able to store a modified MutableObjectAttributeValueBean in an ObjectAttributeBean. Can you please support. Would be nice!
if(listobjectsServer_Ids.contains(objectAnwendungMitServer_AttributeSystem_RefObjId)){
objectServer_AttributeVertraulichkeit = objectFacade.loadObjectAttributeBean(id_ServerObject, objectTypeAttributeBean_servVertraulichkeitId)
objectServer_AttributeVertraulichkeit_list = objectServer_AttributeVertraulichkeit.getObjectAttributeValueBeans()
objectServer_AttributeVertraulichkeit_list.each
{ element_AttributVertraulichkeit_objectServer ->
element_AttributVertraulichkeit_objectServer_Id = element_AttributVertraulichkeit_objectServer.getId()
element_AttributVertraulichkeit_objectServer_Value = element_AttributVertraulichkeit_objectServer.getValue(
element_AttributVertraulichkeit_objectServer_RefObjId = element_AttributVertraulichkeit_objectServer.getReferencedObjectBeanId()
}
/* When I retrieved all ObjectAttributeValueBeans I want to check, if the "ReferencedObjectBeanId differ to another ReferenceObjectBeanId of an object */

if(objectAnwendungMitServer_AttributeVertraulichkeit_RefObjId != element_AttributVertraulichkeit_objectServer_RefObjId){
mutableObjectAttributeBean_objServ_AttributeVertraulichkeit = objectServer_AttributeVertraulichkeit.createMutable()
mutableObjectAttributeBean_objServ_AttributeVertraulichkeit_list = mutableObjectAttributeBean_objServ_AttributeVertraulichkeit.getObjectAttributeValueBeans()
mutableObjectAttributeBean_objServ_AttributeVertraulichkeit_list.each { mutable_element_AttributVertraulichkeit_objectServer ->
mutableObjectAttributeValueBean_element_AttributVertraulichkeit_objectServer = mutable_element_AttributVertraulichkeit_objectServer.createMutable()
                    mutableObjectAttributeValueBean_element_AttributVertraulichkeit_objectServer.setReferencedObjectBeanId(objectAnwendungMitServer_AttributeVertraulichkeit_RefObjId)
}
                objectFacade.storeObjectAttributeBean(mutableObjectAttributeBean_objServ_AttributeVertraulichkeit)
   }
}


----> Where is the failure? Do I use the method .storeObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean) correctly?
Because when I execute the script. It throw an error

ValidationInsightException: Validation errors were found: rlabs-insight-attribute-11180: ErrorMessage{i18nKey='rlabs.insight.i18n.constraint.violation.ObjectAttributeValueBean.Invalid.Iql.object', parameters=[C1 (TCG-299383)], additionalMessage=null};

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events