title: Workflow persistence and bookmarks as a workflow failover
body: <p>I have set of custom activities, which are used in complex workflows.</p>
  
  <p>I would like to make them (custom activities) persistable without having workflow in an idle state.  It should be kind of failover system, so whenever something goes wrong during execution of a workflow it can be either:</p>
  
  <ul>
  <li>paused by a user (in anytime) and resumed later from the bookmark/point it was paused (for example user has noticed that an external system is down and he wants to pause the workflow for time being).</li>
  <li>in case of an unhandled exception we can restart execution from last bookmark/point in time</li>
  <li>stop of WorkflowApplication host can happen anytime and we can restart execution from last bookmark/point in time</li>
  </ul>
  
  <p>I've worked for few days with workflow persistance, but I am not sure if I can achieve my goal with it. Why?</p>
  
  <ul>
  <li>I could use blocking bookmarks in each custom activity, but blocking a workflow and restarting it just for purpose of having it persisted doesn't look promising.</li>
  <li>I could use notblocking bookmarks, but I was not able to see them in database and resume from it. </li>
  </ul>
  
  <p>Can you please advice me, it workflow bookmarks are the way to go here?</p>
  
  <p>I see some light in notblocking bookmarks, but I cannot persist them and resume later on. Can you please give me some hints how to persist a nonblocking bookmark for later resume?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>In wf3 there was an attribute <code>PersistOnClose</code> which would be enough for my requirement. 
  in wf4 it was replaced with <code>Persist</code> activity, which could also be useful, however I do not want to have extra activities in my already complex workflows.</p>
  
  <p>Ideally, it would be great to be able to execute <code>context.RequestPersist(callback)</code> from <code>NativeActivityContext</code> , however this method is internal (and everything what is inside it is not visible outside of original assembly.</p>