Hi,

I did yes and I tried to double check that specific part, but I have it working 
now by modifying the parameter types of the parameters that I am passing to my 
utility functions and the utility class, so basically all is fine for now! 

Thank you for the response though!

 Regards, 

     Mikael   

-----Original Message-----
From: Matteo Alessandroni [mailto:[email protected]] 
Sent: torstai 14. syyskuuta 2017 11.35
To: [email protected]
Subject: Re: User username modification during/after a logic action

Hi Mikael,

it seems to be a problem with the "@Transactional" annotation [1].
Did you use it in your code?

Regards,
Matteo

[1] 
https://docs.spring.io/spring/docs/current/spring-framework-reference/html/transaction.html#transaction-declarative-annotations

On 2017-08-30 16:54, Mikael Ekblom <[email protected]> wrote: 
> Hi,
> 
> We have the following scenario: we have some users that are not as per see 
> associated with our organization. They are called UFO-members. Now, we create 
> these through an manual process that I will now try to implement in Syncope 
> too. It has been outside everything so far.
> 
> When we create these users through the syncope console, I have noticed that 
> we get the key for the recently created user through the logic actions. The 
> thing now is, that the users using syncope and the console will be pretty 
> lazy and would like to have the username created automatically according to 
> the same automated standard as the rest via the firstname + lastname 
> combination
> 
> You can set the username via the console and Syncope will report if the 
> username is already in use. I’d like to automate this and check for myself 
> in the background if the current username is in use and within the 
> repository. If found, we will try another iterated combination.  We do the 
> same when we pull users from external resources.
> 
> Now, within the logic action I have the possibility to search via the key for 
> the UserTO object though UserDAO. But, if I call for UserDAO.findByUsername() 
> , I get that “EntityManager not found for the Master domain”. I guess it 
> is not available within the scope and thus when a combination of a username 
> is created, I do not get to check the validity for the new combination for 
> the username itself.
> 
> This is the first time I encountered this problem and I wonder if you there 
> have a quick answer regarding how to search for a specific username and not 
> the key during a logic action?
> 
> Regards,
> 
>       Mikael
> 
> 
> 
> 

Reply via email to