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

Question

Question

Creating AND Locking a folder at the same time using RA?

SDK
asked on June 10, 2014

I have a situation where I want to create a folder, assign a template to it, and populate the template field data using RA.  We using Workflow  9.1  However, the moment I create the folder using  Folder.Create("MyFolderName", MyVolume, EntryNameOption.Overwrite, MySession), it is picked up by workflow, before I have had a chance to assign the template etc.

 

We are using LF Workflow 9.1.1., LF Server 9.0.2


Is there any way to stop workflow from grabbing it (by locking it?) while I complete what I need to do first...

 

PS. It works fine with document entry types, and workflow des not pick it up until I am complete.

 

I  am using C# -- a code example would be handy... :)

0 0

Replies

replied on June 11, 2014

In other words, we do not want WF to trigger the Create event for the folder until we are completed with it, which is how the identical code works for the document case.  The create document event does not seem to fire until we have assigned a template, field information etc.

 

0 0
replied on June 11, 2014 Show version history

In the response to your post Using RA to create a document assign a template and populate fields, Michael Allen states:

When you use DocumentInfo.Create, it's locked by the server upon creation, so you can safely modify the document while it's locked.

Have you tried the same thing with FolderInfo?

0 0
replied on June 11, 2014

FolderInfo.Create locks the folder upon creation, whereas Folder.Create doesn't. FolderInfo.Dispose needs to be called to unlock the folder.

1 0
replied on June 17, 2014

Thank you!  I will use the FolderInfo approach...

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

Sign in to reply to this post.