We have a set of SharePoint designer workflows that "communicate" with an event receiver on the list via changes to site column values. Halimbawa, if a site column "SetDuedate" ay nakatakda sa pamamagitan ng tunay na mga daloy ng trabaho, mga kaganapan receiver na nakita ng pagbabago, kinakalkula ng isang takdang petsa at nagtatalaga ng petsang iyon sa isa pang haligi site, "Due Date." We split things up like this because the event receiver can calculate a due date using complex business rules (pagkuha ng Sabado at Linggo at pista opisyal ng kumpanya sa account) habang SPD talagang hindi maaari.
Sa isang tiyak na halimbawa, we ran into a problem with this trick. Debugging all this is pretty difficult, ngunit kami ay dumating sa tiyak na konklusyon sa isang kaso (kahit), the event receiver was not running all the time. In one step of the workflow, we would change the value of a site column and the event receiver didn’t appear to run. Gayunman, ito ay tuloy-tuloy na tumatakbo sa isang iba't ibang mga hakbang ng workflow.
Pagkatapos suriin ito, I noticed that the happy workflow step used the "Update List Item" while the other step used "Set Field in Current Item." Update List Item was updating the "current item." I’m not sure why we picked one over the other since they would seem to be doing the same thing.
Kaya … the Update List Item action did cause the event to fire. Sa kabilang dako, the Set Field in Current Item action did not.
I used Update List Item in both places and viola! It worked. [[ Total aside, I played the violin for on a daily basis for almost 15 taon ]]
From this, I tentatively believe that the "Set Field" pagkilos ay hindi nagsasanhi ng receiver kaganapan sa sunog, at least some of the time.
This issue bedeviled us for weeks.
This is one of those "observed behavior" posts. I observed this happen once in a specific environment and I’m making some guesses as to why things happened as they did. If you have any insight into this one, mangyaring ibahagi sa mga komento.
</dulo>
Mag-subscribe sa aking blog.