<div dir="ltr"><div dir="ltr"><div>So the __ALL__ ObjectClass is passed when you do not have a default type (intent) for the resource. This resource doesn't have a default for orgs, just different intents.</div><div><br></div><div>So I got it to pass org, has to add intent to task as well :/</div><div><br></div><div><font color="#0000ff">Live Sync: found 3 events to sync from Organization</font><br></div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 5, 2019 at 2:48 PM Jason Everling <<a href="mailto:jeverling@bshp.edu">jeverling@bshp.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">I setup a resource with different classes to sync and ran into a bug maybe? Anyone using sync with multiple classes?<div><br></div><div>When using if objectClass == "Organization" or even case "Organization" it doesn't work. Looking at the logs the Organization objectClass is not passed but is actually passed as __ALL__ , Account is passed correctly as __ACOUNT__</div><div><br></div><div>Error:</div><div>objectClass __ALL__ is not implemented in this script<br></div><div><br></div><div>Example:</div><div><div><span style="white-space:pre-wrap">      </span>case "SYNC":</div><div><span style="white-space:pre-wrap">           </span>def result = []</div><div><span style="white-space:pre-wrap">          </span>def tstamp = null</div><div><span style="white-space:pre-wrap">                </span>if (token != null){</div><div><span style="white-space:pre-wrap">                      </span>tstamp = token</div><div><span style="white-space:pre-wrap">           </span>} else {</div><div><span style="white-space:pre-wrap">                 </span>def today= new Date()</div><div><span style="white-space:pre-wrap">                    </span>tstamp = today.getTime();</div><div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">                </span>switch (objectClass) {</div><div><span style="white-space:pre-wrap">                   </span>case "__ACCOUNT__":</div><div><span style="white-space:pre-wrap">                            </span>sql.eachRow("SELECT * FROM userTable1 WHERE lastChanged > ${tstamp} ORDER BY uuid",</div><div><span style="white-space:pre-wrap">                         </span>{result.add([operation:"CREATE_OR_UPDATE", uid:it.uuid, token:it.lastChanged, attributes:[firstname:it.firstname,initials:it.initials,lastname:it.lastname,__ENABLE__:!(it.disabled as Boolean)]])}</div><div><span style="white-space:pre-wrap">                    </span>)</div><div><span style="white-space:pre-wrap">                        </span>break;</div><div><span style="white-space:pre-wrap">                   </span>case "Organization":</div><div><span style="white-space:pre-wrap">                   </span>sql.eachRow("SELECT * FROM orgTable1 WHERE lastChanged > ${tstamp} ORDER BY org",</div><div><span style="white-space:pre-wrap">                           </span>{result.add([operation:"CREATE_OR_UPDATE", uid:<a href="http://it.org" target="_blank">it.org</a>, token:it.lastChanged, attributes:[identifier:it.identifier,description:it.description,dept_code:it.dept_code]])}</div><div><span style="white-space:pre-wrap">                    </span>)</div><div><span style="white-space:pre-wrap">                        </span>break;</div><div><span style="white-space:pre-wrap">                   </span>default:</div><div><span style="white-space:pre-wrap">                 </span>log.warn("Sync script: objectClass '" + objectClass + "' is not implemented in this script")</div><div><span style="white-space:pre-wrap">         </span>}</div><div><span style="white-space:pre-wrap">                </span>log.warn("Sync script: found " + result.size() + " events to sync from " + objectClass)</div><div><span style="white-space:pre-wrap">              </span>return result;</div><div><br></div><div><div dir="ltr" class="gmail-m_-3923987312657319463gmail_signature"><div dir="ltr">JASON</div></div></div></div></div></div></div>
</blockquote></div></div></div>