Mea culpa — SharePoint Designer * MUND * Krijo menu makinës shtetërore

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, I erdhi nëpër ky post forum MSDN po ashtu. 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, por këtu është esencë e ajo:

  • Qasja thekson faktin se një workflow mund të ndryshojë një zëri të listës, thereby triggering a new workflow. I’ve normally considered this to be a nuisance and even blogged në lidhje me përdorimin semaforët për të trajtuar atë.
  • SharePoint lejon menu të shumta të pavarur që të jetë aktiv kundër një artikull listë të veçantë.

Për të konfiguroni atë:

  • Projektimin e makinës tuaj shtetëror (dmth, shtetet dhe si shtetet në tranzicion nga një të ardhshëm).
  • Zbaton çdo shtet si workflow veçantë.
  • Konfiguro secili prej këtyre workflows shtetit për të ekzekutuar në përgjigje të ndonjë ndryshim në list item.

Çdo shtet workflow ndjek këtë model të përafërt:

  • Pas inicializimit, determine whether it should really run by inspecting state information in the "current item". Abort if not.
  • Të bëjë punën.
  • Update the "current item" with new state information. This triggers an update to the current item and fires off all the state workflows.

Përveç nga përfitim të dukshëm që mund të krijojë një deklarativ makinë workflow shtetëror, të gjitha informatat që shteti është i frikshëm për IKP të ndërtimit dhe pamje interesante.

Ajo ka një pengesë mjaft të konsiderueshme — standard workflow history tracking is even more useless than normal 🙂 That’s easily remedied, megjithatë. 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" sepse unë kam, për fat të keq, 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.

</fund>

Abonohen në blogun tim.

Technorati Tags:

4 mendime mbi "Mea culpa — SharePoint Designer * MUND * Krijo menu makinës shtetërore

  1. Jaustral shkroi:
    Hi Pali,
    sa shtete jeni që kanë të bëjnë me? I only get to have two different active workflows when I go to the workflow settings page?
    Më mirë,
    Juan.
  2. Sanjeev Rajput
    Unë do të doja me të vërtetë për të lexuar shembuj të plota. Shpresojmë se një nga ju djema mund të ndihmojë për të qartësuar disa ëndrra të këqija Unë kam qenë që me procesin tim të ngjashme. Unë jam në pikën ku unë jam gati për të filluar nga të freskëta.
  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, Performanca nuk është një çështje, sepse kjo workflow veçanti është një kohë të gjatë-running çështje (16 ose më shumë javë nga fillimi në fund) 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" dhe ngarkoni shkrimin tuaj në blogun tim.
    Faleminderit për komentin. It’s one of the best I’ve been able to elicit on my blog!
    –Paul G
  4. Mike Atkins
    Unë zbatoi makinë shtetërore duke përdorur një listë të veçantë për të mbajtur gjendjen gjatë tranzicionit shtetërore. The main workflow created an item here and set the initial state. I used a single, i veçantë, workflow to handle all of the states, using an "IF-THEN-ELSEIF" strukturë (in "Step 1") on the possible states.
    Për çdo shtet, të gjitha unë duhet të bëni është të marrë një përgjigje nga një përdorues.
    My example was a multiple-level sequential approval, ku çdo hap (përfaqësohet nga një shtet) could have various possible successors. This meant that each user had (potencialisht) different options made available in a choice menu. My "Step Two" was also an "IF-THEN-ELSE" strukturë që konsiderohen të gjitha përgjigjeve të mundshme (nga të gjitha fazat e), and then decided on what the next state should be. "Step 3" vendosur pastaj se shteti, dhe workflow përfundoi.
    Kjo metodë ka (i dukshëm) Avantazhi i ndodh brenda një të vetme (dytësor) workflow. Megjithatë, the scope of what could be accomplished in this workflow is more limited that one would have with workflows for each state. Unë u pyesin, megjithatë, çfarë lloj të performancës hit zhvillohet nëse të gjitha workflows shtetërore individuale fillojnë deri (megjithëse i dhënë fund menjëherë pas kësaj).
    Edhe, I use një listë të mesme (me workflow e vet) 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, ajo shkon në një shtet pritjes, 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" i workflow makinës shtetërore.

Lini një Përgjigju me Paul Galvin Cancel përgjigje

Adresa juaj e emailit nuk do të publikohet. Fusha e kërkuar janë shënuar *