Hi Nicodemo,
see my replies embedded below.

Regards.

On 29/08/24 11:59, Cianciaruso, Nicodemo wrote:

Hello,

While considering the capabilities of Syncope, the question arose as to how 
several multi-value schemas can be combined into one schema.

Allow me to briefly present the following scenario:

Two resources exist, each of which provides multiple email addresses for one 
user (via a multi-value attribute). These email addresses should be combined 
into a single schema.

One idea was to realise this via a derived schema, but unlike the 
VirAttrHandler, which returns a list of strings, the DerAttrHandler only 
returns a single string per schema.

Is there a special reason why the DerSchema does not support retrieving 
multiple values if the expression provides a list?

I don't think there is any special reason, only - as it often happens in open 
source - no enough use cases for multi-values derived attributes to push 
someone to contribute such an improvement - just to remember that PRs are 
welcome ;-)

Is there a more obvious solution to achieve the goal using derived attributes? 
I would be grateful for any advice.

I think that the simplest solution would be to:

1. define a Plain Schema to hold all email addresses
2. create two PullActions classes to associate to the two External Resources
3. remove the mapping for email addresses from the two External Resources

The logic to code in the two PullActions classes from (2) is to populate the 
Plain Schema from (1) with the values coming from the two External Resources.

--
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/

Reply via email to