Batch
is the definition for a list of processes that will be executed
after each other.
Batch
allows with addProcess to define a list of processes
that will be started after each other. The execution will follow in the order
of the arrival.
Batch
is a composite (it implements Process), so you can
even add one Batch
with addProcess to another Batch
.
It supports beneath all listeners of Process seperate events for
Batch
processing:
BatchStartListener, BatchFinishListener,
BatchUpdateListener and BatchErrorListener
Example:
import org.as2lib.app.exec.Batch;
import org.as2lib.app.exec.BatchProcess;
var b:Batch = new BatchProcess();
b.addListener(new MyStartUpController());
b.addProcess(new MyStartUpProcess());
b.addProcess(new MyXMLParsingProcess());
b.start();
public function removeProcess(process:Process):Void
Removes all instances of a process that were added to the Batch
.
process | Process to be removed |
public function removeProcessById(id:Number):Void
Removes a Process
with a certain id of the Batch
.
This is necessary if you add the same process more than once.
id | identifier for the certain Process
|
public function getCurrentProcess(Void):Process
Returns the currently execution Process
currently executing Process