Class SendEmailAutomatedWorkflowTemplateJob<PROCESS extends B2BRegistrationProcessModel>

java.lang.Object
de.hybris.platform.b2bacceleratorservices.workflows.actions.AbstractAutomatedWorkflowTemplateJob
de.hybris.platform.b2bacceleratorservices.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 Details

    • SendEmailAutomatedWorkflowTemplateJob

      public SendEmailAutomatedWorkflowTemplateJob()
  • Method Details

    • setProcessDefinitionName

      public void setProcessDefinitionName(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 String getProcessDefinitionName()
      Returns:
      the processDefinitionName
    • perform

      public WorkflowDecisionModel perform(WorkflowActionModel workflowActionModel)
      Description copied from interface: AutomatedWorkflowTemplateJob
      execution 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 of B2BRegistrationProcessModel using the process definition.
      Parameters:
      customerModel - Customer data
      registrationModel - Registration data
      Returns:
      An instance of B2BRegistrationProcessModel
    • generateProcessCode

      protected 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