Trying to figure out the best way to implement a task that calls a long-running remote service and then stops flow execution until its notified for completion without tying up the running computational thread. Would it make sense to have the remote service started using the "Java Service Task" (which we implement, of course), then the next task in the flow being the "Java Receive Task" which we would call in a programmatic fashion hours later? So the thread that initially ran the Java Service Task would be completed when the Java Receive Task was initially executed, and the flow itself would continue once the received task was signaled?
Just making sure I got that correct, and checking to see if there was another way to do this that would be better.