I was initially trying to use a salesforce "Poll Updated Objects" activity which handles persisting the last job execution automatically; however, it seems that the poll activity exceptions aren't handled by the Catch All. So I decided to try just combining a "Schedule Job" activity with an "Get Updated Objects" activity. (The "Get Updated Objects" activity exceptions do get handled by the Catch All). So now I just need to be able to save the time that the job last completed so that I can read this value as the "getModifiedSince" date when the job runs the next time. So basically I'm trying to mimic the functionality of a "Poll Updated Objects" activity by combining a "Schedule Job" and "Get Updated Objects". Is there a built in way that I can persist a value and then read it again? I think that if I use a variable, it will lose its value when the orchestration completes.
Pinned topic How can I save the time that a job last ran?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-09-29T14:17:38Z at 2011-09-29T14:17:38Z by wilmor324
sharpme 270003WR3G1 Post
Re: How can I save the time that a job last ran?2011-09-28T19:32:38ZThis is the accepted answer. This is the accepted answer.I would recommend creating a custom object in Salesforce that stores a single Date/Time value for the last successful run. In Cast Iron Studio, design your orchestration to use the Salesforce.com activity "Get Server Timestamp" as the first activity after your starter activity to get the current server time. At the end of your orchestration upon success, you can use a Salesforce.com "Update Objects" activity and map this timestamp variable to your custom object. This will allow you to persist the time across multiple runs as well as will keepthe time consistent with Salesforce's server clock.