Class SendEmailAutomatedWorkflowTemplateJob<PROCESS extends B2BRegistrationProcessModel>
- java.lang.Object
-
- de.hybris.platform.secureportaladdon.workflows.actions.AbstractAutomatedWorkflowTemplateJob
-
- de.hybris.platform.secureportaladdon.workflows.actions.SendEmailAutomatedWorkflowTemplateJob<PROCESS>
-
- All Implemented Interfaces:
AutomatedWorkflowTemplateJob
- Direct Known Subclasses:
SendApprovedEmailAutomatedWorkflowTemplateJob,SendRejectedEmailAutomatedWorkflowTemplateJob
public class SendEmailAutomatedWorkflowTemplateJob<PROCESS extends B2BRegistrationProcessModel> extends AbstractAutomatedWorkflowTemplateJob
Automated action responsible for sending an email by launching a process
-
-
Constructor Summary
Constructors Constructor Description SendEmailAutomatedWorkflowTemplateJob()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PROCESScreateProcessModel(CustomerModel customerModel, B2BRegistrationModel registrationModel)Creates an instance ofB2BRegistrationProcessModelusing the process definition.protected java.lang.StringgenerateProcessCode(CustomerModel customerModel)Generates a new 'unique' code for the process to be launchedjava.lang.StringgetProcessDefinitionName()WorkflowDecisionModelperform(WorkflowActionModel workflowActionModel)execution method for the automated workflow jobvoidsetProcessDefinitionName(java.lang.String processDefinitionName)-
Methods inherited from class de.hybris.platform.secureportaladdon.workflows.actions.AbstractAutomatedWorkflowTemplateJob
defaultDecision, getBusinessProcessService, getCustomer, getModelOfType, getModelService, getRegistrationAttachment, getUserService, getWorkflowAttachmentService, setBusinessProcessService, setModelService, setUserService, setWorkflowAttachmentService
-
-
-
-
Method Detail
-
setProcessDefinitionName
public void setProcessDefinitionName(java.lang.String processDefinitionName)
- Parameters:
processDefinitionName- The name of the process definition that is responsible for sending an email. Processes are configured through XML files under the resource folder.
-
getProcessDefinitionName
public java.lang.String getProcessDefinitionName()
- Returns:
- the processDefinitionName
-
perform
public WorkflowDecisionModel perform(WorkflowActionModel workflowActionModel)
Description copied from interface:AutomatedWorkflowTemplateJobexecution method for the automated workflow job- Parameters:
workflowActionModel- the workflow action that activated this method- Returns:
- the decision that should be activated after this action finishes
-
createProcessModel
protected PROCESS createProcessModel(CustomerModel customerModel, B2BRegistrationModel registrationModel)
Creates an instance ofB2BRegistrationProcessModelusing the process definition.- Parameters:
customerModel- Customer dataregistrationModel- Registration data- Returns:
- An instance of
B2BRegistrationProcessModel
-
generateProcessCode
protected java.lang.String generateProcessCode(CustomerModel customerModel)
Generates a new 'unique' code for the process to be launched- Parameters:
customerModel- The customer associated to the workflow- Returns:
- A code made of the process definition name, the customer's email and a timestamp
-
-