Capture a version of this Document Set SharePoint Designer Workflow

Hi,

I'm trying to set up a SharePoint Designer Workflow where only action in this workflow is to capture a version of Document Set that includes the last major versions. Workflow is set to start automatically on item change.

Every time Document set is edited (properties) workflow start 10 times or better said 10 instances of the same workflow get started and in effect 10 versions of Document set get created.

I have tried this on several farms and what is interesting is that on farm that has a build version 14.0.6109.5002 it works just fine.

I have two other farms where I tried the same thing with build versions 14.0.6117.5002 and 14.0.6131.5003 where 10 instances of workflow get started at almost the same time.

Any ideas?

Thank you.

April 9th, 2013 5:42pm

Hi Rober7o,

I suggest you use c# code to get the document set version of  DocumentSetVersionCollection.Add

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopmentprevious/thread/44eede1c-fb54-4372-8f97-e0ec6e8cb830/

Please also refer entans workaround.

http://social.technet.microsoft.com/Forums/en-US/sharepointcustomizationprevious/thread/21ce7fb0-d3ef-4c7f-a9a6-4457047e574d

Thanks,

Jack

Free Windows Admin Tool Kit Click here and download it now
April 11th, 2013 7:00am

Using C# code is not an option.

Client has a Prod Env where no custom code is allowed.

Capturing Document set versions is what client is doing at the moment, but would like it to be automatically.

any other thoughts?

April 11th, 2013 1:10pm

Hi R0ber7o,

So, you said your environment 14.0.6109.5002 is working well, this is may be configuration is different with your current 14.0.6131.5003.

Document set versioning is additive, which means it does not replace versioning for individual items, but instead provides an additional layer of support designed specifically for viewing and managing the document set life cycle. So, individual items inside a set can have versions and the set itself can also have versions

 

Thanks,

Jack

Free Windows Admin Tool Kit Click here and download it now
April 12th, 2013 8:52am

Hi Jack,

Configuration is same on all farms. I repeated the same steps on all farms:

  1. create new Doc lib
  2. create new Document Set Contenty Type
  3. add CT to Doc Lib
  4. Create Workflow in SPD 2010
  5. Create Doc Set
  6. Add documents to Document Set
  7. Change properties of Document Set to start workflow.

And results were as I wrote in my question.

The main issues here is that on farms where 10 versions of Document Set get created, 10 instances of workflow are started at the same time

And in effect:

I checked again workflow in working farm and workflow in farm where 10 instances are started.

This one is strange...

In the farm:

Major  Minor  Build  Revision
-----  -----  -----  --------
14     0      6109   5002

I added workflow action Set workflow variable and only one instance of workflow is started and only one version of Document set is created. If I remove this action, 10 instances of workflow get started and 10 versions of document set are created.

In

Major  Minor  Build  Revision
-----  -----  -----  --------
14     0      6117   5002

I tried the same trick with "set workflow variable" action but it fires up 10 instances of workflow. What I tried next was to add "Log to history list" action and only 1 instance of workflow was started.

In

Major  Minor  Build  Revision
-----  -----  -----  --------
14     0      6131   5003

nothing helps. I tried adding several workflow actions to workflow but 10 instances of workflow were fired.

April 12th, 2013 11:36am

Hi,

I have also a same scenario where we cannot write server side code and the requirement is same i.e. to automate version capturing process of document set.

So did you get a working solutions for this? If yes, please share your thoughts. Thanks.

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2013 2:14pm

Hi,

Looks like workflow is triggered after updating every property field. And will be triggered again when you delete version history.

Here is simple workaround.

Add "Wait for Modyfied By to equal Current Item:Modyfied By" condition before triggering version increase. Works fine on SharePoint 2013 as SP2010 workflow.

Please vote if you find reply useful or mark it as answer.
Thank you

July 18th, 2013 11:07am

I know this is a really old post, but it shows up high on the search list when looking for a solution to this problem so I thought I would share what I found in case others run into this issue. Also I tried the above solution to check the ModifyiedBy field, but it didn't work every time. 

Here is another solution. 

First create a new field called AutoVersion. Make it a Yes/No checkbox. Add this to your Document Set. Update your workflow so that it first checks that AutoVersion is checked before capturing a version, then after capturing the version uncheck this box. Now if the user checks the box, the workflow will capture the version, but on the second through tenth time it tries to capture the version it will see the box is now unchecked and won't run. 

This works fine, but you can go anadditional step and add some jQuery to the Edit Properties page so that the checkbox gets check automatically when the form is opened and also hides the checkbox so it can't be unchecked. To the user there will not be a checkbox visible, but to SharePoint it will think the box has been checked and run the workflow. 

More info here on the code you can use to perform this: http://techaholica.com/2015/02/27/sharepoint-version-a-document-set-through-a-workflow/

Free Windows Admin Tool Kit Click here and download it now
February 27th, 2015 11:22am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics