Кон SharePoint Технички Дизајн Шаблони: SharePoint Designer работното + Настанот ресивер = висока потентност коктел

Една од новите модели Сметам дека во изработката на SharePoint решенија Нотингем SharePoint Designer работното и настан приемник.

Тука е бизнис сценарио да го стави во контекст:

  • Јас испратите документот на doc lib.
  • Јас започне мулти-чекор работното создадени користејќи SharePoint дизајнер.
  • Во одреден момент во текот на тој процес, работното доделува задача да некој (преку собирање на податоци од корисникот или доделите задача).
  • We want to use a KPI to track how long that task is awaiting completion. The KPI shows green for tasks that are completed or due more than 3 days from now. It shows yellow if the task is due tomorrow or today. It shows red if the task is past due.
  • Тука е критикар: Сакам датумот кој вози дека KPI да биде празник-свесни.

I can’t calculate a holiday-aware due date in SharePoint Designer workflow very easily. I would have to create a custom action or use a 3rd party tool. Сепак, it’s easy enough to calculate such a date in an event receiver. Merge those two together and we get a pattern like this:

  • Define a hidden yes/no site column on the document library labeled "DoCalcualteDueDate".
  • Иницијализира до лажна.
  • Во соодветно време на работниот тек (e.g. just before the "collect data" акција), доделите таа вредност да Точно.
  • На ItemUpdate() event receiver looks to see if "DoCalculateDueDate" is true. Since the event receiver runs on every update, "DoCalculateDueDate" е нормално лажни.
  • Кога работното доделува DoCalculateDueDate на true, случај приемник ја пресметува празник-свесни датумот на доспевање.
  • Кога настанот приемник прави оваа пресметка, го поставува DoCalculateDueDate знаме да се лажни.

На крајот, SPD workflow is communicated with an event receiver via the DoCalculateDueDate semaphore and we have holiday-aware due dates that are assigned at the exactly correct moment in the workflow’s life. SharePoint Designer controls when the due date is assigned but the event receiver performs the actual calculation and assignment.

</крајот>

Да се ​​претплатите на мојот блог.

Technorati Тагови: ,

Остави Одговори

Вашата е-маил адреса нема да бидат објавени. Задолжителни полиња се означени *