If an error occurs in your system activity and you would like to cancel the execution of it, you can realize this by using exceptions. The execution logic is interrupted, database changes are revoked and the step status is set to error.
Exceptions
<?php
class csvSystemActivity extends AbstractSystemActivityAPI
{
...
protected function exportCsv()
{
$fieldDelimiter = $this->resolveInputParameter('fieldDelimiter');
if ($fieldDelimiter == '') {
throw new Exception('A separator has to be defined.');
}
$this->debug('Separator: '.$fieldDelimiter);
}
}