Package de.hybris.platform.b2b.services
Interface B2BWorkflowIntegrationService
- All Known Implementing Classes:
DefaultB2BWorkflowIntegrationService
public interface B2BWorkflowIntegrationService
A integration service for workflow and process engine.
- Spring Bean ID:
- b2bWorkflowIntegrationService
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe Enum ACTIONCODES.static enumThe Enum DECISIONCODES. -
Method Summary
Modifier and TypeMethodDescriptionvoidapproveWorkflowAction(WorkflowActionModel workflowActionModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.createWorkflow(WorkflowTemplateModel template, List<? extends ItemModel> attachments) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.createWorkflowTemplate(List<? extends UserModel> users, String code, String description, WorkflowTemplateType templateType) This will create a WorkflowTemplateModel if one does not existvoiddecideAction(WorkflowActionModel workflowActionModel, String decisionQualifier) Makes a decision on an action based on the qualifier (The qualifier is used to look up a decision with its code build fromAbstractWorkflowActionModel.CODE_decisionQualifier)generateWorkflowTemplateCode(String prefix, List<? extends UserModel> users) Generates a list of appended prefix_PrincipalModel.UIDgetActionForCode(String code) Get WorkflowAction for its code.getOrderFromAction(WorkflowActionModel workflowActionModel) Gets the associated order to the WorkflowActionModel qualifier.getStartWorkflowActions(WorkflowModel workflow) Gets all WorkFlowActions that are ofWorkflowActionType.STARTtype.getWorkflowActionsForActionStatusAndUser(WorkflowActionStatus status, String qualifier, UserModel user) Gets all WorkflowActions by user, workflowActionStatus (eg IN_PROGRESS) and qualifier (eg APPROVAL)Gets a collection of workflow actions for a usergetWorkflowForOrder(OrderModel order) Get the Workflow for an Order.Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.voidrejectWorkflowAction(WorkflowActionModel workflowActionModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.voidstartWorkflow(WorkflowModel workflowModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.
-
Method Details
-
getStartWorkflowActions
Gets all WorkFlowActions that are ofWorkflowActionType.STARTtype.- Parameters:
workflow- the WorkflowModel- Returns:
- a list of WorkflowActionModels
-
getWorkflowTemplateForCode
@Deprecated(since="4.4", forRemoval=true) WorkflowTemplateModel getWorkflowTemplateForCode(String code) Deprecated, for removal: This API element is subject to removal in a future version.Gets the WorkflowTemplateModel based on the code.- Parameters:
code- the WorkflowActionType code- Returns:
- WorkflowTemplateModel
-
createWorkflowTemplate
WorkflowTemplateModel createWorkflowTemplate(List<? extends UserModel> users, String code, String description, WorkflowTemplateType templateType) This will create a WorkflowTemplateModel if one does not exist- Parameters:
users- the approvers that a work flow template will be created forcode- the code of the templatedescription- the short description for the templatetemplateType- the strategy type of the template- Returns:
- newly created WorkflowTemplateModel
-
generateWorkflowTemplateCode
Generates a list of appended prefix_PrincipalModel.UID- Parameters:
prefix- theStringto which the user id is appended tousers- the list of users in which the template code will be generated for- Returns:
- the template code of appended values
-
createWorkflow
@Deprecated(since="4.4", forRemoval=true) WorkflowModel createWorkflow(WorkflowTemplateModel template, List<? extends ItemModel> attachments) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
template- the workflow templateattachments- the workflow attachments- Returns:
- the workflow
-
startWorkflow
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
workflowModel-
-
getWorkflowActionsForActionStatusAndUser
Collection<WorkflowActionModel> getWorkflowActionsForActionStatusAndUser(WorkflowActionStatus status, String qualifier, UserModel user) Gets all WorkflowActions by user, workflowActionStatus (eg IN_PROGRESS) and qualifier (eg APPROVAL)- Parameters:
status- the work flow action statusqualifier- the qualifier (eg APPROVAL)user- the user- Returns:
- WorkflowActionModel the set of work flow actions
-
getOrderFromAction
Gets the associated order to the WorkflowActionModel qualifier. The qualifier's attachment of type B2BApprovalProcessModel will have the associated order.- Parameters:
workflowActionModel- the work flow action- Returns:
- the order associated to the attachment
-
rejectWorkflowAction
@Deprecated(since="4.4", forRemoval=true) void rejectWorkflowAction(WorkflowActionModel workflowActionModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsedecideAction(de.hybris.platform.workflow.model.WorkflowActionModel, String)decideAction(action, DECISIONCODES.REJECT.name())- Parameters:
workflowActionModel-
-
approveWorkflowAction
@Deprecated(since="4.4", forRemoval=true) void approveWorkflowAction(WorkflowActionModel workflowActionModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsedecideAction(de.hybris.platform.workflow.model.WorkflowActionModel, String)decideAction(action, DECISIONCODES.APPROVE.name())- Parameters:
workflowActionModel-
-
getActionForCode
Get WorkflowAction for its code.- Parameters:
code- the WorkflowAction's code- Returns:
- WorkflowActionModel
-
getWorkflowForOrder
Get the Workflow for an Order.- Parameters:
order- the order- Returns:
- WorkflowModel
-
decideAction
Makes a decision on an action based on the qualifier (The qualifier is used to look up a decision with its code build fromAbstractWorkflowActionModel.CODE_decisionQualifier)- Parameters:
workflowActionModel- The action to make a decision upondecisionQualifier- a qualifier based onB2BWorkflowIntegrationService.DECISIONCODESenumeration
-
getWorkflowActionsForUser
Gets a collection of workflow actions for a user- Parameters:
user- the user- Returns:
- the
CollectionofWorkflowActionModel
-