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

Question

Question

How to get current session from a SDK Script in Workflow

asked on September 24, 2014

I'm trying to create a new folder and modify the RME File Date once the folder is created.  How do I get the current session from the workflow connection.  I'm using Laserfiche.RepositoryAccess.

C# Please..

 

1 0

Answer

SELECTED ANSWER
replied on September 24, 2014

(Assuming Workflow 9.1 and higher) Just use "RASession" whenever you need to pass in the session:

Folder.Create("\\Fol1", "Volume1", EntryNameOption.AutoRename,RASession);

 

3 0
replied on February 16, 2015

Hello Miruna,

 

We are on Workflow 9.1 but the WF SDK I am using is 8.3.  Is there a WF SDK 9.1 released?

 

Thanks

Bala

0 0
replied on February 16, 2015

The Workflow SDK has nothing to do with the version of the LF SDK used in SDK scripts activity.

If you're saying that you have a script that was created in 8.3 and still uses references to LFSO83 and you'd like to keep it that way, then you can use this.Connection (or me.Connection in VB.Net)

0 0
replied on February 16, 2015

Hello Miruna,

Thanks for the quick response.  Sorry for not being clear, I am not using the script activity.  I am creating a custom activity and trying to ocr an existing document in the repository.  I need the session for the GetDocumentInfo method on the Document class.  Is there any other way to get the session?

 

Thanks

Bala

0 0
replied on February 17, 2015

Oh, i see. Now the WF SDK 8.3 comment makes more sense. You should've started a new thread as your question is completely unrelated to this thread.

You should use LFSO for your custom activity. Then see the "Accessing the Active Entry" section in the "Custom Activities in Workflow 83 (C#)" PDF that came with your Workflow installation on how to make that activity available to the runtime. 

0 0
replied on February 17, 2015

Hello Miruna,

I was using LFSO object for the custom activity.  My workflow strips out the email attachments and certain types converts into tiff and imports into a new document.  I was trying to OCR these new images in the custom activity.  Redesigned and took out the OCR part to a script activity and the problem is solved.  Really appreciate all your timely responses.  For some reasons I am not subscribed to this thread so not getting the email notifications when you replied.  Sorry.

 

Bala

0 0

Replies

replied on September 24, 2014

That was easy...  Thought I had to create a new session..  Thanks for the quick reply.

0 0
replied on September 24, 2014

You're welcome. The SDK Script activity creates the connection and cleans it up for you.

0 0
replied on September 29, 2014

Hi Doug, 

If your question has been answered, please let us know by clicking the "This answered my question" button on the appropriate response.

If you still need assistance with this matter, just update this thread. Thanks!

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

Sign in to reply to this post.