I’ve recently learned that it’s possible and even fairly easy to create a state machine workflow using SharePoint Designer. Necessity is the mother of invention and all that good stuff and I had a need this week that looked for an invention. Coincidentally, Tháinig mé trasna an bhfóram seo MSDN post chomh maith. My personal experience this week and that "independent confirmation" lends strength to my conviction. I plan to write about this at greater length with a full blown example, ach anseo tá an gist sé:
- Ghiaráil an cur chuige ar an bhfíric gur féidir le sreabhadh oibre a athrú le mír liosta, thereby triggering a new workflow. I’ve normally considered this to be a nuisance and even blogged faoi ag baint úsáide as semaphores a láimhseáil.
- SharePoint Ceadaíonn sreabhadh oibre neamhspleách il a bheith gníomhach i gcoinne ítim liosta ar leith.
A chumrú sé:
- Dear do mheaisín stáit (i.e., an stáit agus an chaoi a aistriú stáit ó cheann go ceann eile).
- Chur i bhfeidhm gach stát mar sreabhadh oibre ar leithligh.
- Cumraigh gach ceann de na sruthanna oibre stáit a fhorghníomhú mar fhreagra ar aon athrú ar an mír liosta.
Leanann gach sreabhadh oibre luaigh an patrún garbh:
- Ar initialization, determine whether it should really run by inspecting state information in the "current item". Abort if not.
- An bhfuil an obair.
- Update the "current item" with new state information. This triggers an update to the current item and fires off all the state workflows.
Chomh maith as an sochar soiléir gur féidir le duine a chruthú sreabhadh oibre meaisín declarative stáit, Is léir go bhfuil an fhaisnéis stát iontach do KPI tógála agus tuairimí suimiúla.
Déanann sé go mbeadh míbhuntáiste suntasach go cothrom — standard workflow history tracking is even more useless than normal 🙂 That’s easily remedied, áfach,. Store all of your audit type information in a custom list. That’s probably a good idea even for vanilla sequential workflow, but that’s for another blog post 🙂
I call this a "mea culpa" toisc go bhfuil mé, ar an drochuair, said more than once on forums and elsewhere that one must use visual studio to create a state machine workflow. That simply isn’t true.
</deireadh>