Package de.hybris.platform.b2b.services
Interface B2BWorkflowIntegrationService
-
- All Known Implementing Classes:
DefaultB2BWorkflowIntegrationService
public interface B2BWorkflowIntegrationServiceA integration service for workflow and process engine.- Spring Bean ID:
- b2bWorkflowIntegrationService
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classB2BWorkflowIntegrationService.ACTIONCODESThe Enum ACTIONCODES.static classB2BWorkflowIntegrationService.DECISIONCODESThe Enum DECISIONCODES.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidapproveWorkflowAction(WorkflowActionModel workflowActionModel)Deprecated.Since 4.4.WorkflowModelcreateWorkflow(WorkflowTemplateModel template, java.util.List<? extends ItemModel> attachments)Deprecated.Since 4.4.WorkflowTemplateModelcreateWorkflowTemplate(java.util.List<? extends UserModel> users, java.lang.String code, java.lang.String description, WorkflowTemplateType templateType)This will create a WorkflowTemplateModel if one does not existvoiddecideAction(WorkflowActionModel workflowActionModel, java.lang.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)java.util.Collection<WorkflowActionModel>findByActionStatusAndUser(WorkflowActionStatus status, java.lang.String qualifier, UserModel user)Deprecated.As of hybris 4.4, replaced bygetWorkflowActionsForActionStatusAndUser(WorkflowActionStatus, String, UserModel)WorkflowModelfindWorkflowForOrder(OrderModel order)Deprecated.As of hybris 4.4, replaced bygetWorkflowForOrder(OrderModel)java.lang.StringgenerateWorkflowTemplateCode(java.lang.String prefix, java.util.List<? extends UserModel> users)Generates a list of appended prefix_PrincipalModel.UIDWorkflowActionModelgetActionByCode(java.lang.String code)Deprecated.As of hybris 4.4, replaced bygetActionForCode(String)WorkflowActionModelgetActionForCode(java.lang.String code)Get WorkflowAction for its code.OrderModelgetOrderFromAction(WorkflowActionModel workflowActionModel)Gets the associated order to the WorkflowActionModel qualifier.java.util.Collection<WorkflowActionModel>getStartWorkflowActions(WorkflowModel workflow)Gets all WorkFlowActions that are ofWorkflowActionType.STARTtype.java.util.Collection<WorkflowActionModel>getWorkflowActionsForActionStatusAndUser(WorkflowActionStatus status, java.lang.String qualifier, UserModel user)Gets all WorkflowActions by user, workflowActionStatus (eg IN_PROGRESS) and qualifier (eg APPROVAL)java.util.Collection<WorkflowActionModel>getWorkflowActionsForUser(UserModel user)Gets a collection of workflow actions for a userWorkflowModelgetWorkflowForOrder(OrderModel order)Get the Workflow for an Order.WorkflowTemplateModelgetWorkflowTemplateForCode(java.lang.String code)Deprecated.Since 4.4.voidrejectWorkflowAction(WorkflowActionModel workflowActionModel)Deprecated.Since 4.4.voidstartWorkflow(WorkflowModel workflowModel)Deprecated.Since 4.4.
-
-
-
Method Detail
-
getStartWorkflowActions
java.util.Collection<WorkflowActionModel> getStartWorkflowActions(WorkflowModel workflow)
Gets all WorkFlowActions that are ofWorkflowActionType.STARTtype.- Parameters:
workflow- the WorkflowModel- Returns:
- a list of WorkflowActionModels
-
getWorkflowTemplateForCode
@Deprecated(since="4.4") WorkflowTemplateModel getWorkflowTemplateForCode(java.lang.String code)
Deprecated.Gets the WorkflowTemplateModel based on the code.- Parameters:
code- the WorkflowActionType code- Returns:
- WorkflowTemplateModel
-
createWorkflowTemplate
WorkflowTemplateModel createWorkflowTemplate(java.util.List<? extends UserModel> users, java.lang.String code, java.lang.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
java.lang.String generateWorkflowTemplateCode(java.lang.String prefix, java.util.List<? extends UserModel> users)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") WorkflowModel createWorkflow(WorkflowTemplateModel template, java.util.List<? extends ItemModel> attachments)
Deprecated.- Parameters:
template- the workflow templateattachments- the workflow attachments- Returns:
- the workflow
-
startWorkflow
@Deprecated(since="4.4") void startWorkflow(WorkflowModel workflowModel)
Deprecated.- Parameters:
workflowModel-
-
findByActionStatusAndUser
@Deprecated(since="4.4") java.util.Collection<WorkflowActionModel> findByActionStatusAndUser(WorkflowActionStatus status, java.lang.String qualifier, UserModel user)
Deprecated.As of hybris 4.4, replaced bygetWorkflowActionsForActionStatusAndUser(WorkflowActionStatus, String, UserModel)- Parameters:
status- the action statusqualifier- the qualifieruser- the assigned user- Returns:
- the
Collectionof {WorkflowActionModel}
-
getWorkflowActionsForActionStatusAndUser
java.util.Collection<WorkflowActionModel> getWorkflowActionsForActionStatusAndUser(WorkflowActionStatus status, java.lang.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
OrderModel getOrderFromAction(WorkflowActionModel workflowActionModel)
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") void rejectWorkflowAction(WorkflowActionModel workflowActionModel)
Deprecated.Since 4.4. UsedecideAction(de.hybris.platform.workflow.model.WorkflowActionModel, String)decideAction(action, DECISIONCODES.REJECT.name())- Parameters:
workflowActionModel-
-
approveWorkflowAction
@Deprecated(since="4.4") void approveWorkflowAction(WorkflowActionModel workflowActionModel)
Deprecated.Since 4.4. UsedecideAction(de.hybris.platform.workflow.model.WorkflowActionModel, String)decideAction(action, DECISIONCODES.APPROVE.name())- Parameters:
workflowActionModel-
-
getActionByCode
@Deprecated(since="4.4") WorkflowActionModel getActionByCode(java.lang.String code)
Deprecated.As of hybris 4.4, replaced bygetActionForCode(String)- Parameters:
code- the action code- Returns:
- the workflow action
-
getActionForCode
WorkflowActionModel getActionForCode(java.lang.String code)
Get WorkflowAction for its code.- Parameters:
code- the WorkflowAction's code- Returns:
- WorkflowActionModel
-
findWorkflowForOrder
@Deprecated(since="4.4") WorkflowModel findWorkflowForOrder(OrderModel order)
Deprecated.As of hybris 4.4, replaced bygetWorkflowForOrder(OrderModel)- Parameters:
order- the order for which to find the workflow- Returns:
- the order
WorkflowModel
-
getWorkflowForOrder
WorkflowModel getWorkflowForOrder(OrderModel order)
Get the Workflow for an Order.- Parameters:
order- the order- Returns:
- WorkflowModel
-
decideAction
void decideAction(WorkflowActionModel workflowActionModel, java.lang.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)- Parameters:
workflowActionModel- The action to make a decision upondecisionQualifier- a qualifier based onB2BWorkflowIntegrationService.DECISIONCODESenumeration
-
getWorkflowActionsForUser
java.util.Collection<WorkflowActionModel> getWorkflowActionsForUser(UserModel user)
Gets a collection of workflow actions for a user- Parameters:
user- the user- Returns:
- the
CollectionofWorkflowActionModel
-
-