State machine approach to executing external processes either immediately or using a batch system, with an optional verification of outputs and retry strategies.