From process modeling to automated system design (Part 1)

"One day in the life of a squirrel" or from modeling processes to designing an automated system for accounting for material assets "Belka-1.0" (Part 1)

From process modeling to automated system design (Part 1)
Used illustration for "The Tale of Tsar Saltan" by A.S. Pushkin, ed. "Children's Literature", Moscow, 1949, Leningrad, drawings by K. Kuznetsov

What's with the "squirrel"?

I’ll explain right away what the “squirrel” has to do with it. Having stumbled across the Web on fun projects for learning UML based on a subject area borrowed from the plots of fairy tales (for example, here [1]), I also decided to prepare a similar example for my students, so that at first they could study only three types of diagrams: Activity Diagram, Use-case Diagram and Class Diagram. I deliberately do not translate the names of the diagrams into Russian in order to avoid disputes about "translation difficulties". What for what - I will explain a little later. In this example, I am using the Enterprise Architect environment from an Australian company. Sparx Systems [2] is a good tool for a reasonable price. And as part of the training sessions, I use Modelio [3], a good free object-oriented design tool that supports the UML2.0 and BPMN standards, without unnecessary bells and whistles in terms of visual capabilities, but quite sufficient for learning the basics of the language.

We are going to automate the activity of accounting for material values, which arises in these processes.

...
An island in the sea lies, (E1, E2)
Hail on the island stands (E3, E1)
With golden-domed churches, (E4)
With towers and gardens; (E5, E6)
Spruce grows in front of the palace, (E7, E8)
And under it is a crystal house; (E9)
The squirrel lives there, tame, (A1)
Yes, what an entertainer! (A1)
Squirrel sings songs, (P1, A1)
Yes, he gnaws all the nuts, (P2)
And nuts are not simple, (C1)
All shells are golden, (C2)
Kernels pure emerald; (C3)
Servants guard the squirrel, (P3, A2)
Serve her as servants of various kinds (P4)
And a clerk was assigned (A3)
Strict account of nuts news; (P5, C1)
Gives her army honor; (P6, A4)
A coin is poured from the shells, (P7, C2, C4)
Let them float around the world; (P8)
Girls throw emerald (P9, A5, C3)
In pantries, but under a bushel; (E10, E11)
...
(A.S. Pushkin "The Tale of Tsar Saltan, of his glorious and mighty son Prince Gvidon Saltanovich and the beautiful Swan Princess", work on the fairy tale began presumably in 1822, for the first time the fairy tale was published by Pushkin in the collection Poems of A. Pushkin (part III, 1832, pp. 130-181) — 10 years from idea to publication, by the way!)

A little about the codes that are written to the right of the lines. “A” (from “Actor”) means that the line contains information about the participant in the process. “C” (for “Class”) – information about class objects that are processed during the execution of processes. “E” (for “Environment”) – information about objects of classes that characterize the environment for the execution of processes. “P” (from “Process”) - information about the processes themselves.

By the way, the exact definition of the process also claims to be the cause of methodological disputes, if only because the processes are different: business, production, technological, etc. and so on. (you can see, for example, here [4] and here [5]). To avoid controversy, let us agree that we are interested in the process from the point of view of its repeatability in time and the need for automation, i.e. shifting the execution of any part of the process operations to an automated system.

Notes on using the Activity diagram

Let's start modeling our process and use the Activity diagram for this. To begin with, I will explain how the above codes will be used in the model. It is easier to explain using a graphical example, and at the same time we will analyze some (almost all of the elements we need) of the Activity diagram.
Let's analyze the following fragment:

...
Squirrel sings songs, (P1, A1)
Yes, he gnaws all the nuts, (P2)
And nuts are not simple, (C1)
All shells are golden, (C2)
Kernels pure emerald; (C3)
...

We have two process steps P1 and P2, a participant A1, and objects of three different classes: an object of class C1 enters the input of the step, objects of classes C2 and C3 are obtained as the result of the activity of this step P2 of our process. For the diagram, we use the following modeling elements.

From process modeling to automated system design (Part 1)

A fragment of our process can be represented something like this (Figure 1).

