If you are talking about handeling a Stop signal from Orchestrator within your workflow, then follow what @ppr is referring.
Using the Should Stop activity you can monitor for a Stop signal and build your code to handle this.
If you are talking about monitoring Orchestrator jobs/events, then you could use Webhooks to subscribe to job.completed events.
Should Stop, is used just before “Get Transaction” so that what ever is being processed is completed, Should Stop is checked If True perform X if False continue with next transaction