Class ProcessengineTaskRunner
java.lang.Object
de.hybris.platform.processengine.process.ProcessengineTaskRunner
- All Implemented Interfaces:
TaskRunner<ProcessTaskModel>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class ProcessengineTaskRunner
extends Object
implements TaskRunner<ProcessTaskModel>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Special
TaskRunner implementation intended to work with ProcessengineTaskExecutionStrategy only!
This runner takes over responsibility to start and finish transaction contrary to
DefaultTaskExecutionStrategy.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidbeforeRun(TaskService taskService, ProcessTaskModel task) protected StringdoRun(TaskService taskService, ProcessTaskModel task) ExecutesrunProcessTask(ProcessTaskModel)viarunProcessTaskInTransaction(ProcessTaskModel)and performs error handling viaprocessRunError(TaskService, ProcessTaskModel, Throwable).protected StringgetColumnName(Class<?> clazz, String attribute) protected NodeFetches node for execution.protected ProcessDefinitiongetProcessDefinition(BusinessProcessModel process) protected StringgetTableName(Class<?> clazz) voidhandleError(TaskService taskManager, ProcessTaskModel task, Throwable error) protected StringprocessRunError(TaskService taskService, ProcessTaskModel task, Throwable e) Processes error that has occurred either during node execution or transaction handling around it.voidrun(TaskService taskService, ProcessTaskModel task) Captures logs and performs actual business logic viadoRun(TaskService, ProcessTaskModel).protected StringPerforms actual processing of node business logic.protected StringWrapsrunProcessTask(ProcessTaskModel)into transaction.voidsetApplicationContext(org.springframework.context.ApplicationContext context) voidsetJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) voidsetModelService(ModelService modelService) voidsetProcessDefinitionFactory(ProcessDefinitionFactory processDefinitionFactory) voidsetProcessParameterHelper(ProcessParameterHelper processParameterHelper) voidsetSessionService(SessionService sessionService) voidsetTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate) voidsetUserService(UserService userService) voidstopLoggingCtx(TaskLoggingCtx taskCtx) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.task.TaskRunner
isLoggingSupported
-
Field Details
-
PASSTHROUGH_RUNNER
- See Also:
-
MARK_AS_DONE_ENABLED
- See Also:
-
filledUpdateTaskStatement
-
-
Constructor Details
-
ProcessengineTaskRunner
public ProcessengineTaskRunner()
-
-
Method Details
-
run
Captures logs and performs actual business logic viadoRun(TaskService, ProcessTaskModel).- Specified by:
runin interfaceTaskRunner<ProcessTaskModel>- See Also:
-
doRun
ExecutesrunProcessTask(ProcessTaskModel)viarunProcessTaskInTransaction(ProcessTaskModel)and performs error handling viaprocessRunError(TaskService, ProcessTaskModel, Throwable). -
runProcessTaskInTransaction
WrapsrunProcessTask(ProcessTaskModel)into transaction.- Throws:
NodeExecutionException- See Also:
-
runProcessTask
Performs actual processing of node business logic. Intended to be called inside a transaction.- Throws:
NodeExecutionException
-
getTableName
-
getColumnName
-
getNodeForExecution
Fetches node for execution. -
processRunError
Processes error that has occurred either during node execution or transaction handling around it. Generally switches the process into error state and delegates to optionally existing error node from process definition. -
beforeRun
-
handleError
- Specified by:
handleErrorin interfaceTaskRunner<ProcessTaskModel>
-
getProcessDefinition
-
setTransactionTemplate
public void setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate) -
setProcessDefinitionFactory
-
setProcessParameterHelper
-
setModelService
-
setUserService
-
setSessionService
-
setJdbcTemplate
public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) -
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
initLoggingCtx
- Specified by:
initLoggingCtxin interfaceTaskRunner<ProcessTaskModel>
-
stopLoggingCtx
- Specified by:
stopLoggingCtxin interfaceTaskRunner<ProcessTaskModel>
-