Prematura activación de fluxo de traballo — Unha solución non médica

Actualización: Vexa este fío MSDN, especialmente a entrada do último: http://forums.microsoft.com/MSDN/showpost.aspx?postid=2631057&siteid=1. It describes a condition that may short circuit this whole thing. En resumo, pode ser tan sinxelo como facer polo menos un dos campos obrigatorios.

Eu teño unha biblioteca de documentos que soporta oito tipos de contido.

I have a SharePoint Designer workflow that wants to calculate and assign a "reminder date" simplemente subtraindo 30 día a partir de outra columna, "due date". This should only happen for one of the content types, "Insurance". The business objective is to produce a KPI that shows two categories of insurance documents: "about to expire" and "expired." (Podes ler máis sobre este tipo de KPI e máis substancial Drill-down aquí).

I have configured the workflow to fire when a new item is created and when an item is modified. The idea is that when an insurance document is uploaded, we calculate a "warning date" based on the expiration date. A pair of views work in connection with a KPI List to highlight these conditions when users hit their home page.

Esta estratexia non funciona cando cargar un documento.

I upload the document and I am presented with the meta data entry screen. Neste punto, I’m already in trouble. SharePoint has already, prematuramente da miña perspectiva, fired the workflow. I haven’t had a chance to pick the correct content type nor assign a due date. Á vez, the workflow does not fire when I hit the submit button at this time. There’s some built-in logic that "believes" that first submit is part of the "create" event. Así … meu traballo foi accionado e cando se executa, it was passed default meta data values.

The best work-around I know of is to insert a "pause until" activity in the workflow. I have the workflow pause for 1 minute. While it’s pausing, Seleccionar o tipo de contido correcto, enter the meta data and submit. The pause completes and the workflow proceeds as needed. (Teña en conta que no meu ambiente, timer workflow activities from SPD do not work out of the box. You may have the same trouble. Ver aquí para máis detalles).

I don’t like "magic delay" work-around. What happens if the user uploads a document and the phone rings and the ensuing conversation outlasts the pause? I can make the pause longer, pero eu non me gusta.

Eu escribín sobre iso no foro MSDN aquí: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2430725&SiteID=1

8 pensamentos sobre "Prematura activación de fluxo de traballo — Unha solución non médica

  1. Nyi Htway

    hey caras, Teño a solución. poña unha actividade EventDriven á beira do evento initialize do fluxo de traballos. put an OnWorkflowItemChanged event. Inside there, catch the updated value from the custom column. It works for me.

    Responder
  2. Saurabh Singh
    Ola,
    I am creating a reminder wrokflow using SharePoint Designer, and when i using "Pause Until Date" activity. It doesn’t resume and Workflow status does not change from "In Progress".
    (i.e it displays "Pausing for 0 actas" under Workflow History but it doesn’t take specified action).
    I have created it many times but found same problem.
    I have done some googling for that in last some days, and from there I had got a hot fix  KB 932394 and installed it but still I am in same trouble with Pausa Ata Data Activity.
    I have also changed job-workflow time duration using stsadm command from 5 minutes to 1 minute as below:
    stsadm -o setproperty -propertyname "job-workflow" -propertyvalue "every 1 minutes between 0 e 59" -url http://localhost
    pero atopou mesmo problema.
    ¿Que debería facer con esta?
    Please suggest me why "Pause Until Date" doesn’t resume and Workflow status does not change from "In Progress" no meu traballo.
    Se alguén ten algunha solución sobre iso, entón por favor me responda en saurabhsinghmca@gmail.com
    Grazas,
    Saurabh Kumar Singh
    Responder
  3. Marc Anderson
    Non pode simplemente engadir o fluxo de traballo para o propio tipo de contido no canto da lista? It sounds like you want the workflow only to fire for a specific Content Type, de calquera xeito.
    Responder
  4. rico escribiu:
    Vin un post de un problema semellante que dixo que precisa para facer os campos son obrigatorios e que pode, a continuación, deixar o fluxo de traballo de disparar ata os campos obrigatorios están cubertos. Non proba só documentar aquí o que lin noutro lugar.
    Responder
  5. Corey
    We had this same issue and what we wound up doing was to create an "Unclassified" content type which was the default. As long as your workflows ignore the "Unclassified" tipo de contido (and you’re not firing on create) you’re good to go.
    Responder
  6. Joe wrote:
    I know what you mean… my saying around here in my office is that SharePoint does about 90% of what you really need it to do… but that last 10% that it doesn’t do is usually really a killer.
    Responder
  7. Paul Galvin
    Joe,
    I’m glad to know I’m not the only one. This is another case where SharePoint brings you soooo close to a solution but leaves you short and no really good option to finish the crossing line.
    I went down the same path you describe but didn’t finish it entirely. I expect I will end up doing exactly that in the end.
    Grazas por compartir,
    –Paul G
    Responder
  8. Joe wrote:
    Atopei este problema tamén – non só con un fluxo de traballo orientado data, pero calquera fluxo de traballo nunha biblioteca doc onde os usuarios han subir documentos.
    O fluxo de traballo depende de calquera metadata, you can’t have it fire automatically because the upload fires the workflow before the metatdata is filled in. This is a flaw in SharePoint in my opinion.
    As for "reminder" datas, en vez de usar o fluxo de traballo, I ended up writing a timer job that scans the list every day and sends out e-mail reminders based on a date field.
    I tried having users manually start the workflow after the metadata was entered, but I still had a problem using workflow for the reminders because it would pause the workflow until the reminder date, but if the user later edited the document data and changed the date, the old reminder workflow was still out there.
    Responder

Deixe unha resposta

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