In reply to Chris Hemedinger.

Thanks Chris,
I will check the SAS.Tasks.Cardinality sample.

I want to stop the succeeding processes on the flow when user clicked Cancel button on the prompt, since ISASTaskExecution.Run method can return RunStatus.Cancelled, I thought EG will do that for me but nothing happened.
Two questions:
1. What is the RunStatus.Cancelled exact for?
2. Is it possible to tell EG to stop the running process flow, just like stop button is clicked?