Test ForkExample fails with Simulation exception: Simulation failed, Tried to suspend non-running process
Description
The test exection 'ForkExample' fails with the following exception:
How to reproduce:
Environment
Activity
Semantics of Fork Behavior:
each User owns a Context
a Context is associated with a single thread (1:1 representation)
A Fork action defines a list of nested ForkBehaviors; a new ‘nested’ user with its own context is created per ForkBehavior; thus the ‘outer’ Context is split-up into several inner nested Contexts with their associated threads
if a User reaches a Fork action within a SEFF, the associated User thread is passivated until all ‘nested’ users are executed and reached the common Synchronisation point
The reported problem was caused by trying to passivate the 'outer' thread from within an inner nested thread of a ForkedBehavior. At that time, the outer thread has already been passivated (happend when the ForkAction was reached) and was therefore not running anymore.
This was cause by passing the wrong context. Instead of the inner ‘nested’ context, the ‘outer’ context was passed to ‘steps_Behaviour.findStart().actionsAsCalls("this.forkContext")’