I agree with Howie (as mostly :-))
In addition to his suggestion, here is what I would do to stop a workflow that is waiting:
You know, with copper it is also possible to wait for more than one response/event.
So, assume there is a workflow instance with ID X which is waiting for a response with correlationId C
I would do the wait like this
wait(WaitMode.FIRST, <sometimeout>, X, C);
Response rX = getAndRemoveResponse(X);
Response rC = getAndRemoveResponse(C);
if (rC != null) {
// everything is fine - process the response and continue;
}
else if (rX != null) {
// someone told us to abort
throw new WorkflowCancelException(); // catch this somewhere as described below by Howie
}
So, you can easily abort the workflow instance with ID X, by just sending some response with CorrelationID X.
Hope this helps..
/Michael