and if it has input data i , and if t is performed after
a merging gateway, then the minimum multiplicity on
the side of the class M
i
is 0.
3.6 Generation of extends and includes
Relationships
We proved in (Bouzidi et al., 2017) that an includes
relationship between two use cases is generated from
a redundant task t. By applying rule R10, t is trans-
formed into an action in a scenario executed within
a use case uc. Therefore, we propose to replace this
action with the display of the view of a use case uc
t
to indicate that uc invokes uc
t
and uses its action t.
Simultaneously, we create a dependency between the
view classes and the control classes traced with uc and
uc
t
. Furthermore, we create traceability relationships
from the target to the source elements of the transfor-
mation. We denote this transformation rule by R17.
On the other hand, if t is a target ref of an outgo-
ing of a gateway, then we create an extends relation-
ship from uc
t
to uc instead of an includes one. Fur-
thermore, we proved that an extends relationships is
generated from an exclusive or inclusive gateway be-
tween two fragments. Hence, we propose to define
scenarios that display the view of the extending use
case when the extended use case invokes it. We also
create a dependency relationship between the view
and the control classes of the extending and the ex-
tended use cases, and trace links between related ele-
ments. We denote this transformation rule by R18.
4 CASE STUDY
Our illustrative case study (cf.Figure.4) is a typical
business process for online purchasing and selling. It
is decomposed into fragments according to our frag-
ment definition (cf.Figure.4). As the fragments F2,
F3, F6 -F10 are composed of one task, the name
of each one of them is the name of the task it con-
tains. For example, F2 is called Check stock avail-
ability.However, F1, F4, and F5 contain many tasks.
Hence, we manually name them: (i) F1: Prepare a
purchase order; (ii)F4: Acquire raw materials; and
(iii) F5: Manage Charge penalty and compensate.
Figure.2 and Figure.5 depict respectively the gener-
ated use case diagram (UCD) and an extract of the
generated CD organized according to the MVC pat-
tern.
By applying R1 on the pool Seller, a system
boundary called Seller is generated in the UCD, and a
trace link between them is created. Moreover, we ap-
ply R2 on the empty lanes Stock manager and Sales,
and on the empty pool Customer to derive three ac-
tors: Stock manager,Sales and Customer, three enti-
ties called MUser, VUser and CUser, and trace links
from each actor or class to its empty lane/pool.
By applying R5 on the IAEs we add to the CD
the entities PurchaseOrder, Customer, Cart, Prod-
uct, Payment, PenaltyCancellation, StockAvailability,
RawMaterials, SupplierCatalog, and Invoice. R5 also
derives the entities DBWarehouse and SupplierCata-
log and initializes their property persistent to true as
they are generated from data stores.
Further, R7 applied on the data objects Product
and Purchase order produces an abstract class called
ProductState and a concrete class called Packaged,
which are linked by a generalization relationship.
It also adds a composition relationship between the
classes ProductState and Product, an abstract method
called packaged() to the class ProductState, a con-
crete method called packaged() to the concrete class
Packaged, an attribute called state, and its getter and
setter setProductState() in the class Product.
Next, we apply R6 on the sequence flow labels Prod-
uct.price¡100000, and Product.items.quantity=0.0 to
create the attributes price and items.quantity in the en-
tity class Product.
Also, R3 is applied on F1 to create a use
case called Prepare purchase order in the UCD.
Then, R4.4 generates a boundary and a control
class called respectively VPreprarePurchaseOrder
and CPreparePurchaseOrder and an association be-
tween them, and an aggregation from VPreprarePur-
chaseOrder to CUser. R4.4 calls the rules R5.3 to
create associations from the entities Product, Cart
and PurchaseOrder to CPreparePurchaseOrder and
MUser, and R12 to create a n-ary association from the
classes Product and Cart to the entity PurchaseOrder,
(iii) R13 to update the multiplicity of ass to 1..1 on the
side of Product and Cart, and (iv) R15 to update the
multiplicity to 0..1 on the side of PurchaseOrder.
Furthermore, R9 is applied on the signal events
that belong to the fragments F1 and F5 to create a
signal class called PurchaseOrderCancellation and
a boundary class called VPurchaseOrderCancella-
tion. This rule associates the created signal classes
to the classes CPpreparePurchaseOrder and CMan-
agePenaltyAndCompensate.
As the fragment F1 contains a gateway, we ap-
ply R4.2 on F1 to obtain (i) a nominal scenario NS
that contains three actions show cart items, add prod-
uct to cart, fill customer information (NS is consid-
ered as a nominal scenario because it represents a se-
quence of activities involved in the execution of the
default path of an exclusive gateway; (ii) an alter-
native scenario that includes the actions add prod-
ICEIS 2020 - 22nd International Conference on Enterprise Information Systems
706