From process modeling to automated system design (Part 1)

Figure 1. Fragment of the Activity diagram

To organize the space and structure the Activity diagram, we will use a not quite standard approach, from the point of view of the classical use of UML notation. But there are several reasons for this. First, just before starting the simulation, we will compose the so-called modeling convention, in which we fix all the features of using the notation. Secondly, this approach has been repeatedly successfully applied at the stage of business modeling in real projects for the creation of software systems, the results were recorded by our small team of authors in the corresponding copyright object [6], and also used in the tutorial [7]. For the Activity diagram, we define that we structure the diagram field with the help of "swimming" lanes - Swim lanes. The track name will correspond to the type of chart elements that will be placed on this track.

"Input and output artifacts": this track will contain the Objects elements - objects that are used or are the result of a certain step in the process.
"Process Steps": here we put the Activity elements - the actions of the participants in the process.
"Participants": a path for elements that will designate the roles of performers of actions in our process, for them we will use the same modeling element Object - an object, but we will add the “Actor” stereotype to it.
The next track is called "Business Rules" and on this track we will place in text form the rules for performing the steps of the process, and for this we will use the modeling element Note - a note.
We will stop here, although in addition we could still use the path "Instruments" to collect information about the level of process automation. Another path might be useful. "Positions and divisions of participants", it can be used to link roles to positions and departments of process participants.

All that I have just described is a fragment modeling conventions, this part of the agreement concerns the rules for organizing one diagram and, accordingly, the rules for writing and reading it.

"Recipe"

Now let's consider a variant of system modeling namely from the Activity diagram. This is just one of the options, I note that it is, of course, not the only one. The Activity diagram will be of interest to us in terms of its role in the transition from process modeling to automated system design. To do this, we will adhere to the methodological recommendations - a kind of recipe, consisting of only five stages and providing for the development of only three types of diagrams. Applying this recipe will help us get a formalized description of the process we want to automate and collect data for system design. And for students at the beginning of studying UML, this is a kind of lifeline that will not let them drown in all the variety of visual means and techniques that are in UML and modern modeling tools.

Here, in fact, the recipe itself, and then follow the diagrams built for our "fabulous" subject area.

Stage 1. We describe the process in the form of an Activity diagram. For a process that has more than 10 steps, it makes sense to apply the process step decomposition principle to improve the readability of the diagram.

Stage 2. Select what can be automated (steps can be highlighted in the diagram, for example).

Stage 3. The automated step must be assigned a function or functions of the system (the relationship can be many-to-many), draw a Use-case diagram. These are the functions of our system.

Stage 4. Let's describe the internal organization of the AS using a class diagram – class. The swimming lane "Input and output objects (documents)" on the Activity diagram is the basis for building an object model and an entity-relationship model.

Stage 5. Let's analyze the notes on the "Business Rules" track, they give various kinds of restrictions and conditions, gradually transforming into non-functional requirements.
The resulting set of diagrams (Activity, Use-case, Class) gives us a formalized description in a fairly strict notation, i.e. has an unambiguous reading. Now you can develop terms of reference, refine the specification of requirements, etc.

Let's start modeling.

Stage 1. Describing the process in the form of an Activity diagram

Let me remind you that we structured the diagram field using “swimming” lanes, each lane contains elements of the same type (Figure 2). In addition to the elements of the diagram described above, we will use additional elements, let's describe them.

From process modeling to automated system design (Part 1)

The decision (Decision) marks the branching point of our process on the diagram, and the merging of flows (Merge) - the point of their reunion. Transition conditions are written in square brackets on transitions.

Between two synchronizers (Fork) we will show parallel process branches.
Our process can have only one start - one entry point (Initial). But there may be several completions (Final), but not for our specific diagram.

There are quite a lot of arrows, with a large number of elements and connections, you can first identify the stages of the process, and then perform the decomposition of these stages. But for clarity, I would like to show our “fabulous” process in its entirety on one diagram, while, of course, we need to ensure that the arrows do not “stick together”, it would be possible to accurately track what is connected with what.

