Dear Arnold,
Would you please explain more details?
For the error you posted at first, you should be sure that you return all
"mandatory" fields include __UID__, __NAME__, the key you have defined in
your mapping, ect. for example if you mapped the Syncope 'username' to DB
'uname', you can fill the result as below (here email, organization and
department are optional):
sql.eachRow("SELECT * FROM Users" + where, {result.add([__UID__:it.uname,
__NAME__:it.uname, email:it.email, uname:it.uname,
organization:it.organization, department:it.department])} )
You are not forced to use primary key. Alternate key or even fixed values
can be pass as result.
On Mon, May 14, 2018 at 9:06 PM, Arnold Miller <[email protected]>
wrote:
> Looks like I will need to create another resource and duplicate
> information (except the previously used remote key).
> Will be glad to hear if anyone has another solution.
>
>
> Best Regards,
>
> Arnold Miller
>
>
> *Sent:* Thursday, May 10, 2018 at 3:04 PM
> *From:* "Arnold Miller" <[email protected]>
>
> *To:* [email protected]
> *Subject:* Re: Getting IllegalStateException when running task
> I certainly have an identity store which uses an alternate key instead of
> the one I marked as a remote key.
> Specifically, the master identity store has both the remote and the
> alternate keys, but the identity store where I am trying to push the
> updates has only the alternate key.
>
> If in Syncope "there must be exactly one remote key" how else can I handle
> this problem?
>
>
> Best Regards,
>
> Arnold Miller
>
> *Sent:* Thursday, May 10, 2018 at 1:29 AM
> *From:* "Francesco Chicchiriccò" <[email protected]>
> *To:* [email protected]
> *Subject:* Re: Getting IllegalStateException when running task
> On 09/05/2018 22:49, Arnold Miller wrote:
>
> Hi,
> I'm getting this
> "java.lang.IllegalStateException: Object {Uid=Attribute: {Name=__UID__,
> .....
> was returned by the connector but failed to pass the framework filter.
> This seems like wrong implementation of the filter in the connector."
> when the Search script is executed after running a Push task.
>
> From a previous message I found that the search script must return all the
> attributes it is asked for:
> https://www.mail-archive.com/[email protected]/msg02339.html
> Which basically means that you fill in all the values in ATTRS_TO_GET
> [.....]
> I am doing that and also I am returning the result as suggested in
> https://github.com/apache/syncope/blob/2_0_X/fit/core-
> reference/src/test/resources/rest/SearchScript.groovy#L76-L93
> like this:
> result.add(buildConnectorObject(node));
>
> My questions:
> 1. Why am I getting that "IllegalStateException" described above?
>
>
> The error above means that your search script is returning something that
> does not match with the original request: suppose that Syncope asks for a
> filter like as "name == 'Francesco'" and the result returned from the
> search script does not have the "name" attribute, or value is "Arnold".
>
>
> 2. If the script is finding the item it is requested to, why does it
> trigger the creation script instead of the update script?
>
>
> The point is exactly this: because of the exception above, Syncope does
> not find any item, hence create is invoked.
>
> HTH
> Regards.
>
> --
> Francesco Chicchiriccò
>
> Tirasa - Open Source Excellencehttp://www.tirasa.net/
>
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA,
> PonyMailhttp://home.apache.org/~ilgrosso/
>
>
--
*Best Regards,*
*Alireza Ranjbaran*
*ITS Security Operations Engineer at **MTN Irancell*