I have an activity that schedules an operation to an external API and then has to continue only when this external API finishes, which is indicated by an Event. I currently use a NativActitivy.
my idea would have been to set a bookmark and then register an event handler that would trigger the bookmark. Sadly, it seems I can not resume a bookmark wihtout a context.
What is the best way to do that?
The flow is this: * Activity starts * Activity sets bookmark for external API completion. * Avtiovity calls into external API AND registers event handler * Activity event handler listens to all completion events until the right one comes (there is a paramter that identifies which request was completed) * Activity then resumes the bookmark and completes.
Anyone has a code sample for that? I currently use a natie activity but am willing to change.
You must create an extension to do it. Think about it: While you are waiting for the external event to occur, your workflow is idle. So you need a guy(IWorkflowInstanceExtension) outside your workflow to bring things up again
Examples at: