You are viewing limited content. For full access, please sign in.

Question

Question

How to create a Folder that implements Version Control in Workflow?

asked on November 13, 2016

I am using the Create Entry workflow activity to create a Folder, and have selected the Place New Entry Under Version Control option, but this seems to have no effect when using the activity to create a Folder. I was hoping that it would enable the "Automatically place new documents under version control" property for the created folder.

Is it "by design" that it only works for documents? The Workflow version is 9.1.1, but I checked release notes for later versions and didn't find any fixes.

Is there another activity or method I can use to activate the "Automatically place new documents under version control" property for the created folder? (I already tried the "Version Control" activity, but that seems designed to only work for documents, too.)

Thank you!

Ken

0 0

Answer

SELECTED ANSWER
replied on November 14, 2016

That is by design. Versioning child documents is a different property. You can script though.

            // Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session
            FolderInfo FI = (FolderInfo)this.BoundEntryInfo;
            FI.AutoVersionChildren = true;
            FI.Save();

 

2 0
replied on November 14, 2016

Thanks Miruna! That works perfectly!

Ken

0 0
replied on March 8, 2021

For others attempting to apply automatic version control on folders using Workflow, the script above should be used with the "Script SDK" activity. There is another activity called "Script" that is incompatible with the great snippet provided. Easy to get caught out if you're new to scripting.

Also in order to publish a workflow that includes scripts, you need to ensure scripting is enabled on your Workflow server. This may be something you need to ask your administrator to enable in the Workflow Administration Console > Scripting.

Also if your starting entry isn't a folder, don't forget to target the "Folder" entry using the properties of the Script SDK activity. 

0 0

Replies

replied on November 14, 2016

Hi Ken

I think that is not possible but if you look different way that.  You can set al the new documents on version control if you make a workflow with the following.



And a Starting rule with 2 conditions The entry must be a document and the path you need:





Regards!!
 

1 0
replied on November 14, 2016

Hi David -- thanks for the great input! That would work for new documents that the user puts in the folder.

Thanks!

Ken

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.