Главное не результат, главное процесс

BPM-блог Анатолия Белайчука

Шаблоны и паттерны BPM

Вчера в разговоре с клиентом не смог четко объяснить, в чем разница между шаблоном и паттерном.

Фактически речь идет о двух способах решения задач:

  • Шаблон - это стандартное решение для определенного типа задач. Например, если я собираюсь с кем-то заключить партнерский договор, то я беру соответствующий шаблон, и он становится нулевой версией документа.
  • Паттерн - это, в принципе, тоже типовое решение, но разница в том, что применяется оно творчески, исходя из “рисунка задачи”. (Я об этом писал в статье в “Открытых системах”.) В отличие от шаблонов, паттерны бывают со знаком плюс (”как надо делать”) и со знаком минус (”как делать лучше не надо”).

Какое-то мутноватое получается объяснение, не так ли? Добавляет путаницы то, что английские “template” и “pattern” зачастую оба переводят как “шаблон”, и смысл при этом частично теряется.

Думая о том, как это можно объяснить “на пальцах”, нашел аналогию в шахматах:

  • Дебюты из шахматных учебников - это шаблоны: учи и разыгрывай, в учебнике все расписано от стартовой позиции и на 20 ходов вперед.
  • Типовые комбинации миттельшпиля - это паттерны. Например, “вилка” - это паттерн: увидел в позиции возможность ее сделать - делай, или угрожай, что сделаешь. Сдвоенные по вертикали ладьи - это паттерн, а сдвоенные пешки - это антипаттерн: если есть возможность, старайся избегать таких позиций. Но в учебнике нет и не может быть инструкции как, начав партию, сделать противнику вилку.

Применительно к бизнес-процессам, шаблоном иногда называют схему бизнес-процесса. По такому шаблону создаются экземпляры процессов - примерно так же, как в примере с нулевой версией документа.

Второе вариант употребления термина шаблон - стандартная, типовая схема процесса. Поставщик решения или консультант разрабатывает шаблон определенного процесса на основе опыта выполненных проектов и предлагает его новым клиентам. Подразумевается, что те смогут его использовать с небольшой доработкой, сэкономив таким образом усилия по сравнению с разработкой “с нуля”.

Например, у компании Бизнес-Консоль есть успешный опыт построения системы управления бизнес-процессом продаж через территориально-распределенные офисы, и сейчас мы предлагаем его в качестве шаблона, т.е. отправной точки для создания BPM-системы, компаниям, занимающимся производством и монтажом пластиковых окон, металлических дверей, мебели на заказ и т.п.

Паттерны в BPM - это типовые фрагменты процессов или межпроцессного взаимодействия (некоторые примеры).

Уместно спросить: от чего больше пользы? Мое мнение - от паттернов:

  • Шаблоны специфичны (один процесс - один шаблон), паттерны универсальны. Хороший паттерн можно использовать в самых разных бизнес-процессах независимо от отраслевой специфики.
  • Польза от шаблона на практике оказывается меньше ожидаемой. Как правило, позаимствовать удается только магистральный путь (happy path), а дьявол оказывается в деталях - в обходных путях, в обработке нештатных ситуаций.
  • Эффект от использования правильного паттерна может быть очень большим. Например, в нашей практике был случай, когда процесс, изображенный на 6 склеенных друг с другом листах формата А4, за счет использования правильного паттерна удалось свести к изящной конструкции из 15 процессных шагов.
  • Что касается антипаттерна, его польза в том, что в нужный момент он предостережет вас от ошибки. Цена ошибки теоретически может быть любой, и иногда реально большой.

Мое скептическое отношение к шаблонам связано еще и с тем, что с BPM мы все-таки нацеливаемся не на однократную автоматизацию, а на непрерывное совершенствование бизнес-процесса. Шаблон, по определению, можно применить только один раз - при первоначальном моделировании. Возможность применения паттернов остается открытой всегда. Вполне возможна ситуация, когда, открыв для себя новый паттерн, вы под новым углом посмотрите на процессы, с которыми уже работали, и захотите некоторые из них улучшить или упростить.

19.05.10 | Заметки | , ,    

