Package dev.dsf.bpe.v1.activity
Class AbstractServiceDelegate
java.lang.Object
dev.dsf.bpe.v1.activity.AbstractServiceDelegate
- All Implemented Interfaces:
org.camunda.bpm.engine.delegate.JavaDelegate
,org.springframework.beans.factory.InitializingBean
public abstract class AbstractServiceDelegate
extends Object
implements org.camunda.bpm.engine.delegate.JavaDelegate, org.springframework.beans.factory.InitializingBean
Abstract implementation of the
JavaDelegate
interface with added error handling and convenient access to
process execution variables with the variables parameter of the
doExecute(DelegateExecution, Variables)
method.
Configure BPMN service tasks with an implementation of type 'Java class' with the fully qualified class name of the class extending this abstract implementation.
Configure your service task implementation as a Bean
in your spring Configuration
class with scope
"prototype"
.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected abstract void
Implement this method to execute custom business logic within BPMN service tasks.final void
execute
(org.camunda.bpm.engine.delegate.DelegateExecution execution)
-
Field Details
-
api
-
-
Constructor Details
-
AbstractServiceDelegate
- Parameters:
api
- notnull
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
execute
public final void execute(org.camunda.bpm.engine.delegate.DelegateExecution execution) throws Exception - Specified by:
execute
in interfaceorg.camunda.bpm.engine.delegate.JavaDelegate
- Throws:
Exception
-
doExecute
protected abstract void doExecute(org.camunda.bpm.engine.delegate.DelegateExecution execution, Variables variables) throws org.camunda.bpm.engine.delegate.BpmnError, Exception Implement this method to execute custom business logic within BPMN service tasks.- Parameters:
execution
- Process instance information and variablesvariables
- DSF process variables- Throws:
org.camunda.bpm.engine.delegate.BpmnError
- Thrown when an error boundary event should be calledException
- Uncaught exceptions thrown by this method will result in Task status failed for all current in-progress Task resource with the exception message added as an error output. An exception (notBpmnError
) thrown by this method will also result in the process instance stopping execution and being deleted.
-