c# - Store data in workflow before bookmarking for use on resume -


is possible, somehow, persist information in workflow activity use on resuming.

basically have stock standard workflow activity, call service gets list of ids back.

this example...

public class mygodostuffactivity: nativeactivity<bool> {     public inargument<int> versionid { get; set; }     public int[] jobs { get; set; }      protected override bool caninduceidle     {         { return true; }     }      protected override void execute(nativeactivitycontext context)     {         var container = context.getextension<icontainer>();         var versionid = context.getvalue(versionid);          using (var service = container.resolve<ijobsservice>())         {             jobs = service.startjobs(versionid);              context.createbookmark("bookmark_wait_for_jobs_versionid_" + versionid, bookmarkcallbackresult);         }     }      private void bookmarkcallbackresult(nativeactivitycontext context, bookmark bookmark, object value)     {         var container = context.getextension<icontainer>();         var versionid = context.getvalue(versionid);          using (var service = container.resolve<ijobsservice>())         {             var status = service.havealljobscompleted(jobs);              if (!status)              {                 context.createbookmark("bookmark_wait_for_jobs_versionid_" + versionid, bookmarkcallbackresult);                 return;             }         }          context.setvalue(result, true);     } } 

something sort of below...

bookmarking, resuming, stuff works, can't figure out how persist additional information use on resuming bookmark.

the value on resume useful if update job status , bookmark while wait next status change.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -