org.moremotion.process
Class MScriptingProcess
java.lang.Object
org.moremotion.process.Process
org.moremotion.process.MScriptingProcess
public class MScriptingProcess
- extends Process
- Version:
- $Id: MScriptingProcess.java 171 2008-07-10 07:46:02Z mustafa $
Method Summary |
void |
finalizeProcess()
This method is called by the process manager after there is no more records to process. |
void |
prepare()
The Process should prepare to be called for each process records existing
in the configured process block. |
void |
processRecord(ProcessRecord prec)
This method is called by the process manager for each process record in the configured process block that
passes through the configured record filter. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MScriptingProcess
public MScriptingProcess()
prepare
public void prepare()
throws ProcessException
- Description copied from class:
Process
- The Process should prepare to be called for each process records existing
in the configured process block. The preparation can be accessing to the process configuration,
establishing any necessary database connection and store the results of this preparation in private data members.
- Specified by:
prepare
in class Process
- Throws:
ProcessException
- indicates that the preparation failed and means
other methods of this process instance will not be called and the overall completion code of the
process execution will be set to 20.
processRecord
public void processRecord(ProcessRecord prec)
throws ProcessException
- Description copied from class:
Process
- This method is called by the process manager for each process record in the configured process block that
passes through the configured record filter. For example if the call definition of the process is as follows
<callProcess name="x" blockName="PBx" recordFilter="PRICE < 100" ...
then the process manager will
call the processRecord() method for each record in the process block "PBx" that satisfies the "PRICE < 100"
pre-condition.
- Specified by:
processRecord
in class Process
- Parameters:
prec
- The ProcessRecord Object that contains process fields
- Throws:
ProcessException
- indicates that there is an error and
the process cannot continue. This exception will set the overall completion code to 20.
finalizeProcess
public void finalizeProcess()
throws ProcessException
- Description copied from class:
Process
- This method is called by the process manager after there is no more records to process.
This is the last call to the process instance and therefore
the process should finalize its tasks.
Note that this method is called regardless of the completion code
if the prepare method did not throw an exception.
The method should take care of the current completion code and act accordingly
public void finalizeProcess() throws ProcessException {
if (getCompletionCode() <= 4) {
// successfull completion
} else {
// unsuccessfull completion
}
}
- Specified by:
finalizeProcess
in class Process
- Throws:
ProcessException
- that indicates that finalization was in an unrecoverable error.
This exception will set the completion code to 20.
Copyright © 2002-2008 MOR YAZILIM. All Rights Reserved.