Is it possible to create a custom activity using RA?
Question
Question
Replies
Sheldon,
Are you looking for something like this? (Sorry, I don't do C#)
Using wrapper As ConnectionWrapper = executionContext.OpenConnection90() Dim database As ILFDatabase = CType(wrapper.Database, ILFDatabase) Dim raSession As Session = Laserfiche.RepositoryAccess.Session.CreateFromSerializedLFConnection(database.CurrentConnection.SerializedConnection) Dim docInfo As DocumentInfo = Document.GetDocumentInfo(Me.GetEntryInformation(executionContext).Id, raSession)
It is possible, but I would still recommend LFSO 90 for custom activities at this time.
Ed - Can you elaborate on continuing to use LFSO for custom activities? All of the recent custom activity work I have done is using RA...
Currently the custom activity interfaces only allow creating RA 8.2 connections directly, which doesn't provide the same experience as LFSO90.
The method you use in your reply to Sheldon of creating it from a serialized connection (assuming you reference RA 9.1) would be fine from a functionality standpoint. I plan on adding support for RA9.1 directly in the next release of workflow.
Thanks Ed, I was wondering if using RA was possible or not. I'm having some challenges setting up a custom activity.
I want to create docInfo, but I need the point to the current Session/Connection that WF is using. I'm not getting it right and not sure how to.
DocumentInfo docInfo = Document.GetDocumentInfo(DocID, RASession);
I can do it using LFSO, but I don't know how to repeat below using RA:
// Open a connection to Laserfiche 9, use the wrapper to interact with it. using (ConnectionWrapper wrapper = executionContext.OpenConnection90()) { ILFDatabase database = (ILFDatabase)wrapper.Database; // TODO: Your code here int DocID = this.GetEntryInformation(executionContext).Id; LFDocument Doc = (LFDocument)database.GetEntryByID(DocID);
Could you assist me with getting the code right?
Thanks
Sheldon