Java Reference
In-Depth Information
if not
loop
then
{
loop := tasks.formsLoop(target)->includes(
true
);
} endif;
return
loop;
}
query
scenario::Task::completesLoop(target : scenario::Gateway) :
Boolean
{
self
.outgoing.target.selectGateways()->includes(target);
}
query
scenario::Gateway::collectLoopTasks() :
OrderedSet
(scenario::Task) {
var
tasks :
OrderedSet
(scenario::Task) :=
self
.outgoing.target.selectTasks()->asOrderedSet();
var
path :
OrderedSet
(scenario::Task) :=
null
;
var
index :
Integer
:= 1;
while
(path =
null and
index <= tasks->size()) {
path := tasks->at(index).followPath(
self
);
index := index + 1;
};
return
path;
}
query
scenario::Task::followPath(target : scenario::Gateway) :
OrderedSet
(scenario::Task) {
var
path :
OrderedSet
(scenario::Task) :=
null
;
if self
.completesLoop(target)
then
{
path +=
self
->asSet();
}
else
{
var
subTasks :
OrderedSet
(scenario::Task) :=
self
.outgoing.target.selectTasks()->asOrderedSet();
if
subTasks->isEmpty()
then
{
path :=
null
;
}
else
{
path +=
self
->asSet();
path += subTasks.followPath(target);
}
endif
;
} endif;
return
path;
}
query
Common_Testprofile::TPFTestCase::setInstance(
inout
suite :
Common_Testprofile::TPFTestSuite) {
return
suite.instances +=
object
Common_Configuration::CFGInstance {
classType := suite;
lifeline :=
self
.behavior.interaction.lifelines
->asSequence()->last();
};
}
mapping
scenario::Task::toTestCase() : Common_Testprofile::TPFTestCase
{
name :=
self
.name;
description :=
self
.documentation;
Search WWH ::
Custom Search