Package dev.dsf.bpe.v1.activity
Class DefaultUserTaskListener
java.lang.Object
dev.dsf.bpe.v1.activity.DefaultUserTaskListener
- All Implemented Interfaces:
org.camunda.bpm.engine.delegate.TaskListener,org.springframework.beans.factory.InitializingBean
public class DefaultUserTaskListener
extends Object
implements org.camunda.bpm.engine.delegate.TaskListener, org.springframework.beans.factory.InitializingBean
Default
TaskListener implementation. This listener will be added to user tasks if no other
TaskListener is defined for the 'create' event type.
BPMN user tasks need to define the form to be used with type 'Embedded or External Task Forms' and the canonical URL
of the a Questionnaire resource as the form key.
To modify the behavior of the listener, for example to set default values in the created 'in-progress'
QuestionnaireResponse, extend this class, register it as a prototype Bean and specify the class name
as a task listener with event type 'create' in the BPMN.
-
Field Summary
Fields inherited from interface org.camunda.bpm.engine.delegate.TaskListener
EVENTNAME_ASSIGNMENT, EVENTNAME_COMPLETE, EVENTNAME_CREATE, EVENTNAME_DELETE, EVENTNAME_TIMEOUT, EVENTNAME_UPDATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidafterQuestionnaireResponseCreate(org.camunda.bpm.engine.delegate.DelegateTask userTask, org.hl7.fhir.r4.model.QuestionnaireResponse afterCreate) Override this method to execute code after theQuestionnaireResponseresource has been created on the DSF FHIR serverprotected voidbeforeQuestionnaireResponseCreate(org.camunda.bpm.engine.delegate.DelegateTask userTask, org.hl7.fhir.r4.model.QuestionnaireResponse beforeCreate) Override this method to modify theQuestionnaireResponsebefore it will be created in stateQuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESSon the DSF FHIR serverfinal voidnotify(org.camunda.bpm.engine.delegate.DelegateTask userTask)
-
Constructor Details
-
DefaultUserTaskListener
- Parameters:
api- notnull
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
notify
public final void notify(org.camunda.bpm.engine.delegate.DelegateTask userTask) - Specified by:
notifyin interfaceorg.camunda.bpm.engine.delegate.TaskListener
-
beforeQuestionnaireResponseCreate
protected void beforeQuestionnaireResponseCreate(org.camunda.bpm.engine.delegate.DelegateTask userTask, org.hl7.fhir.r4.model.QuestionnaireResponse beforeCreate) Override this method to modify theQuestionnaireResponsebefore it will be created in stateQuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESSon the DSF FHIR server- Parameters:
userTask- notnull, user task on which thisQuestionnaireResponseis basedbeforeCreate- notnull, containing an answer placeholder for every item in the correspondingQuestionnaire
-
afterQuestionnaireResponseCreate
protected void afterQuestionnaireResponseCreate(org.camunda.bpm.engine.delegate.DelegateTask userTask, org.hl7.fhir.r4.model.QuestionnaireResponse afterCreate) Override this method to execute code after theQuestionnaireResponseresource has been created on the DSF FHIR server- Parameters:
userTask- notnull, user task on which thisQuestionnaireResponseis basedafterCreate- notnull, created on the DSF FHIR server
-