Комментарии (8)

  1. David French 20.05.10 08:59

    While I agree that there are two distinct concepts here, trying to separate them by the use of words “template” and “pattern’ is, I think, a mistake. Lifting our noses out of the mire of IT we would see that these words are synonyms with a long use as equivalents in fields such as engineering and fitting with your use of ‘template’. Unfortunately, I cannot think of a suitable alternative for pattern!

  2. Anatoly Belychook 20.05.10 09:14

    David

    Thank you for valuable input. I’m not a native speaker and can’t judge on these two terms usage in English. So it’s better to clarify each time “let’s call a template this and a pattern that”. OK then.

    Luckily for us, in Russian they are two distinct terms. “Pattern” was borrowed from English not long ago. There were “behaviour patterns”, patterns in image recognition and now we also have “design patterns”.

  3. Scott 26.05.10 01:36

    Anatoly - this is an interesting post.
    While the distinction seems subtle, it is important. I, too, have been skeptical of templates (though I have, at times, seen them work well). But it is hard for many people to understand how valuable design patterns are if it doesn’t mean that they can just “copy-n-paste and edit” the pattern as if it were template. Ie, the “re-use” in the design pattern is knowing well how to solve a problem with a pattern that has been proven over time to be a good one. The “re-use” of a template is using existing code with some additional configuration or editing, in my view.

    The observer pattern is often one that you can explain to people - the template isn’t that useful because you don’t know exactly what the technical underpinnings of the pattern are (webservice? jms? db trigger? other? ) but the concept is highly re-usable. Notification patterns in general are good examples, I think, for the non-technical audience.

  4. John Reynolds 28.05.10 10:53

    After using Lombardi for many years, I finally spend some time with a Pega expert… and I finally “got” the difference - It’s related to the difference between patterns and templates that you’ve outlined.

    Pega has many vertical market Frameworks - very much like your Templates. These are “80%” solutions… Fill in or customize the remaining “20%” and you are done.
    Lombardi doesn’t have any “Templates”… but there are several “Patterns” that we tend to follow time and time again.
    For example, I frequently find myself following a “Hierarchical Approval Pattern” or a “Parallel Approval Pattern” or a combination of the two.

    I think of patterns as proven approaches… When I hear the business person describe the process, I think to myself “Ah… I can use pattern X”.

    I think of template/frameworks as being purchase differentiators - “We’re in the banking industry, and are processes are pretty standard banking processes”. If you’ve got a good banking template, you have a big competitive advantage.

  5. Anatoly Belychook 28.05.10 11:18

    John

    Interesting point. Frameworks and templates have are similar by nature but for me they differ in scale. A template refers to a single process while a framework should cover all processes of the given industry, more or less.

  6. Design patterns are for engineers and templates are for business people. If you are an engineer then a pattern is for you! For a business person? Forget it! A template does neither have to be an end-to-end process nor rigid. A rigid template is definitely worse than a set of good reusable design patterns. But what if templates:

    a) can be created by business users by simple assembly,
    b) are organized in understandable goals and subgoals that can be linked,
    c) contain EVERYTHING that makes the process executable,
    d) can be added to a process at any time,
    e) can be modified where authorized and necessary at runtime,
    f) allows the user to react to unepxected events by adding tasks, performers or goals,
    g) are guided and controlled by policies, rules and constraints,
    h) and finally, template modifications are reusable by other business users again?

    At this point in time design patterns become definitely the lesser choice. A business user now has several times the creative and expressive power over an engineer fumbling with his large library of desgn patterns. The business user works in real-time at real business problems while the engineer is in the dug-in-trenches of process theory! I ask you, which is the better?

  7. Anatoly Belychook 20.11.10 19:51

    Max

    Thank you for the passionate and much-promising input. Can you give an example of such template? A name, target business and few characteristics by your choice but not just a silent hyperlink, please.

    I’m confused by your note about the end-to-end process: it’s what creates value for business, everything else is secondary. What’s your point?

    A.B.

  8. Sergey Boev 29.08.16 03:42

    100% agree with “.. Lifting our noses out of the mire of IT we would see that these words are synonyms with a long use as equivalents in fields such as engineering and fitting with your use of ‘template’.
    Еще есть “гуру” от ИТ, которые умудряются разделять термины “услуга” и “сервис” - которые так вообще, одно - перевод другого заимствованного слова. Конечно, мы имеем право придумывать свои термины сколько нам влезет (до тех пор, пока не забываем их определить) в рамках любой предметной области, но зачем плодить сущности без надобности?

Комментирование закрыто

Copyright © 2008-2024 Анатолий Белайчук. Спасибо Wordpress и Yahoo.  Контент  Комментарии