none
Second workflow not triggering

    Question

  • Hi there,

    I have a form library with an Approval Workflow.

    Business has requirement to restrict each document to the creator of the document, a specific group of approvers and the site contributors.

    I've created a second workflow that applies this custom security, removes "all read" and applies "self contribute".

    The workflow is set to be "Allow this workflow to be manually started" AND "Start workflow automatically when an item is created", however while the WF appears to do what its meant to, it never fires when a new item is created...!?

    Is there a limit on the number of WF that can run on an items "creation"?

    What am I missing? (and perhaps "Is there a better way to do this "per-item" security on a form library?)

    Thanks in advance

    Thursday, October 31, 2013 1:22 AM

All replies

  • i think you can use pause for 2nd workflow i.e once new item created then 2nd workflow pause for a min or so.

    here is good article about the 2nd workflow.you can call the 2nd workflow from your 1st workflow.

    http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-secondary-workflow-HA010237656.aspx#BM8

    http://www.sharepointusecases.com/index.php/2010/03/configure-item-level-permissions-for-document-libraries-part-2/

    or

    3rd party feature 

    http://moresharepoint.codeplex.com/

    or

    if you thinking to control via view

    1. Created the document library and modified the default view to only show documents that were created by/modified by [Me].
    2. Added a new web page to the library and gave exclusive rights to access that to a certain set of users.
    3. Restricted all users from creating a view with the help of creating special permission level where user only had access to upload or delete a document but not creating/updating/deleting lists/views. Also disabled private view creation.

    or check this enable the hidden item level permission

    http://stackoverflow.com/questions/735015/edit-only-owned-list-items-in-windows-sharepoint-services-3-0


    Thanks -WS SharePoint administrator, MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog *Please remember to mark your question as answered & Vote helpful,if this solves/helps your problem.*

    Thursday, October 31, 2013 2:05 AM
  • Thanks for the response.
    I think "pause" is probably the answer I'm looking for...

    I don't want to use a View because this doesn't stop anyone finding the items (through search or various other ways to get at info that isn't explicitly secured).

    I can't find any explicit/definitive info on using two(+) workflows on one list/library (if there is any) but I'm thinking that several of the issues are caused by "clashes" in  timing, so if this pause thing makes a difference I'll flag yours as the answer. Regardless it was very helpful, thanks!

    Tuesday, November 05, 2013 9:39 PM
  • This did not work.

    However I have managed to ditch the second workflow thing (since I ended up manually applying the permissions to all existing items in the list - using a powershell script - that the second workflow was supposed to do) I've now added it to the primary workflow (using an impersonation step - same as is indicated in http://www.sharepointusecases.com/index.php/2010/03/configure-item-level-permissions-for-document-libraries-part-2/)

    However I now have two more issues:

    1) Occasionally (?) the workflow status is not "connected" to the actual workflow status... not sure why but in my form (HDA) the "HDA Approval Status" field is empty (but if you select the item and choose "workflow" you can see that its "In Progress" and users are getting emails from the workflow starting...

    2) When the user Approves/Rejects the item (within outlook) the "Current Item:Approval Status" always apprears to be 0 (regardless of what the user chooses) - this is either because of the permissions change I made in the impersonation step (removes everyone from contribute, and adds User created to contribute), or its some problem with the Approval Status field - I'm confused about this field because its NOT the "Current Item:HDA Approval Status" field... what gives? I was under the impression that "Approval Status" was for CONTENT approval workflow... but perhaps these are the same thing in SP2010....

    Can someone point me in the right direction to what I'm missing because every "fix" breaks two other things!!!

    Surely it can't be THIS hard!?!

    Wednesday, November 06, 2013 6:49 AM
  • I'm not 100% sure because no-one is shedding any light on these issues, but I think that the #2 issue with Approval Status being 0 always, is either related to this being (originally a 2007 workflow) and 2007 workflows are off on this collection, and requires content approval is also off on this library.

    The "Workflow Approval Task" (if that's what its called) contains the "values" that I was unable to resolve, it has two values 1 Approved and 2 Rejected - don't ask my why this didn't fail until recently, but I'm going to put it down to the fact that the workflow was updated a few months ago, and I'm going to say that might have reset some linkages between "Approval Status" (publishing approval?) and "HDA Approval Status" (general approval?) so that it stopped functioning... somehow...

    None of this is guaranteed (just me hypothesizing), but perhaps these details will help someone with similar issues.

    Still no answer on the "Workflow Status" never being updated on some workflows in the library.

    My guesses include some kind of locking/in-use issue that stops the workflow/task binding to the Item because of a timeout, or something related to the "SharePoint only keeps workflow info for 60 days" issue (except for the 60 days bit) in that somehow (maybe our config is not great) its loosing the binding info on this workflow mistakenly....

    Tuesday, November 12, 2013 3:19 AM
  • I have 3 other workflows setup in exactly the same way that are NOT experiencing the same problems, however they have also NOT been modified since the site was updated from sp2007... I'm now very scared to touch them.

    Key "weirdness" is that they use this "workflow task" (with 1=Approved, 2=Rejected) but the consecutive workflow steps refer to "Current Item:Approval Status equals 0;#Approved" and so on... why do they WORK!?

    These are in the same subsite (I believe, although one might be in a "child of this one").

    This sites stability bothers me... Does anyone have any resources on 'how to health check your SP2010 site" or something similar?

    Sunday, November 17, 2013 10:48 AM