Hi,
I have just replicated your use case via REST and audit is working as expected.

I suppose that in your example the output is not updated because of the 
transactional layout that is set up for REST invocations.

Invoking Logic classes from within Implementations (SchedTask in your case) is 
discouraged as it might lead to inconsistencies, as the one you are reporting 
below.
I would suggest to rely on calling the UserProvisioningManager instead.

Regards.

On 22/12/25 16:14, Lionel SCHWARZ wrote:
Hi all,

Inside a custom AbstractSchedTaskJobDelegate<SchedTask>, a User update is triggered with 
"userLogic.update(patch, false)"
The update is successful but I found that the corresponding Audit record does 
not provide the updated information in output.

I attached the full anonymized Audit record but here is the simplified view of 
the data:

Before is:

{
   "_class": "org.apache.syncope.common.lib.to.UserTO",
   ...
   "relationships": [
     ...
     {
       "type": "RELATION_USER_COLLABORATION",
       "end": "LEFT",
       "otherEndType": "COLLABORATION",
       "otherEndKey": "0186b612-ecd0-78d3-a434-9dc0e6bbb3bb",
       "otherEndName": "snovae"
     }
   ],
   ...
}

Input is (DELETE a relationship):

{
   "_class": "org.apache.syncope.common.lib.request.UserUR",
   ...
   "relationships": [
     {
       "operation": "DELETE",
       "relationshipTO": {
         "type": "RELATION_USER_COLLABORATION",
         "end": "LEFT",
         "otherEndType": "COLLABORATION",
         "otherEndKey": "0186b612-ecd0-78d3-a434-9dc0e6bbb3bb",
         "otherEndName": "snovae"
       }
     }
   ],
   ...
}

And the output is exactly the same as before, although the update was 
successful (the relationship was indeed deleted).

Is this a bug or should I use another way to update ?

Regards,
Lionel

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA
https://about.me/ilgrosso

Reply via email to