org.jbpm.jobexecutor
Class ExecuteJobCommand

java.lang.Object
  extended by org.jbpm.jobexecutor.ExecuteJobCommand
All Implemented Interfaces:
java.io.Serializable, Command<java.lang.Object>

public class ExecuteJobCommand
extends java.lang.Object
implements Command<java.lang.Object>

Author:
Tom Baeyens
See Also:
Serialized Form

Field Summary
protected  long jobDbid
           
 
Constructor Summary
ExecuteJobCommand(long jobDbid)
           
 
Method Summary
 java.lang.Object execute(Environment environment)
           
protected  void handleJobExecutionException(Environment environment, Job<?> job, java.lang.Throwable exception)
          This transaction will be marked for rollback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jobDbid

protected long jobDbid
Constructor Detail

ExecuteJobCommand

public ExecuteJobCommand(long jobDbid)
Method Detail

execute

public java.lang.Object execute(Environment environment)
                         throws java.lang.Exception
Specified by:
execute in interface Command<java.lang.Object>
Throws:
java.lang.Exception

handleJobExecutionException

protected void handleJobExecutionException(Environment environment,
                                           Job<?> job,
                                           java.lang.Throwable exception)
This transaction will be marked for rollback. A command will be associated with the Transaction.EVENT_AFTERCOMPLETION (after the job locks of the current transaction are released). Then the command will update the Job with the exception details in a separate transaction.