public abstract class ProcedureProcess extends DalBaseProcess
Modifier and Type | Field and Description |
---|---|
protected ConnectionProvider |
connection
The Connection to the database used during the execution of the procedure.
|
protected ProcessLogger |
logger
A logger object - output will be viewable in the process monitor log.
|
COMPLETE, ERROR, EXECUTION_ID, KILLED, MISFIRED, PREVENT_CONCURRENT_EXECUTIONS, PROCESS_ID, PROCESS_NAME, PROCESSING, SCHEDULED, SUCCESS, SYSTEM_RESTART, UNSCHEDULED
Constructor and Description |
---|
ProcedureProcess() |
Modifier and Type | Method and Description |
---|---|
void |
doExecute(ProcessBundle bundle)
The method that will execute when this process fires.
|
protected abstract void |
init(ProcessBundle bundle)
An initialization method is called before executing the procedure.
|
protected void |
log(String msg,
Exception e)
Log an error to the process' output log (used by process monitor).
|
protected void |
log(String message,
ProcessContext context)
Log a message to the process' output log (used by the process monitor).
|
protected void |
setParams(String[] params,
String[] types)
Set the procedure's parameters and the parameter types.
|
protected void |
setSQL(String sql)
Set the sql (procedure) that this process will execute.
|
execute, isDoCommit, setDoCommit
protected ConnectionProvider connection
protected ProcessLogger logger
protected abstract void init(ProcessBundle bundle)
bundle
- the process bundle containing process and context specific informationpublic void doExecute(ProcessBundle bundle) throws Exception
doExecute
in class DalBaseProcess
bundle
- the process bundle containing process and context specific informationException
protected final void setSQL(String sql)
sql
- the sql/procedure to executeprotected final void setParams(String[] params, String[] types)
params
- the parameters for the proceduretypes
- the types of the parametersprotected void log(String msg, Exception e)
msg
- e
- protected void log(String message, ProcessContext context)
message
- the message to logcontext
- the process' execution bundle/context