Mea Culpa — SharePoint Deseño * PODE * Crear fluxos de traballo de máquina de estado

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, Me deparei este foro MSDN post tamén. 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, pero aquí é a esencia do que:

  • O enfoque aproveita o feito de que un fluxo de traballo pode cambiar un elemento da lista, thereby triggering a new workflow. I’ve normally considered this to be a nuisance and even blog sobre o uso dos semáforos para tratar con isto.
  • SharePoint permite múltiples fluxos de traballo independentes para ser activo contra un elemento da lista específica.

Para configurar-lo:

  • Proxecto súa máquina de estado (é dicir,, os estados e como os estados de transición dun a outro).
  • Aplicar cada estado como fluxo de traballo separado.
  • Configurar cada un destes fluxos de traballo do Estado para executar en resposta a calquera cambio no elemento da lista.

Cada fluxo de traballo do Estado segue este estándar duro:

  • Tras o arranque, determine whether it should really run by inspecting state information in the "current item". Abort if not.
  • Facer o traballo.
  • Update the "current item" with new state information. This triggers an update to the current item and fires off all the state workflows.

Ademais da vantaxe obvia que se pode crear un fluxo de traballo de máquina de estado declarativa, toda a información que estado é óptimo para KPIs de construción e puntos de vista interesantes.

El ten unha desvantaxe moi substancial — standard workflow history tracking is even more useless than normal 🙂 That’s easily remedied, con todo. 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" porque eu teño, por desgraza, 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.

</final>

Rexístrate para o meu blog.

Technorati Tags:

4 pensamentos sobre "Mea Culpa — SharePoint Deseño * PODE * Crear fluxos de traballo de máquina de estado

  1. Jaustral escribiu:
    Ola Paulo,
    cantos estados está lidando con? I only get to have two different active workflows when I go to the workflow settings page?
    O mellor,
    Baño.
    Responder
  2. Sanjeev Rajput
    Realmente me gusta ler os exemplos completos. Espero que un de vós pode axudar a aclarar algúns pesadelos que teño tido co meu proceso semellante. Eu estou no punto onde eu estou listo para comezar de novo.
    Responder
  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, desempeño non é un problema porque este fluxo de traballo en particular é un tema de longa duración (16 ou máis semanas do principio ao final) 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" e enviar o seu post para o meu blog.
    Thanks for the comment. It’s one of the best I’ve been able to elicit on my blog!
    –Paul G
    Responder
  4. Mike Atkins
    Eu apliquei a máquina estatal con unha lista separada para manter o estado durante as transicións de estado. The main workflow created an item here and set the initial state. I used a single, separado, workflow to handle all of the states, using an "IF-THEN-ELSEIF" estrutura (in "Step 1") on the possible states.
    Para cada Estado, todo o que eu precisaba facer era obter unha resposta dun usuario.
    My example was a multiple-level sequential approval, onde cada paso (representado por un estado) could have various possible successors. This meant that each user had (potencialmente) different options made available in a choice menu. My "Step Two" was also an "IF-THEN-ELSE" considera que a estrutura de todas as posibles respostas (desde todas as fases), and then decided on what the next state should be. "Step 3" a continuación, definir ese estado, eo fluxo de traballo rematou.
    Este método ten a (evidente) vantaxe de que se produzan dentro dunha única (secundario) fluxo de traballo. Con todo, the scope of what could be accomplished in this workflow is more limited that one would have with workflows for each state. Eu quería saber, con todo, que tipo de impacto na eficacia ten lugar todos os fluxos de traballo de cada estado inicio (aínda rematando inmediatamente a seguir).
    Tamén, Eu uso unha lista secundaria (co seu propio fluxo de traballo) 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, el entra nun estado de espera, 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" do fluxo de traballo de máquina de estado.
    Responder

Deixe unha resposta Paul Galvin cancelar resposta

Enderezo de correo electrónico non será publicado. Os campos obrigatorios están marcados *