[ 
https://issues.apache.org/jira/browse/SYNCOPE-1574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17152598#comment-17152598
 ] 

Francesco Chicchiriccò commented on SYNCOPE-1574:
-------------------------------------------------

You can:
 # run
{code:java}
POST /resources/{key}/{anyTypeKey}{code}
to trigger {{GET_LATEST_SYNC_TOKEN}}

 # run
{code:java}
GET /resources/{key}{code}
and inspect the value under provisions -> syncToken to double check what value 
was actually stored in Syncope after the call: the same value is expected to be 
passed from Syncope back to Connector during next incremental Pull, which 
involves {{SYNC}}

Please note that both Scripted DB and Scripted REST connectors share most of 
the Java code; in particular, the one that [passes the 
{{SyncToken}}|https://github.com/Tirasa/ConnIdCommons/blob/master/scripted/src/main/java/net/tirasa/connid/commons/scripted/AbstractScriptedConnector.java#L552-L590],
 hence it is hard to imagine why you don't have similar troubles with DB.

>From the attached script I can see that:
 * the passed {{token}} is not used to filter the returned objects in any way
 * the {{token}} value for returned objects is generated on-the-fly

Under such conditions there is naturally no point in using {{INCREMENTAL}} as 
opposite to {{FULL RECONCILIATION}} - see 
[http://syncope.apache.org/docs/2.1/reference-guide.html#pull-mode] - maybe 
this is just because the attached file is just a sample.

> Sync token is mangled in Rest Connector
> ---------------------------------------
>
>                 Key: SYNCOPE-1574
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1574
>             Project: Syncope
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.1.6
>            Reporter: Jim Lawhorn
>            Priority: Critical
>         Attachments: SyncScript_Test.groovy
>
>
> The token value is being altered by the REST connector - the token value 
> being set by GET_LATEST_SYNC_TOKEN is not the token value sent to the SYNC 
> operation when performing a pull.  
> Using the demo version, the token value being set is a date, however the 
> value received back is "-37".  This does not appear to be an issue with the 
> DB Scripted connector.  I'm unsure if this is a syncope problem or a connid 
> problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to