Return Node Use
The Conformiq Creator modeling language has three different concepts to model the end of a flow, i.e., explicit “return node”, explicit “flow final” node, and implicit return node (which is an activity with no outgoing flows). Return nodes (explicit as well as implicit) imply that control flow execution continues in the parent activity diagram – only flow final nodes really terminate a flow. A special case where there is no noticeable difference is a project with one single activity diagram. “By default” control flows are more or less terminated by implicit return nodes.
Recommendation: Avoid using implicit return nodes altogether and limit use of return nodes at a minimum to meaningful return points, i.e., terminate all flows ending “successful” behavior in the same return node. Name that return node “Success”. |
Note that the improper modeling with return nodes can easily lead to invalid results in test generation, i.e., parent diagram continuing with actions even though test should stop because an error condition was handled in the subactivity diagram. Remember that no tool can automatically “tell” or differentiate which control flows should terminate. The user must express the knowledge by using flow final nodes.
Recommendation: Always use flow final nodes to terminate control flow branches that model handling of errors or invalid behavior by the system to be tested, i.e., contain the modeling of error handling in the same activity diagram. Name flow final nodes after the error or terminating condition they represent. |
Related content
Copyright © 2023 Conformiq and its subsidiaries. All rights reserved.