Hi Francesco,
Thanks for your answer.

You should be able to reproduce this with the UserWorkflow defined in the fit 
part of Syncope (which I used as a base for my customized workflow definition) 
and with the LogicActions implementation attached to the email:

- declare the ExampleLogicAction in the default realm
- create a user in the default realm with a resource
- update the user so that the approval is needed
- approve the update
- check in the log that the afterUdate() receives empty List<PropagationStatus>

AND
- update the user so that the approval is NOT needed
- check in the log that the afterUdate() receives List<PropagationStatus> with 
1 item: the propagation of the resource


Best regards
Lionel

----- Le 24 Oct 23, à 8:44, Francesco Chicchiriccò ilgro...@apache.org a écrit :

> Hi Lionel,
> can you provide a simple project that reproduces this issue?
> 
> It should be enough to create a new Maven project from latest stable version
> (3.0.5 at this time), change the workflow definition to match your case and
> finally provide the steps to reproduce in embedded mode.
> 
> Regards.
> 
> On 23/10/23 18:10, Lionel SCHWARZ wrote:
>> To be more specific about the issue, I must tell that I have a flowable
>> UserWorkflow with approval on user update operations (on certain
>> circumstances).
>> It seems that when the update needs approval, the afterUpdate() is called 
>> before
>> approval with an empty List.
>> When the update does not need approval, the afterUpdate() works fine.
>>
>> Lionel
>>
>> ----- Le 23 Oct 23, à 17:36, Lionel SCHWARZ lionel.schw...@in2p3.fr a écrit :
>>
>>> Dear all,
>>>
>>> I have a customized LogicAction with afterUpdate() implementation, but this
>>> method receives an empty List<PropagationStatus> when called.
>>> Nevertheless, the propagation works fine, and I get the correct REST 
>>> response
>>> with propagationStatuses and beforeObg/afterObj.
>>>
>>> Am I missing something?
>>>
>>> Regards
>>> Lionel
> 
> --
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
package org.apache.syncope.core.logic.api;

import java.util.List;

import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.PropagationStatus;
import org.apache.syncope.common.lib.to.UserTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ExampleLogicActions implements LogicActions {

    protected static final Logger LOG = LoggerFactory.getLogger(ExampleLogicActions.class);

    public ExampleLogicActions() {
    }

    @Override
    public <A extends AnyTO> A afterUpdate(A input, List<PropagationStatus> statuses) {
        if (input instanceof UserTO) {
            LOG.warn("afterUpdate, size of List is {}", statuses.size());
        }
        return input;
    }
}

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to