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

Опции темы Поиск в этой теме Опции просмотра
Старый 07.10.2019, 16:47   #1  
Blog bot is offline
Blog bot
22,392 / 772 (70) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1310: Using Flow to test concurrency

Today’s tip is from Shidin ‘D365fanboi’ Haridas – thank you!

Got a tip of your own? Why won’t you send it to when you have a minute? Now, over to Shidin.

Most CRM implementations, at some point, would have required to implement a bespoke auto-numbering system.

However, testing the custom built auto-numbering solution end-scenarios, especially involving optimistic concurrency was always the toughest challenge.

Flow can be used to help out testing such end-scenarios of optimistic concurrency:
  1. Create a flow with a loop to create the entity records (in the below example, initialized an array collection to loop through)

  1. In the loop control settings, enable ‘Concurrency Control’ and increase degree of parallelism to 2+.

  1. Now, when the flow executes, multiple records will be created in the Dynamics 365 database at the exact time!!
  2. To verifying this, create an alternate key on the auto-number attribute.
The flow run will fail if the bespoke auto-numbering system tried to insert the same values against the record.

Tîpp Jäår $0.02 + GST
  • It’s been a while since I implemented an auto-numbering system that required testing. Why? Because Common Data Service supports auto-numbering. Having said that, I have seen autonumbering requirements in the wild that wouldn’t fit on one page and require a team of 3 or more software engineers to implement. Those exactly are the occasions where you’d want to test. Or change the requirements. Or job.
  • Don’t restrict your imagination to auto-numbers. There are plenty of other situations where you’d want to test records be created at the same time.
  • Be aware of the Flow limits – those would be very easy to break while doing loop-de-loop.
Cover photo by Pixabay

Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1276: Do my Dynamics 365 users need a Microsoft Flow license? Blog bot Dynamics CRM: Blogs 0 21.06.2019 19:12
crmtipoftheday: Tip #1264: Subscribe to AD changes using Flow Blog bot Dynamics CRM: Blogs 0 07.05.2019 17:11
crmtipoftheday: Tip #1258: Dynamic attribute names in Flow Blog bot Dynamics CRM: Blogs 0 26.04.2019 14:11
crmtipoftheday: Tip #1205: Local time in Flow using Common Data Service Blog bot Dynamics CRM: Blogs 0 06.12.2018 18:11
crmtipoftheday: Tip #1124: Flow Approvals May Be Exactly What You Need Blog bot Dynamics CRM: Blogs 0 25.06.2018 12:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

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