From process modeling to automated system design (Part 1)

Figure 2. Activity diagram - a general view of the process

Because in the poetic lines, some details of the process are omitted, they had to be restored, they are shown with elements with a white background. These details include the Check In/Store and Recycle step and several input and output artifacts. It is worth noting that this step also does not fully reveal the process, because. we would need to separately designate the transmission step and the reception step, and even add a separate step for the shells, and also think that at first all these material values ​​\uXNUMXb\uXNUMXbmust be temporarily stored somewhere, etc. and so on.
Let us also note that the question of the origin of nuts has so far remained unanswered - where do they come from and how do they get to the protein? And this question (it is highlighted in red in the note - the Note element) requires a separate study! This is how the analyst works - bit by bit collecting information, making assumptions and getting “ok” or “no-ok” from domain experts - very important and simply irreplaceable people at the business modeling stage when creating systems.

Note also that process step P5 consists of two parts.

From process modeling to automated system design (Part 1)

And we will decompose each part and consider in more detail (Figure 3, Figure 4), because the activities performed within the framework of these steps will be automated.

From process modeling to automated system design (Part 1)

Figure 3. Activity Diagram - Drill Down (Part 1)

From process modeling to automated system design (Part 1)

Figure 4. Activity Diagram - Drill Down (Part 2)

Stage 2. Select what can be automated

The steps to be automated in the diagrams are highlighted in color (see Figure 3, Figure 4).
From process modeling to automated system design (Part 1)

All of them are performed by one participant in the process - the clerk of the order:

  • Enters information about the weight of the nut into the statement;
  • Enters information on the transfer of the nut to the statement;
  • Fixes the fact of the transformation of the nut into shells and kernels;
  • Enters information about the nut kernel into the statement;
  • Enters information about nut shells in the statement.

Analysis of the work done. What's next?

So, we have done a lot of preparatory work: we have collected information about the process that we are going to automate; began to form an agreement on modeling (so far only in terms of using the Activity diagram); performed a process simulation and even decomposed several of its steps; identified the steps of the process that we will automate. We are now ready to move on to the next steps and begin designing the functions of the system and its internal organization.

As you know, theory without practice is nothing. It is necessary to try "modeling" with your own hands, it is also useful for understanding the proposed approach. For example, you can work in the simulation environment Modelio [3]. We have decomposed only a part of the steps of the process diagram (see Figure 2). As a practical task, it may be proposed to repeat all the diagrams in the Modelio environment and perform the decomposition of the "Transfer / receipt for storage and processing" step.
We do not yet consider work in specific modeling environments, but this can be the subject of independent articles and reviews.

In the second part of the article, we will analyze the modeling and design techniques required at 3-5 stages, we will use the Use-case and Class UML diagrams. To be continued.

List of sources

  1. Site "UML2.ru". Analyst Community Forum. General section. Examples. Examples of fairy tales in the form of UML diagrams. [Electronic resource] Access mode: Internet: http://www.uml2.ru/forum/index.php?topic=486.0
  2. Sparx Systems website. [Electronic resource] Access mode: Internet: https://sparxsystems.com
  3. Modelio website. [Electronic resource] Access mode: Internet: https://www.modelio.org
  4. Big Encyclopedic Dictionary. Process (interpretation). [Electronic resource] Access mode: Internet: https://dic.academic.ru/dic.nsf/enc3p/246322
  5. Website "Organization of effective management". Blog. Heading "Business process management". Definition of business process. [Electronic resource] Access mode: Internet: https://rzbpm.ru/knowledge/pochemu-processy-stali-s-pristavkoj-biznes.html
  6. Certificate No. 18249 on registration and deposit of a product of the result of intellectual activity. Alfimov R.V., Zolotukhina E.B., Krasnikova S.A. The manuscript of the teaching aid entitled "Modeling the subject area using Enterprise Architect" // 2011.
  7. Zolotukhina E.B., Vishnya A.S., Krasnikova S.A. Modeling of business processes. - M .: KURS, NITs INFRA-M, EBS Znanium.com. — 2017.

Source: habr.com

Add a comment