Home / Flowable / Lesson 5

Model, definition, instance

Apps and models. A free Flowable lesson in simple English (3:17 minutes).

See it in the app

The same topic, shown in the real application.

Open in the academy (practice, progress and notes)

Chapters

Lesson text

0:00 What you will learn

Welcome to lesson five. In lesson one, we met three words: model, definition, and instance. Today we go deeper, and add a fourth word: version. This topic appears in many exam questions, so let's make it very clear. This is an independent course. It is not made or approved by Flowable.

0:20 Three steps

Let's follow an order process from the drawing to real work. First, you draw the model in Flowable Design. Next, you publish the app. This deploys the model, and creates a definition. The definition is what the engine can run. Then, each time someone starts the process, the engine creates an instance. An instance is one real order. So, one definition can have many instances.

0:45 Two kinds of versions

Here is something many people mix up. There are two separate kinds of versions. In Flowable Design, every time you save a model, a new model version is kept. This lets you see the history, and go back if you need to. In the engine, every time you deploy, a new definition version is created for the same key. Version one, then two, then three. Remember, these two kinds of versions are separate. Saving a model does not change the running system.

1:12 New and old instances

Imagine that order process version one has fifty running orders. Now you deploy version two. New instances start with the latest version, so new orders use version two. By default, the fifty running orders stay on version one. They finish with the old design. Moving them to a new version is a separate, special step. We call that migration. So test your changes with a new instance, not an old one.

1:37 A good habit

One more tip from Flowable's guide. Keep only one process in each process model. Then one process model becomes one process definition. This keeps versions simple, and easy to follow.

1:49 Practice question 1

Question one. A process with the key order has been deployed three times. How many process definitions exist for this key? A, one. B, two. C, three. Or D, none.

The answer is C, three. Each deployment creates a new definition version: one, two, and three.

2:17 Practice question 2

Question two. You save a process model in Flowable Design, but you don't publish the app. What happens in the running system? A, nothing changes. B, all instances restart. C, a new definition is created. Or D, old instances are deleted.

The answer is A. Saving creates a new model version in Design only. The running system changes only when you publish.

2:51 Summary

Let's review. A model is the drawing. Deploying it creates a definition, and starting it creates an instance. Saving in Design and deploying to the engine are two separate kinds of versions. New instances use the latest version. By default, running instances stay on their old version. In the next lesson, we will learn about workspaces, apps and revisions. Thank you for learning with us.

Practice questions

A process with the key 'order' has been deployed three times. How many definitions exist for it?

Answer: 3. Each deployment creates a new definition version: one, two, and three.

You save a model in Flowable Design, but don't publish the app. What changes in the running system?

Answer: Nothing changes. Saving creates a new model version in Design only. The running system changes only when you publish.

Sources