Class WorkflowTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTransactionalBaseTest
de.hybris.platform.workflow.integration.WorkflowTest
- All Implemented Interfaces:
JaloSessionHolder
- Direct Known Subclasses:
WorkflowAutomatedTest,WorkflowBasicTest,WorkflowIterationTest
Test for extension Workflow.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumprotected static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CatalogVersionServiceprotected FlexibleSearchServiceprotected ModelServiceprotected CatalogVersionModelprotected WorkflowTemplateModelTemplate instance created at each set up.protected UserModelprotected WorkflowModelworkflow instance created at each set up.protected TypeServiceprotected UserServiceprotected WorkflowActionServiceprotected WorkflowAttachmentServiceprotected WorkflowProcessingServiceprotected WorkflowServiceReference to the manager instance.Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected AutomatedWorkflowActionTemplateModelcreateAutomatedWorkflowActionTemplateModel(UserModel user, String code, WorkflowActionType actionType, WorkflowTemplateModel workflow, Class jobClass) Creates new automated action template.protected UserModelcreateUser(String userName) Creates a user instance using given uid.protected WorkflowActionTemplateModelcreateWorkflowActionTemplateModel(UserModel user, String code, WorkflowActionType actionType, WorkflowTemplateModel workflow) Creates new action template.protected voidcreateWorkflowActionTemplateModelLinkTemplateRelation(WorkflowDecisionTemplateModel decisionTemplate, WorkflowActionTemplateModel toAction, Boolean hasAndConnection) protected WorkflowDecisionTemplateModelcreateWorkflowDecisionTemplate(String code, WorkflowActionTemplateModel actionTemplate) Creates new decision template.protected WorkflowTemplateModelCreates a workflow template with given user assigned.protected WorkflowTemplateModelcreateWorkflowTemplate(UserModel owner, String code, String desc) Creates new workflow template using given user, code, and description.protected WorkflowTemplateModelcreateWorkflowTemplate(UserModel owner, String code, String desc, String activationScript) Creates new workflow template using given user, code, description and activation script.protected WorkflowActionModelGets the action with given code from test workflow instance.protected WorkflowActionTemplateModelgetActionTemplate(String code) Gets the action template with given code from test workflow template.protected WorkflowDecisionModelgetDecision(String code, WorkflowActionModel action) Gets the decision with given code from test workflow instance.voidsetUp()voidcheck actions sizevoidcheck actions template sizeMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getApplicationContext, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Field Details
-
workflowService
Reference to the manager instance. -
modelService
-
userService
-
typeService
-
flexibleSearchService
-
catalogVersionService
-
workflowActionService
-
workflowProcessingService
-
workflowAttachmentService
-
testTemplate
Template instance created at each set up. -
testWorkflow
workflow instance created at each set up. -
testCatalogVersion
-
testUser
-
-
Constructor Details
-
WorkflowTest
public WorkflowTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testTemplateActionsSize
public void testTemplateActionsSize()check actions template size -
testActionsSize
public void testActionsSize()check actions size -
createWorkflowTemplate
Creates a workflow template with given user assigned.- Parameters:
user- user instance to use for template- Returns:
- new created template instance
-
createUser
Creates a user instance using given uid.- Parameters:
userName- user id used for user creation- Returns:
- created user
-
clearCache
protected void clearCache() -
createWorkflowTemplate
Creates new workflow template using given user, code, and description.- Parameters:
owner- user assigned to new templatecode- code of new templatedesc- description assigned to template- Returns:
- created template
-
createWorkflowTemplate
protected WorkflowTemplateModel createWorkflowTemplate(UserModel owner, String code, String desc, String activationScript) Creates new workflow template using given user, code, description and activation script.- Parameters:
owner- user assigned to new templatecode- code of new templatedesc- description assigned to templateactivationScript- code of the activation script- Returns:
- created template
-
createWorkflowActionTemplateModel
protected WorkflowActionTemplateModel createWorkflowActionTemplateModel(UserModel user, String code, WorkflowActionType actionType, WorkflowTemplateModel workflow) Creates new action template.- Parameters:
user- user assigned to templatecode- code of templateworkflow- workflow assigned to action template- Returns:
- created action template
-
createAutomatedWorkflowActionTemplateModel
protected AutomatedWorkflowActionTemplateModel createAutomatedWorkflowActionTemplateModel(UserModel user, String code, WorkflowActionType actionType, WorkflowTemplateModel workflow, Class jobClass) Creates new automated action template.- Parameters:
user- user assigned to templatecode- code of templateworkflow- workflow assigned to action template- Returns:
- created action template
-
createWorkflowDecisionTemplate
protected WorkflowDecisionTemplateModel createWorkflowDecisionTemplate(String code, WorkflowActionTemplateModel actionTemplate) Creates new decision template.- Parameters:
code- code of templateactionTemplate- action template assigned to decision template- Returns:
- created decision template
-
createWorkflowActionTemplateModelLinkTemplateRelation
protected void createWorkflowActionTemplateModelLinkTemplateRelation(WorkflowDecisionTemplateModel decisionTemplate, WorkflowActionTemplateModel toAction, Boolean hasAndConnection) - Parameters:
decisionTemplate-toAction-hasAndConnection-
-
getAction
Gets the action with given code from test workflow instance.- Parameters:
code- code of needed action- Returns:
- action of test workflow with given code
-
getDecision
Gets the decision with given code from test workflow instance.- Parameters:
code- code of needed decision- Returns:
- decision of test workflow with given code
-
getActionTemplate
Gets the action template with given code from test workflow template.- Parameters:
code- code of needed action- Returns:
- action template of test workflow template with given code
-