Class AbstractAutomatedWorkflowTemplateJob
java.lang.Object
de.hybris.platform.b2bacceleratorservices.workflows.actions.AbstractAutomatedWorkflowTemplateJob
- All Implemented Interfaces:
AutomatedWorkflowTemplateJob
- Direct Known Subclasses:
RegistrationApprovedAutomatedWorkflowTemplateJob,RegistrationRejectedAutomatedWorkflowTemplateJob,SendEmailAutomatedWorkflowTemplateJob,SendEmailAutomatedWorkflowTemplateTestJob
public abstract class AbstractAutomatedWorkflowTemplateJob
extends Object
implements AutomatedWorkflowTemplateJob
Abstract class with basic functionalities to support automated workflow actions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected WorkflowDecisionModeldefaultDecision(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 workflowprotected CustomerModelgetCustomer(B2BRegistrationModel b2bRegistrationModel) Gets theCustomerModelattached to the workflowprotected <T extends ItemModel>
TgetModelOfType(WorkflowActionModel workflowActionModel, Class<T> clazz) Gets a model of the provided class from the listprotected B2BRegistrationModelgetRegistrationAttachment(WorkflowActionModel workflowActionModel) Gets theB2BRegistrationModelattached to the workflowvoidsetBusinessProcessService(BusinessProcessService businessProcessService) voidsetModelService(ModelService modelService) voidsetUserService(UserService userService) voidsetWorkflowAttachmentService(WorkflowAttachmentService workflowAttachmentService) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.workflow.jobs.AutomatedWorkflowTemplateJob
perform
-
Constructor Details
-
AbstractAutomatedWorkflowTemplateJob
public AbstractAutomatedWorkflowTemplateJob()
-
-
Method Details
-
getBusinessProcessService
- Returns:
- the businessProcessService
-
setBusinessProcessService
- Parameters:
businessProcessService- the businessProcessService to set
-
getModelService
- Returns:
- the modelService
-
setModelService
- Parameters:
modelService- the modelService to set
-
getWorkflowAttachmentService
- Returns:
- the workflowAttachmentService
-
setWorkflowAttachmentService
- Parameters:
workflowAttachmentService- the workflowAttachmentService to set
-
getUserService
- Returns:
- the userService
-
setUserService
- Parameters:
userService- the userService to set
-
defaultDecision
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
WorkflowDecisionModelthat indicates the default decision
-
getRegistrationAttachment
Gets theB2BRegistrationModelattached to the workflow- Parameters:
workflowActionModel- The workflow action to extract the attachments from- Returns:
- The
B2BRegistrationModelattached to workflow, or null if not found
-
getCustomer
Gets theCustomerModelattached to the workflow- Parameters:
b2bRegistrationModel- The registration model that holds the uid of the associated customer- Returns:
- The
CustomerModelattached to workflow, or null if not found
-
getModelOfType
protected <T extends ItemModel> T getModelOfType(WorkflowActionModel workflowActionModel, 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
-