AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 09.04.2018, 05:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,584 / 848 (80) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1100: Consider using parallel workflows instead of if-then statements
Источник: https://crmtipoftheday.com/1100/cons...en-statements/
==============

(The chart fortnight by Ulrik “CRM Chart Guy” Carlsson is interrupted again. Well, we I did mess up the tipping sequence so you’ll see the same things reappearing during the week in case you went off the grid over the weekend. Back to you, Leon. – t.j.)

I am not a fan of the term ‘citizen developer’ when it is used as a synonym for ‘undisciplined developer’. There are plenty of ‘real developers’ who code for expediency, rather than for longevity. Whether we are using workflows, ‘real’ code or Flow, there are good habits we can adopt to make our work easier to manage and maintain.

This tip comes from discussions with my colleague Olena ‘disciplined developer’ Grischenko in regards to portal forms and workflows. Essentially, in this scenario, a form was submitted via the portal and then a workflow massaged the resulting record, as required. Initially we only had a few forms so it was tempting to have one workflow do the work.

If form is 'x' then do thisIf form is 'y' then do thatIf form is 'z' then do the otherIf this, that, and the other were identical, we could call a child workflow or action, but this cannot be guaranteed.

The problem is there is a good chance we will be adding more forms in the future. It is easy to see that a few dozen forms later we have a really long workflow which we have to trawl through to find the steps which relate to our form. It will make debugging difficult and, if we are running an agile project with multiple developers working on different form stories, they could tread on each others’ toes as they all modify the same, long workflow.

The alternative is a workflow per form. Each ‘if’ becomes a different workflow. While this means dozens of workflows instead of dozens of ‘if’ conditions, we can manage this more easily through naming conventions and the search tools we have for views of records. It also means we can put a small change in a solution file instead of loading a huge workflow with only a tiny tweak (or multiple tweaks for multiple stories which we have to test en masse).

Using multiple, small workflows is easier to read, easier to manage, and we stop the developers from clashing with each other. A good, disciplined approach.



Источник: https://crmtipoftheday.com/1100/cons...en-statements/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1095: Add percentage labels to pie charts Blog bot Dynamics CRM: Blogs 0 02.04.2018 04:16
crmtipoftheday: Tip #1043: The Easy Way To Find The Fields Workflows Depend On Blog bot Dynamics CRM: Blogs 0 14.12.2017 08:12
crmtipoftheday: Tip #1007: What is the Common Data Service (CDS) today? Blog bot Dynamics CRM: Blogs 0 23.10.2017 19:12
Заново пересчитать себестоимость jopagames2 NAV: Функционал 14 07.04.2011 16:52

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 04:25.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.