MEA culpa — SharePoint Dearthóir * FÉIDIR * Cruthaigh sreabhadh oibre Meaisín Stát

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>

Liostáil le mo bhlag.

Clibeanna Technorati:

4 smaointe ar "MEA culpa — SharePoint Dearthóir * FÉIDIR * Cruthaigh sreabhadh oibre Meaisín Stát

  1. Jaustral Scríobh:
    Hi Paul,
    cé mhéad stáit a bhfuil tú ag déileáil le? I only get to have two different active workflows when I go to the workflow settings page?
    Fearr,
    John.
    Freagra
  2. Sanjeev Rajput
    Ba mhaith liom i ndáiríre a léamh ar na samplaí lán-. Súil go dtosnódh is féidir ceann de tú guys cabhrú shoiléiriú roinnt nightmares mé ag a bhfuil le mo próiseas den chineál céanna. Tá mé ag an bpointe áit a bhfuil mé réidh chun tús a chur as úr.
    Freagra
  3. Paul Galvin
    That’s a really interesting approach puts an exclamation point on the larger point that SPD can create state machine workflows.
    I don’t know if there are substantial differences performance-wise between what you outline and what I outline. In my case this week, nach bhfuil feidhmíocht i gceist toisc go bhfuil an sreabhadh oibre ar leith ar affair fada ag rith (16 nó níos mó seachtaine ó thús go deireadh) and there are never more than a few dozen active at any time. If there were a few dozen starting up and running every hour … that would be a different story. I think that performance and workflow in general is a very hazy subject.
    I don’t know if you run your own blog or not. If you do, you ought to consider writing about your approach in more detail. If not, I’d be more than happy to call you a "guest blogger" agus do phost a uaslódáil chuig mo bhlag.
    Thanks for the comment. It’s one of the best I’ve been able to elicit on my blog!
    –Paul G
    Freagra
  4. Mike Atkins
    Bhfeidhm mé an meaisín stát ag baint úsáide as liosta ar leith de bheith i seilbh an stáit le linn na haistrithe stáit. The main workflow created an item here and set the initial state. I used a single, ar leithligh, workflow to handle all of the states, using an "IF-THEN-ELSEIF" struchtúr (in "Step 1") on the possible states.
    I gcás gach stáit, léir is gá dom a dhéanamh a bhí le freagra ó d'úsáideoir a fháil.
    My example was a multiple-level sequential approval, i gcás gach céim (ionadaíocht ag an stát) could have various possible successors. This meant that each user had (d'fhéadfadh a bheith) different options made available in a choice menu. My "Step Two" was also an "IF-THEN-ELSE" struchtúr ar fad a mheas gach ceann de na freagraí is féidir (ó gach céim), and then decided on what the next state should be. "Step 3" ansin a leagtar stát sin, agus an sreabhadh oibre dar críoch.
    Tá an modh seo an (soiléir) leas a bhaint as ag tarlú laistigh de singil (tánaisteacha) sreabhadh oibre. Mar sin féin, the scope of what could be accomplished in this workflow is more limited that one would have with workflows for each state. Bhí mé wondering, áfach,, Bíonn cén saghas hit feidhmíochta áit má gach ceann de na sruthanna oibre stáit aonair tús a chur suas (cé dar críoch díreach ina dhiaidh sin).
    Chomh maith leis sin, Úsáid mé liosta tánaisteach (lena sreabhadh oibre féin) to represent the transition between states as this process might be only part of a larger workflow. When the main workflow starts the state machine process, Téann sé i stát go fóill, and proceeds when the "looping" has termintaed. I was also contemplating the possibility that my main workflow may well want to change data in the original List Item, and I wanted to avoid having unnecessary "firings" an sreabhadh oibre meaisín stáit.
    Freagra

Leave a Reply

Ní thabharfar do sheoladh r-phoist a fhoilsiú. Réimsí riachtanacha atá marcáilte *