Hi Francesco, Your answer is absolutely clear, thanks Regards Lionel ----- Le 25 Oct 23, à 16:28, Francesco Chicchiriccò ilgro...@apache.org a écrit :
> So let me summarize what is happening. > > This step: > > - update the user so that the approval is needed > > is actually performed by calling > > PATCH /users/self/<user_key> > > or > > PATCH /users/<user_key> > > depending on whether the caller is the user themselveers or an administrator. > Both invocations reach up to UserLogic#doUpdate that is where any matching > LogicActions#afterUpdate is invoked. > > If the update as above is triggering an approval in the defined user workflow, > any propagation is suspended. > > This step: > > - approve the update > > (I assume performed via Console) is instead calling > > POST /flowable/userRequests/forms/<form_id> > > As you can see from Swagger UI, this all is returning all the propagation > statuses as expected. > > Hence, if you want to decorate the result of a form approval - similarly to > what > you are doing via LogicActions#afterUpdate for plain updates - you will have > to > code this into a workflow task, to be inserted in your definition right after > approval. > > Hope this clarifies. > Regards. > > On 24/10/23 09:48, Lionel SCHWARZ wrote: >> 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/
smime.p7s
Description: S/MIME Cryptographic Signature