Class DefaultOmsWorkflowFacade
- java.lang.Object
-
- de.hybris.platform.ordermanagementfacades.workflow.impl.DefaultOmsWorkflowFacade
-
- All Implemented Interfaces:
OmsWorkflowFacade
public class DefaultOmsWorkflowFacade extends java.lang.Object implements OmsWorkflowFacade
Default implementation forOmsWorkflowFacade
-
-
Constructor Summary
Constructors Constructor Description DefaultOmsWorkflowFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WorkflowModelcreateAndStartWorkflow(ItemModel item, java.lang.String workflowName, java.lang.String workflowTemplateCode, java.lang.String userGroupUid)Creates and starts a workflow with the given template for the givenItemModel.voiddecideAction(java.lang.String workflowCode, java.lang.String workflowDecisionCode)Decides theWorkflowActionModelwith the providedAbstractWorkflowDecisionModel.NAMEvoiddecideActions(WorkflowCodesDataList workflowCodes, java.lang.String workflowDecisionCode)Decides a list of workflows containing actions with the provided workflow decision nameprotected ModelServicegetModelService()protected UserGroupModelgetUserGroupModel(java.lang.String userGroupUid)Resolves the given group's uid to theUserGroupModelprotected UserServicegetUserService()protected Converter<WorkflowActionModel,WorkflowActionData>getWorkflowActionConverter()java.util.List<WorkflowActionData>getWorkflowActions()API to get all active workflow actions for the current user in the systemprotected WorkflowActionServicegetWorkflowActionService()protected Converter<WorkflowModel,WorkflowData>getWorkflowConverter()protected WorkflowProcessingServicegetWorkflowProcessingService()protected WorkflowServicegetWorkflowService()protected WorkflowTemplateServicegetWorkflowTemplateService()voidsetModelService(ModelService modelService)voidsetUserService(UserService userService)voidsetWorkflowActionConverter(Converter<WorkflowActionModel,WorkflowActionData> workflowActionConverter)voidsetWorkflowActionService(WorkflowActionService workflowActionService)voidsetWorkflowConverter(Converter<WorkflowModel,WorkflowData> workflowConverter)voidsetWorkflowProcessingService(WorkflowProcessingService workflowProcessingService)voidsetWorkflowService(WorkflowService workflowService)voidsetWorkflowTemplateService(WorkflowTemplateService workflowTemplateService)WorkflowDatastartErrorRecoveryWorkflow(ItemModel item, java.lang.String workflowName, java.lang.String workflowTemplateCode, java.lang.String userGroupUid, java.lang.String errorType, java.lang.String errorDescription)Creates and starts an error recovery workflow with the given template for the givenItemModel.WorkflowDatastartWorkflow(ItemModel item, java.lang.String workflowName, java.lang.String workflowTemplateCode, java.lang.String userGroupUid)Creates and starts a workflow with the given template for the givenItemModel.
-
-
-
Method Detail
-
startErrorRecoveryWorkflow
public WorkflowData startErrorRecoveryWorkflow(ItemModel item, java.lang.String workflowName, java.lang.String workflowTemplateCode, java.lang.String userGroupUid, java.lang.String errorType, java.lang.String errorDescription)
Description copied from interface:OmsWorkflowFacadeCreates and starts an error recovery workflow with the given template for the givenItemModel.- Specified by:
startErrorRecoveryWorkflowin interfaceOmsWorkflowFacade- Parameters:
item- theItemModelfor which to start the workflowworkflowName- name given to the workflow at creation timeworkflowTemplateCode- template code of the workflow to be starteduserGroupUid- the uid of the group to be assigned to the workflow actionserrorType- the type of the error. ThisStringwill be persisted inside of the created workflowerrorDescription- the description of the error. ThisStringwill be persisted inside of the created workflow- Returns:
- instance of created
WorkflowData
-
startWorkflow
public WorkflowData startWorkflow(ItemModel item, java.lang.String workflowName, java.lang.String workflowTemplateCode, java.lang.String userGroupUid)
Description copied from interface:OmsWorkflowFacadeCreates and starts a workflow with the given template for the givenItemModel.- Specified by:
startWorkflowin interfaceOmsWorkflowFacade- Parameters:
item- theItemModelfor which to start the workflowworkflowName- name given to the workflow at creation timeworkflowTemplateCode- template code of the workflow to be starteduserGroupUid- the uid of the group to be assigned to the workflow actions- Returns:
- instance of created
WorkflowData
-
getWorkflowActions
public java.util.List<WorkflowActionData> getWorkflowActions()
Description copied from interface:OmsWorkflowFacadeAPI to get all active workflow actions for the current user in the system- Specified by:
getWorkflowActionsin interfaceOmsWorkflowFacade- Returns:
- a list of
WorkflowActionData
-
decideAction
public void decideAction(java.lang.String workflowCode, java.lang.String workflowDecisionCode)Description copied from interface:OmsWorkflowFacadeDecides theWorkflowActionModelwith the providedAbstractWorkflowDecisionModel.NAME- Specified by:
decideActionin interfaceOmsWorkflowFacade- Parameters:
workflowCode- theCronJobModel.CODEwhich the action belongs toworkflowDecisionCode- the decision to take on the action
-
decideActions
public void decideActions(WorkflowCodesDataList workflowCodes, java.lang.String workflowDecisionCode)
Description copied from interface:OmsWorkflowFacadeDecides a list of workflows containing actions with the provided workflow decision name- Specified by:
decideActionsin interfaceOmsWorkflowFacade- Parameters:
workflowCodes- the WorkflowCodesDataList containing a list of workflow codes which the actions belong toworkflowDecisionCode- the decision to take on the actions
-
createAndStartWorkflow
protected WorkflowModel createAndStartWorkflow(ItemModel item, java.lang.String workflowName, java.lang.String workflowTemplateCode, java.lang.String userGroupUid)
Creates and starts a workflow with the given template for the givenItemModel.- Parameters:
item- theItemModelfor which to start the workflowworkflowName- name given to the workflow at creation timeworkflowTemplateCode- template code of the workflow to be starteduserGroupUid- the uid of the group to be assigned to the workflow actions- Returns:
- instance of created
WorkflowModel
-
getUserGroupModel
protected UserGroupModel getUserGroupModel(java.lang.String userGroupUid)
Resolves the given group's uid to theUserGroupModel- Parameters:
userGroupUid- the group's uid. If empty or null the method will return admin user group- Returns:
- instance of
UserGroupModel
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getWorkflowService
protected WorkflowService getWorkflowService()
-
setWorkflowService
public void setWorkflowService(WorkflowService workflowService)
-
getWorkflowTemplateService
protected WorkflowTemplateService getWorkflowTemplateService()
-
setWorkflowTemplateService
public void setWorkflowTemplateService(WorkflowTemplateService workflowTemplateService)
-
getWorkflowProcessingService
protected WorkflowProcessingService getWorkflowProcessingService()
-
setWorkflowProcessingService
public void setWorkflowProcessingService(WorkflowProcessingService workflowProcessingService)
-
getWorkflowActionService
protected WorkflowActionService getWorkflowActionService()
-
setWorkflowActionService
public void setWorkflowActionService(WorkflowActionService workflowActionService)
-
getUserService
protected UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getWorkflowConverter
protected Converter<WorkflowModel,WorkflowData> getWorkflowConverter()
-
setWorkflowConverter
public void setWorkflowConverter(Converter<WorkflowModel,WorkflowData> workflowConverter)
-
getWorkflowActionConverter
protected Converter<WorkflowActionModel,WorkflowActionData> getWorkflowActionConverter()
-
setWorkflowActionConverter
public void setWorkflowActionConverter(Converter<WorkflowActionModel,WorkflowActionData> workflowActionConverter)
-
-