public class MultiInstanceScopeStrategy extends DefaultHandlerStrategy
activity, CALL_ACTIVITY, EVENT, EXTERNAL_TASK, JOB, literal, multiInstanceParent, OTHER, USER_TASK| Constructor and Description |
|---|
MultiInstanceScopeStrategy(TestCaseActivityScope scope,
TestCaseContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyHandler(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
Adds code to the execute/apply method, if the activity is handled by a handler and a wait state -
e.g.:
|
protected com.squareup.javapoet.CodeBlock |
buildHandlerMethodJavadoc() |
com.squareup.javapoet.TypeName |
getHandlerType()
Returns the type name of the related handler or
Void, if the activity is not handled by a
specific handler. |
void |
hasPassed(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
Adds code, which asserts that the process instance has passed an activity.
|
com.squareup.javapoet.CodeBlock |
initHandlerStatement()
Returns the statement that initializes the handler.
|
void |
isWaitingAt(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
Adds code, which asserts that the process instance is waiting at an activity.
|
addHandlerField, addHandlerMethod, getHandler, initHandleraddHandlerFieldAfter, addHandlerFieldBefore, addHandlerMethodAfter, addHandlerMethodBefore, applyHandlerAfter, applyHandlerBefore, buildHandlerMethodName, equals, getActivity, getHandlerAfter, getHandlerBefore, getLiteral, getLiteralAfter, getLiteralBefore, hashCode, initHandlerAfter, initHandlerAfterStatement, initHandlerBefore, initHandlerBeforeStatement, setMultiInstanceParent, shouldHandleAfter, shouldHandleBeforepublic MultiInstanceScopeStrategy(TestCaseActivityScope scope, TestCaseContext ctx)
public void applyHandler(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
GeneratorStrategy
assertThat(pi).isWaitingAt("placeOrderExternalTask");
instance.apply(placeOrderExternalTask)
or the previous activity is an event based gateway.applyHandler in interface GeneratorStrategyapplyHandler in class DefaultHandlerStrategymethodBuilder - The method builder to use.protected com.squareup.javapoet.CodeBlock buildHandlerMethodJavadoc()
buildHandlerMethodJavadoc in class DefaultHandlerStrategypublic com.squareup.javapoet.TypeName getHandlerType()
GeneratorStrategyVoid, if the activity is not handled by a
specific handler.getHandlerType in interface GeneratorStrategygetHandlerType in class DefaultStrategyTypeName.get(UserTaskHandler.class).public void hasPassed(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
GeneratorStrategyhasPassed in interface GeneratorStrategyhasPassed in class DefaultStrategymethodBuilder - The method builder to use.public com.squareup.javapoet.CodeBlock initHandlerStatement()
GeneratorStrategynew UserTaskHandler(getProcessEngine(), "approveUserTask");
initHandlerStatement in interface GeneratorStrategyinitHandlerStatement in class DefaultHandlerStrategypublic void isWaitingAt(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
GeneratorStrategyisWaitingAt in interface GeneratorStrategyisWaitingAt in class DefaultStrategymethodBuilder - The method builder to use.Copyright © 2023 Camunda. All rights reserved.