Class AbstractAutomatedWorkflowTemplateJob
- java.lang.Object
-
- de.hybris.platform.secureportaladdon.workflows.actions.AbstractAutomatedWorkflowTemplateJob
-
- All Implemented Interfaces:
AutomatedWorkflowTemplateJob
- Direct Known Subclasses:
RegistrationApprovedAutomatedWorkflowTemplateJob
,RegistrationRejectedAutomatedWorkflowTemplateJob
,SendEmailAutomatedWorkflowTemplateJob
,SendEmailAutomatedWorkflowTemplateTestJob
public abstract class AbstractAutomatedWorkflowTemplateJob extends java.lang.Object implements AutomatedWorkflowTemplateJob
Abstract class with basic functionalities to support automated workflow actions
-
-
Constructor Summary
Constructors Constructor Description AbstractAutomatedWorkflowTemplateJob()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WorkflowDecisionModel
defaultDecision(WorkflowActionModel workflowActionModel)
Use this when there is only ONE decision from a given action! Gets the next decision and resumes the execution of the workflow UNLESS there are no more decisions in which case we return null to indicate the end of the workflowBusinessProcessService
getBusinessProcessService()
protected CustomerModel
getCustomer(B2BRegistrationModel b2bRegistrationModel)
Gets theCustomerModel
attached to the workflowprotected <T extends ItemModel>
TgetModelOfType(WorkflowActionModel workflowActionModel, java.lang.Class<T> clazz)
Gets a model of the provided class from the listModelService
getModelService()
protected B2BRegistrationModel
getRegistrationAttachment(WorkflowActionModel workflowActionModel)
Gets theB2BRegistrationModel
attached to the workflowUserService
getUserService()
WorkflowAttachmentService
getWorkflowAttachmentService()
void
setBusinessProcessService(BusinessProcessService businessProcessService)
void
setModelService(ModelService modelService)
void
setUserService(UserService userService)
void
setWorkflowAttachmentService(WorkflowAttachmentService workflowAttachmentService)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.workflow.jobs.AutomatedWorkflowTemplateJob
perform
-
-
-
-
Method Detail
-
getBusinessProcessService
public BusinessProcessService getBusinessProcessService()
- Returns:
- the businessProcessService
-
setBusinessProcessService
public void setBusinessProcessService(BusinessProcessService businessProcessService)
- Parameters:
businessProcessService
- the businessProcessService to set
-
getModelService
public ModelService getModelService()
- Returns:
- the modelService
-
setModelService
public void setModelService(ModelService modelService)
- Parameters:
modelService
- the modelService to set
-
getWorkflowAttachmentService
public WorkflowAttachmentService getWorkflowAttachmentService()
- Returns:
- the workflowAttachmentService
-
setWorkflowAttachmentService
public void setWorkflowAttachmentService(WorkflowAttachmentService workflowAttachmentService)
- Parameters:
workflowAttachmentService
- the workflowAttachmentService to set
-
getUserService
public UserService getUserService()
- Returns:
- the userService
-
setUserService
public void setUserService(UserService userService)
- Parameters:
userService
- the userService to set
-
defaultDecision
protected WorkflowDecisionModel defaultDecision(WorkflowActionModel workflowActionModel)
Use this when there is only ONE decision from a given action! Gets the next decision and resumes the execution of the workflow UNLESS there are no more decisions in which case we return null to indicate the end of the workflow- Parameters:
workflowActionModel
- The current workflow action- Returns:
- A
WorkflowDecisionModel
that indicates the default decision
-
getRegistrationAttachment
protected B2BRegistrationModel getRegistrationAttachment(WorkflowActionModel workflowActionModel)
Gets theB2BRegistrationModel
attached to the workflow- Parameters:
workflowActionModel
- The workflow action to extract the attachments from- Returns:
- The
B2BRegistrationModel
attached to workflow, or null if not found
-
getCustomer
protected CustomerModel getCustomer(B2BRegistrationModel b2bRegistrationModel)
Gets theCustomerModel
attached to the workflow- Parameters:
b2bRegistrationModel
- The registration model that holds the uid of the associated customer- Returns:
- The
CustomerModel
attached to workflow, or null if not found
-
getModelOfType
protected <T extends ItemModel> T getModelOfType(WorkflowActionModel workflowActionModel, java.lang.Class<T> clazz)
Gets a model of the provided class from the list- Parameters:
workflowActionModel
- The workflow action being executedclazz
- The item to be returned needs to be of this type- Returns:
- The first instance of the provided type, or null if not found
-
-