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 Details

    • AbstractAutomatedWorkflowTemplateJob

      public AbstractAutomatedWorkflowTemplateJob()
  • Method Details

    • 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 the B2BRegistrationModel 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 the CustomerModel 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, Class<T> clazz)
      Gets a model of the provided class from the list
      Parameters:
      workflowActionModel - The workflow action being executed
      clazz - The item to be returned needs to be of this type
      Returns:
      The first instance of the provided type, or null if not found