Class DefaultCoreWorkflowFacade
java.lang.Object
com.hybris.backoffice.workflow.impl.DefaultCoreWorkflowFacade
- All Implemented Interfaces:
CoreWorkflowFacade
- Direct Known Subclasses:
DefaultWorkflowFacade
Default implementation of facade to handle core workflow functionality (independent of the web context)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddItems(WorkflowModel workflow, List<? extends ItemModel> itemsToAdd) Adds items to workflow as an attachmentbooleancanBeStarted(WorkflowModel workflow) Tells if workflow can be started - has assigned users to all actions etc.intcountDecisions(WorkflowModel workflowModel) Counts all decisions to make in all actions of the workflow.createWorkflow(String name, WorkflowTemplateModel template, List<ItemModel> itemsToAdd, UserModel owner) Creates an instance ofWorkflowModelwith given name, template, attached items and user.Gets adHoc workflow template defined for the system.getCurrentTasks(WorkflowModel workflowModel) Gets all WorkflowAction items with statusWorkflowActionStatus.IN_PROGRESS.getWorkflowStartTime(WorkflowModel workflow) Returns start time of given workflow.getWorkflowStatus(WorkflowModel workflowModel) ChecksWorkflowStatusof workflow modelLoadsWorkflowTemplateModelby given code.booleanisAdHocTemplate(WorkflowTemplateModel template) Tells is given template is adHocTemplateWorkflowService.isAdhocWorkflow(WorkflowModel).booleanisCorrectAdHocAssignee(PrincipalModel adHocAssignedUser) Tells if given principal can be assigned to a adHoc template.voidremoveItems(WorkflowModel workflow, List<WorkflowItemAttachmentModel> itemsToRemove) Removes attachments from a workflowvoidsetWorkflowAttachmentService(WorkflowAttachmentService workflowAttachmentService) voidsetWorkflowProcessingService(WorkflowProcessingService workflowProcessingService) voidsetWorkflowService(WorkflowService workflowService) voidsetWorkflowTemplateService(WorkflowTemplateService workflowTemplateService) booleanstartWorkflow(WorkflowModel workflow) Starts given workflowbooleanterminateWorkflow(WorkflowModel workflow) Terminates given workflow
-
Constructor Details
-
DefaultCoreWorkflowFacade
public DefaultCoreWorkflowFacade()
-
-
Method Details
-
addItems
public List<WorkflowItemAttachmentModel> addItems(WorkflowModel workflow, List<? extends ItemModel> itemsToAdd) Description copied from interface:CoreWorkflowFacadeAdds items to workflow as an attachment- Specified by:
addItemsin interfaceCoreWorkflowFacade- Parameters:
workflow- to which items should be addeditemsToAdd- items to add- Returns:
- attachments
-
removeItems
Description copied from interface:CoreWorkflowFacadeRemoves attachments from a workflow- Specified by:
removeItemsin interfaceCoreWorkflowFacade- Parameters:
workflow-WorkflowModelwhich contains given attachmentsitemsToRemove-WorkflowItemAttachmentModels to remove
-
getWorkflowTemplateForCode
Description copied from interface:CoreWorkflowFacadeLoadsWorkflowTemplateModelby given code.- Specified by:
getWorkflowTemplateForCodein interfaceCoreWorkflowFacade- Parameters:
code- code of theWorkflowTemplateModelto be loaded- Returns:
WorkflowTemplateModelinstance or null if the implementation cannot find appropriateWorkflowTemplateModel
-
getAdHocWorkflowTemplate
Description copied from interface:CoreWorkflowFacadeGets adHoc workflow template defined for the system.WorkflowTemplateService.getAdhocWorkflowTemplate()- Specified by:
getAdHocWorkflowTemplatein interfaceCoreWorkflowFacade- Returns:
- adHoc workflow template.
-
createWorkflow
public WorkflowModel createWorkflow(String name, WorkflowTemplateModel template, List<ItemModel> itemsToAdd, UserModel owner) Description copied from interface:CoreWorkflowFacadeCreates an instance ofWorkflowModelwith given name, template, attached items and user.- Specified by:
createWorkflowin interfaceCoreWorkflowFacade- Parameters:
name- name of the workflowtemplate-WorkflowTemplateModelto be useditemsToAdd- item to be added to the workflowowner- owner of the workflow- Returns:
WorkflowModelbased on the given arguments
-
startWorkflow
Description copied from interface:CoreWorkflowFacadeStarts given workflow- Specified by:
startWorkflowin interfaceCoreWorkflowFacade- Parameters:
workflow- workflow to start- Returns:
- true if workflow has been started.
-
canBeStarted
Description copied from interface:CoreWorkflowFacadeTells if workflow can be started - has assigned users to all actions etc.WorkflowService.canBeStarted(WorkflowModel)- Specified by:
canBeStartedin interfaceCoreWorkflowFacade- Parameters:
workflow- workflow to be started- Returns:
- true if workflow can be started.
-
isAdHocTemplate
Description copied from interface:CoreWorkflowFacadeTells is given template is adHocTemplateWorkflowService.isAdhocWorkflow(WorkflowModel).- Specified by:
isAdHocTemplatein interfaceCoreWorkflowFacade- Parameters:
template- template to be checked.- Returns:
- true if the template is adHocTemplate.
-
isCorrectAdHocAssignee
Description copied from interface:CoreWorkflowFacadeTells if given principal can be assigned to a adHoc template. It cannot beWorkflowTemplateService.getAdhocWorkflowTemplateDummyOwner()- Specified by:
isCorrectAdHocAssigneein interfaceCoreWorkflowFacade- Parameters:
adHocAssignedUser- user to be verified if can be assigned to an adHoc template- Returns:
- true if given principal can be assigned to an adHoc template.
-
getWorkflowStatus
Description copied from interface:CoreWorkflowFacadeChecksWorkflowStatusof workflow model- Specified by:
getWorkflowStatusin interfaceCoreWorkflowFacade- Parameters:
workflowModel- model of workflow- Returns:
- status of workflow or
nullif it was impossible to determine
-
terminateWorkflow
Description copied from interface:CoreWorkflowFacadeTerminates given workflow- Specified by:
terminateWorkflowin interfaceCoreWorkflowFacade- Parameters:
workflow- workflow to terminate- Returns:
- true if workflow has been terminated.
-
getCurrentTasks
Description copied from interface:CoreWorkflowFacadeGets all WorkflowAction items with statusWorkflowActionStatus.IN_PROGRESS.- Specified by:
getCurrentTasksin interfaceCoreWorkflowFacade- Parameters:
workflowModel- workflow to check.- Returns:
- all WorkflowAction items in progress.
-
countDecisions
Description copied from interface:CoreWorkflowFacadeCounts all decisions to make in all actions of the workflow.- Specified by:
countDecisionsin interfaceCoreWorkflowFacade- Parameters:
workflowModel- workflow to check.- Returns:
- all decisions to make in all actions of the workflow
-
getWorkflowStartTime
Description copied from interface:CoreWorkflowFacadeReturns start time of given workflow.- Specified by:
getWorkflowStartTimein interfaceCoreWorkflowFacade- Parameters:
workflow- workflow to check.- Returns:
- start time of given workflow.
-
getWorkflowAttachmentService
-
setWorkflowAttachmentService
-
getWorkflowTemplateService
-
setWorkflowTemplateService
-
getWorkflowService
-
setWorkflowService
-
getWorkflowProcessingService
-
setWorkflowProcessingService
-