Mea Culpa — Sharepoint Designer * ԿԱՐՈՂ * Ստեղծել Պետական ​​մեքենա Workflows

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 ձեռքն Այս MSDN ֆորում գրառումը ինչպես նաեւ. 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, Բայց ահա թե էություն դրա:

  • Իսկ մոտեցումը լծակները է այն փաստը, որ աշխատանքի արդյունքում կարող է փոխել ցանկ Նյութի վերաբերյալ, thereby triggering a new workflow. I’ve normally considered this to be a nuisance and even Ջավախք մասին, օգտագործելով semaphores կարգավորել այն:.
  • Sharepoint թույլ է տալիս բազմաթիվ անկախ workflows լինել ակտիվ դեմ կոնկրետ ցանկ Նյութի վերաբերյալ.

Կարգավորել այն::

  • Նախագծել ձեր պետական ​​մեքենան (այսինքն,, պետությունները եւ ԱՄՆ անցումը մեկից հաջորդ).
  • Իրականացնել յուրաքանչյուր պետություն առանձին աշխատանքի արդյունքում.
  • Կարգավորել յուրաքանչյուր պետական ​​workflows կատարել ի պատասխան ցանկացած փոփոխություն ցանկ Նյութի վերաբերյալ.

Յուրաքանչյուր պետություն աշխատանքի արդյունքում հետեւյալ մոտավոր այս օրինակին:

  • Upon initialization, determine whether it should really run by inspecting state information in the "current item". Abort if not.
  • Կատարել աշխատանքը.
  • Թարմացում է ընթացիկ կետը" with new state information. This triggers an update to the current item and fires off all the state workflows.

Բացի ակնհայտ օգուտ է, որ կարելի է ստեղծել դեկլարատիվ պետական ​​մեքենան աշխատանքի արդյունքում, որ պետությունը տեղեկատվությունը զարհուրելի շենքերի KPIs ու հետաքրքիր Դիտումներ.

Այն ինչ ունենք բավականին էական թերություն — standard workflow history tracking is even more useless than normal 🙂 That’s easily remedied, սակայն. 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 🙂

Ես կոչ եմ անում այս mea culpa մի" քանի որ ես ունեմ, դժբախտաբար, 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.

</վերջ>

Անդամագրվել իմ բլոգում.

4 thoughts on "Mea Culpa — Sharepoint Designer * ԿԱՐՈՂ * Ստեղծել Պետական ​​մեքենա Workflows

  1. Sanjeev Rajput
    Ես իսկապես սիրում եմ կարդալ ամբողջական օրինակներ. Հուսով եմ, որ ձեզ տղերք կարող է օգնել պարզել որոշ մղձավանջներ եմ ունեցող իմ նման գործընթացի. Ես այն կետում, որտեղ ես պատրաստ եմ սկսել թարմ.
  2. 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, ներկայացումը խնդիր չէ, քանի որ տվյալ workflow է երկարաժամկետ վազում գործն (16 or more weeks from start to finish) 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" and upload your post to my blog.
    Thanks for the մեկնաբանության. It’s one of the best I’ve been able to elicit on my blog!
    –Paul G
  3. Mike Atkins
    I implemented the state machine using a separate list to hold the state during the state transitions. The main workflow created an item here and set the initial state. I used a single, separate, workflow to handle all of the states, using an "IF-THEN-ELSEIF" structure (in "Step 1") on the possible states.
    For each state, all I needed to do was obtain a response from a user.
    My example was a multiple-level sequential approval, where each step (represented by a state) could have various possible successors. This meant that each user had (potentially) different options made available in a choice menu. My "Step Two" was also an "IF-THEN-ELSE" structure that considered all of the possible responses (from all stages), and then decided on what the next state should be. "Step 3" then set that state, and the workflow ended.
    This method has the (obvious) advantage of happening within a single (secondary) աշխատանքի արդյունքում. Սակայն, the scope of what could be accomplished in this workflow is more limited that one would have with workflows for each state. Ինձ հետաքրքրում, սակայն, what sort of performance hit takes place if all of the individual state workflows start up (albeit ending immediately thereafter).
    Նույնպես, I use a secondary list (with its own workflow) 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, it goes into a wait state, 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" պետական ​​մեքենայի աշխատանքի արդյունքում.

Թողնել Պատասխանել Paul Galvin Ավելացնել կարծիք Չեղարկել պատասխանել

Ձեր էլ. Փոստի հասցեն չի հրապարակվելու. Պահանջվող դաշտերը նշված են աստղանիշով *