• No results found

5.3 Transforming a Case Type into an Artifact Type

5.3.2 Transformation Algorithm

A syntax directed translation [Aho+07] grammar was used to describe the algorithm. A syntax directed translation works well with translating the first-order logic definition of a case type into an artifact type definition. The simple context-free grammar is derived from the definitions for Case type (Definition 3.4), Case behavior (Definition 3.5), Case hierarchy (Definition 3.6), Case behavioral rules (Definition 3.7), and CMMN Sentry (Definition 3.8).

Fortunately, the recognition of the resulting grammar preserves the ordering required for the transformation.

A set of rewriting rules was developed based on the patterns described in Section 5.3.1. The rewriting rules are presented in Table 5.2. The semantic rules in the grammar are used to apply the rewriting rules. The resulting grammar is described in Appendix A.

Note that a case type T is transformed into a set of artifact types Γ. The main artifact type corresponds to the behavior B of the case type T, and to a set of data attribute artifact types that correspond to each data attribute in D. The number of artifact types Γ is derived by using the equation 1 + |D|.

Betwe en GSM and CMMN 101

Order Concept Condition Transformation 7→ GSM

1 Data ∀d ∈D Γdatapattern(d) Γ ← Γ ∪ Γdatapattern(d)

2 Case stages c ∈

St

case Γcasepattern(c) Γ ← Γ ∪ Γcasepattern(c)

3 Stages ∀S ∈

St

planned Γ

stage

pattern(S) Γ ← Γ ∪ Γstagepattern(S)

4 Discretionary stages ∀dS ∈

St

discretionary Γ parallel patterndiscretionary patternstage pattern(dS))) Γ ← Γ ∪ Γparallel patterndiscretionary patternstage pattern(dS))) 5 plan fragment ∀f ∈

St

f ragment Γparallelpattern

discretionary pattern (f)) Γ ← Γ ∪ Γ parallel patterndiscretionary pattern (f))

6 Tasks ∀t ∈

Ta

planned Γtaskpattern(t) Γ ← Γ ∪ Γtaskpattern(t)

7 Discretionary tasks ∀dt

Ta

discretionary Γparallelpattern

discretionary patterntask pattern(dt))) Γ ← Γ ∪ Γparallel patterndiscretionary patterntask pattern(dt)))

8 Milestones ∀m ∈

Mi

Γmilestonepattern (m) Γ ← Γ ∪ Γmilestonepattern (m)

9 Event listeners ∀e ∈

Ev

Γeventlistenerpattern (e) Γ ← Γ ∪ Γeventlistenerpattern (e) 10 Hierarchy ∀hx, yi ∈

H

Force patterns at the right level SubstagesR←[ Substages

R t

{hx, findPattern(y)i | hx, yi ∈

H

}

11 rule expressions ∀r ∈ϕb Create new sentries Stry ← Stry t {[if toOCL(r)]}

12 Sentries ∀s ∈ cS Convert sentries Stry ← Stry t {s | s=

[on eventConvert(˙ξ) if exprConvert(ϕ)] ∨ . . . } 13 Entry criteria ∀hx, yi ∈ bE Attach guard to the right stage GuardsR[ GuardsRt

{hΓsplitEntrypattern (x, findPattern(y))i | hx, yi ∈E }b

14 Exit criteria ∀hx, yi ∈ cX Attach terminator to the right stage TerminatorsR

[ Terminators

Rt

{hΓsplitExit

pattern (x, findPattern(y))i | hx, yi ∈X }c

15 Manual activation ∀hx, yi ∈ cM Γmanualpattern(x, y) Γ ← Γ t Γmanualpattern(x, findPattern(y)) 16 Required ∀hx, yi ∈ bR Γrequiredpattern (x, y) Γ ← Γ t Γrequiredpattern (x, findPattern(y))

17 Repetition ∀hx, yi ∈ cN Γrepetitionpattern (x, y) Γ ← Γ t Γparallelpatternrepetitionpattern (x, findPattern(y)))

18 Autocomplete ∀a ∈ cA Γautopattern(x) Γ ← Γ t Γautopattern(findPattern(y))

19 Standard events ∃e ∈ cS ∧ e0= ˙χ standardEvents(x) EType

5.4

Summary

This chapter contributes formal transformations between CMMN case types and GSM artifact types to the broader BA knowledge base. The transformation from a GSM artifact type to a CMMN case type is relatively straightforward and simple to describe. The resulting case type modeled using CMMN is visually similar to the original artifact type, allowing for it to be easily understood by human beings. The transformation of a case type into an artifact type is more complex because CMMN extends GSM by introducing new constructs and defining a life cycle with a set of standard events for those constructs. However, it does allow CMMN to use the formal operational semantics of GSM. It also allows for the formal verification work developed for GSM to be applied to CMMN. Material from Appendix D file 30 (FSM-2-GSM.pdf) has been published in Marin et al. [Mar+16].

Systematic Literature Review of

Process Modeling Complexity

Metrics

This chapter contributes a Systematic Literature Review (SLR) [Bio+05; Kit04; Woh+12] of complexity metrics for process models to the broader body of knowledge associated with complexity metrics for process models. The review was designed to identify complexity metrics for process models that have been proposed in the last 20 years (from January 1996 to June 2016 inclusive), and how these were validated. The goal of this review was to identify complexity metrics for process models with the specific purpose of identifying metrics that could be relevant to Case Management Model and Notation (CMMN) [OMG14a]. In addition, this review was conducted in order to identify the research methods, present in the literature about process models, used to validate complexity metrics that could be adapted to validate CMMN complexity metrics. This chapter follows the recommendations put forward for conducting systematic reviews of software engineering literature by Biolchini et al. [Bio+05], Kitchenham [Kit04], Kitchenham and Charters [KC07], Kitchenham et al. [Kit+04], Sjoberg et al. [Sjo+07], and Wohlin et al. [Woh+12] and utilizes the definitions provided in Section 2.2. The complexity metrics for process models identified in this chapter and the research methods used to validate them form the basis for Chapters 7 and 8. This chapter is organized as follows. Section 6.1 provides the justification and background information for the review. Section 6.2 describes the research questions used for this review. Section 6.3 describes the research protocol used, including the data sources and search strategy. Section 6.3.6 describes the inclusion and exclusion criteria used for the papers that were identified during the initial search. Section 6.4 describes the results of the review. Section 6.5 describes the principal findings of the review. In addition, Appendix B provides

all of the papers and metrics identified in this SLR. Appendix D.3 contains all of the supplementary material including the raw data for the review. File 61 (SLR-analysis.Rmd) in Appendix D contains the R source code used to perform the quantitative analysis of the SLR data. Appendix D, file 28 (SLR-analysis.pdf) contains the resulting SLR analysis document.

6.1

Background

This review was the first step in the process of identifying and validating complexity metrics for CMMN. The complexity metrics for process models that were identified in the review were analyzed in order to identify metrics and research methods used for validation that could be applicable to CMMN. The review was conducted using the State of the Art through Sys- tematic Reviews (StArt) tool [Fab+13; Fab+16], which was selected based on the evaluations done by Hernandes et al. [Her+12] and Marshall et al. [Mar+14c].