زودرس فعال سازی گردش کار — یک راه حل غیر پزشکی

تکمیلی: See this MSDN discussion, especially the last entry: http://forums.microsoft.com/MSDN/showpost.aspx?postid=2631057&siteid=1. It describes a condition that may short circuit this whole thing. In short, it may be as simple as making at least one of the fields mandatory.

I have a document library that supports eight content types.

I have a SharePoint Designer workflow that wants to calculate and assign a "reminder date" by simply subtracting 30 days from another column, "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." (You can read more about this kind of KPI and more substantial drill-down اینجا).

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.

This strategy does not work when I upload a document.

I upload the document and I am presented with the meta data entry screen. در این مرحله, I’m already in trouble. SharePoint has already, prematurely from my perspective, fired the workflow. I haven’t had a chance to pick the correct content type nor assign a due date. در همان زمان, 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. پس … my workflow has fired and when it executed, 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, I select the correct content type, enter the meta data and submit. The pause completes and the workflow proceeds as needed. (Note that in my environment, timer workflow activities from SPD do not work out of the box. You may have the same trouble. دیدن اینجا for more details).

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, but I still don’t like it.

I wrote about this on the MSDN forums here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2430725&SiteID=1

8 دیدگاه در "زودرس فعال سازی گردش کار — یک راه حل غیر پزشکی

  1. Nyi Htway

    hey guys, I got the solution. place an EventDriven activity next to the Workflow Initialize event. put an OnWorkflowItemChanged event. Inside there, catch the updated value from the custom column. It works for me.

    پاسخ
  2. Saurabh سینگ
    سلام,
    I am creating a reminder wrokflow using SharePoint Designer, and when i using "Pause Until Date" فعالیت. It doesn’t resume and Workflow status does not change from "In Progress".
    (i.e it displays "Pausing for 0 دقیقه" در زیر تاریخچه گردش کار اما این به آن عمل مشخص را ندارد).
    I have created it many times but found same problem.
    من در چند روز گذشته انجام داده اند برخی از گوگلینگ که, و از آنجا من ثابت گرم حال کردم  KB 932394 و آن نصب شده اما هنوز هم من در همان مشکل با مکث تا تاریخ فعالیت.
    من هم تغییر کرده است گردش کار مدت زمان با استفاده از دستور STSADM از 5 دقیقه تا 1 دقیقه ای به شرح زیر:
    stsadm -o setproperty -propertyname "job-workflow" -propertyvalue "every 1 دقیقه بین 0 و 59" -آدرس http://localhost
    اما مشکل مشابه.
    چه باید بکنم برای این کار?
    Please suggest me why "Pause Until Date" doesn’t resume and Workflow status does not change from "In Progress" در گردش من.
    اگر کسی هر گونه راه حل در مورد این پس لطفا پاسخ من در saurabhsinghmca@gmail.com
    با تشکر از شما,
    Saurabh کومار سینگ
    پاسخ
  3. مارک اندرسون
    می تواند به شما و نه فقط ضمیمه گردش کار به خود نوع محتوا و نه از لیست? It sounds like you want the workflow only to fire for a specific Content Type, در هر صورت.
    پاسخ
  4. غنی نوشته:
    من تو را دیدم یک پست به یک مسئله مشابه که گفت: شما نیاز به ایجاد زمینه های مورد نیاز و که آن را پس از آن متوقف خواهد شد و گردش کار از پخت تا زمینه های مورد نیاز در پر. من آزمایش نشده آن را فقط در اینجا مستند آنچه من خواندن در جاهای دیگر.
    پاسخ
  5. کوری
    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" نوع محتوا (و شما شلیک بر روی ایجاد نمی کند) شما خوب به آن بروید.
    پاسخ
  6. جو نوشته:
    من می دانم منظور شما چیست… 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.
    پاسخ
  7. پل گالوین
    جو,
    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.
    Thanks for sharing,
    –پل G
    پاسخ
  8. جو نوشته:
    I found this problem also – not just with a date oriented workflow, but any workflow on a doc library where users will upload documents.
    If the workflow depends on any 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" dates, instead of using workflow, 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.
    پاسخ

پاسخ

آدرس ایمیل شما منتشر نخواهد شد. بخشهای موردنیاز علامتگذاری شدهاند *