You can use a conditional sequence flow to connect a task to a Terminate event. If the output from the task satisfies the condition on the sequence flow, the workflow reaches the Terminate event and the workflow ends. A workflow that ends at a Terminate event enters an aborted state.