Created
August 1, 2012 22:59
-
-
Save dandiep/3231416 to your computer and use it in GitHub Desktop.
Invoice search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<objectstore:config name="Objectstore" partition="default" doc:name="Objectstore"/> | |
<flow name="PollForNewInvoices"> | |
<poll frequency="10000"> | |
<!-- Get the last invoice synced --> | |
<objectstore:retrieve config-ref="Objectstore" key="lastInvoiceId" defaultValue-ref="#[-1]" doc:name="Get Last Invoice ID"/> | |
</poll> | |
<!-- search for invoices with an ID greater than lastInvoiceId --> | |
<flow-ref name="GetUpdatedInvoices"/> | |
<!-- Update the last invoice synced --> | |
<objectstore:store config-ref="Objectstore" key="lastInvoiceId" value-ref="#[payload[payload.size() - 1].id]" overwrite="true" doc:name="Objectstore"/> | |
</flow> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment