Interface TestCaseActivity
public interface TestCaseActivity
Activity of a
TestCase.-
Method Summary
Modifier and TypeMethodDescriptionReturns the code of the related error or escalation event.Returns the name of the related message or signal event.org.camunda.bpm.model.bpmn.instance.FlowNodeGets the underlying flow node.<T extends org.camunda.bpm.model.bpmn.instance.FlowNode>
TgetFlowNode(Class<T> flowNodeType) Gets the underlying flow node of the given type.getId()Returns the ID of the underlying flow node.getName()Returns the name of the underlying flow node.intDetermines how deep the activity is nested within the BPMN process.getNext()Returns the next test activity, if this is not the last activity.Return the parent scope, if the underlying flow node is not a direct child of the BPMN process element.Returns the previous test activity, if this is not the first activity.Gets the topic name of an external task activity.getType()Returns the type orTestCaseActivityType.OTHER, if there is no explicit type.Returns the name of the flow node element type.booleanDetermines if the activity has a parent and the parent is a multi instance.booleanhasNext()Determines if the activity has a successor.booleanDetermines if the activity has a parent or if it is a direct child of the BPMN process element.booleanDetermines if the activity has a predecessor.booleanChecks if the activity has a predecessor and the predecessor's type is the given type.booleanReturnstrue, if an asynchronous continuation after the activity is specified.booleanReturnstrue, if an asynchronous continuation before the activity is specified.booleanisAttachedTo(TestCaseActivity activity) Checks if the activity is a boundary event, that is attached to the given activity.booleanDetermines if the activity is a multi instance.booleanDetermines if the activity is a parallel multi instance.booleanDetermines if the activity is a sequential multi instance.booleanReturnstrue, if the activity is a start activity of the process.booleanReturnstrue, if the activity is an end activity of the process.
-
Method Details
-
getEventCode
String getEventCode()Returns the code of the related error or escalation event.- Returns:
- The event code or
null, if the activity is not an error or escalation event or the code is not specified.
-
getEventName
String getEventName()Returns the name of the related message or signal event.- Returns:
- The event name or
null, if the test activity is not related to a message or signal event.
-
getFlowNode
org.camunda.bpm.model.bpmn.instance.FlowNode getFlowNode()Gets the underlying flow node.- Returns:
- The activity's flow node.
-
getFlowNode
Gets the underlying flow node of the given type.- Type Parameters:
T- A flow node type - e.g.IntermediateCatchEvent.- Parameters:
flowNodeType- A specific flow node type.- Returns:
- The typed flow node.
-
getId
String getId()Returns the ID of the underlying flow node.- Returns:
- The activity ID.
-
getName
String getName()Returns the name of the underlying flow node.- Returns:
- The activity name.
-
getNestingLevel
int getNestingLevel()Determines how deep the activity is nested within the BPMN process. Level0, means that the activity is not nested in a scope (embedded sub process).- Returns:
- The activity's nesting level.
-
getNext
TestCaseActivity getNext()Returns the next test activity, if this is not the last activity.- Returns:
- The activity's successors.
- Throws:
IllegalStateException- If the activity has no successors.- See Also:
-
getParent
TestCaseActivityScope getParent()Return the parent scope, if the underlying flow node is not a direct child of the BPMN process element.- Returns:
- The parent test case activity scope.
- Throws:
IllegalStateException- If the activity has no parent.- See Also:
-
getPrevious
TestCaseActivity getPrevious()Returns the previous test activity, if this is not the first activity.- Returns:
- The activity's predecessor.
- Throws:
IllegalStateException- If the activity has no predecessor.- See Also:
-
getTopicName
String getTopicName()Gets the topic name of an external task activity.- Returns:
- The topic name or
null, if the activity is not an external task or the topic name is not specified.
-
getType
TestCaseActivityType getType()Returns the type orTestCaseActivityType.OTHER, if there is no explicit type.- Returns:
- The activity's type.
-
getTypeName
String getTypeName()Returns the name of the flow node element type.- Returns:
- The type name.
-
hasMultiInstanceParent
boolean hasMultiInstanceParent()Determines if the activity has a parent and the parent is a multi instance.- Returns:
true, if the activity has a multi instance parent scope. Otherwisefalse.- See Also:
-
hasNext
boolean hasNext()Determines if the activity has a successor.- Returns:
true, if the activity has a successor. Otherwisefalse.
-
hasParent
boolean hasParent()Determines if the activity has a parent or if it is a direct child of the BPMN process element.- Returns:
true, if the activity has a parent scope. Otherwisefalse.
-
hasPrevious
boolean hasPrevious()Determines if the activity has a predecessor.- Returns:
true, if the activity has a predecessor. Otherwisefalse.
-
hasPrevious
Checks if the activity has a predecessor and the predecessor's type is the given type.- Parameters:
type- A specific test activity type.- Returns:
true, if a previous activity with the given type exists. Otherwisefalse.
-
isAsyncAfter
boolean isAsyncAfter()Returnstrue, if an asynchronous continuation after the activity is specified.- Returns:
true, if the activity is asynchronous after. Otherwisefalse.
-
isAsyncBefore
boolean isAsyncBefore()Returnstrue, if an asynchronous continuation before the activity is specified.- Returns:
true, if the activity is asynchronous before. Otherwisefalse.
-
isAttachedTo
Checks if the activity is a boundary event, that is attached to the given activity.- Parameters:
activity- A specific activity.- Returns:
true, if the activity is attached to the given activity. Otherwisefalse.
-
isMultiInstance
boolean isMultiInstance()Determines if the activity is a multi instance.- Returns:
true, if the activity is a multi instance. Otherwisefalse.
-
isMultiInstanceParallel
boolean isMultiInstanceParallel()Determines if the activity is a parallel multi instance.- Returns:
true, if the activity is a parallel multi instance. Otherwisefalse.- Throws:
IllegalStateException- If the activity is not a multi instance.
-
isMultiInstanceSequential
boolean isMultiInstanceSequential()Determines if the activity is a sequential multi instance.- Returns:
true, if the activity is a sequential multi instance. Otherwisefalse.- Throws:
IllegalStateException- If the activity is not a multi instance.
-
isProcessEnd
boolean isProcessEnd()Returnstrue, if the activity is a start activity of the process.- Returns:
true, if the activity starts the process. Otherwisefalse.
-
isProcessStart
boolean isProcessStart()Returnstrue, if the activity is an end activity of the process.- Returns:
true, if the activity ends the process. Otherwisefalse.
-