Skip to content

Instantly share code, notes, and snippets.

@marianogonzalez
Created November 22, 2012 21:06
Show Gist options
  • Save marianogonzalez/4132922 to your computer and use it in GitHub Desktop.
Save marianogonzalez/4132922 to your computer and use it in GitHub Desktop.
<google-contacts:batch-contacts config-ref="google-contacts" accessTokenId="#[variable:tokenId]">
<choice>
<when expression="payload.inserts.size() &gt; 0">
<google-contacts:batch-insert
operationId="newContacts"
entries-ref="#[payload.inserts]"
config-ref="google-contacts"
accessTokenId="#[variable:tokenId]" />
</when>
<otherwise>
<logger message="No new contacts" />
</otherwise>
</choice>
<choice>
<when expression="payload.updates.size() &gt; 0">
<google-contacts:batch-update
operationId="updatedContacts"
entries-ref="#[payload.updates]"
config-ref="google-contacts"
accessTokenId="#[variable:tokenId]" />
</when>
<otherwise>
<logger message="No updates" />
</otherwise>
</choice>
<choice>
<when expression="payload.deletes.size() &gt; 0">
<google-contacts:batch-delete
operationId="deletedContacts"
entries-ref="#[payload.deletes]"
config-ref="google-contacts"
accessTokenId="#[variable:tokenId]" />
</when>
<otherwise>
<logger message="No deletes" />
</otherwise>
</choice>
</google-contacts:batch-contacts>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment