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

Question

Question

Creating Custom Activity (Beginner)

asked on February 19, 2015

Hi,

I'm trying to create a simple Custom Activity in order to learn Laserfiche integration for our clients.

I created a project from the Laserfiche Workflow Activity Template (C#) with the following parameters 8.3 Style | Single Entry | Repository Access 9.2

The following code is generated :

 

namespace CustomActivityTestOne

{

  using Laserfiche.Custom.Activities;

  using Laserfiche.Workflow.ComponentModel;

  using Laserfiche.Custom.Activities.Design;

  using Laserfiche.RepositoryAccess;

  using LFSO90Lib;

  using System;

  using System.Collections.Generic;

  using System.Linq;

  using System.Text;

  using System.Diagnostics;

  using System.ComponentModel;

  using System.Workflow.ComponentModel;

  using System.Drawing;

  using Laserfiche.Workflow.Activities;

  public class CustomActivityTestOne : CustomSingleEntryActivity

  {

    protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)

    {

      using (ConnectionWrapper wrapper = executionContext.OpenConnectionRA92())

      {

        Session session = (Session)wrapper.Connection;

      }

      return base.Execute(executionContext);

    }

  }

}

 

At this point I've got one error and two warnings

Error 3 'System.Workflow.ComponentModel.ActivityExecutionContext' does not contain a definition for 'OpenConnectionRA92' and no extension method 'OpenConnectionRA92' accepting a first argument of type 'System.Workflow.ComponentModel.ActivityExecutionContext' could be found (are you missing a using directive or an assembly reference?) C:\Projects\Demo\CustomActivityTestOne\CustomActivityTestOne\CustomActivityTestOne.cs 31 65 CustomActivityTestOne
 

 

OpenConnectionRA92 doesn't exist, so I replace it with OpenConnectionRA91 which exist.

Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Interop.LFSO83Lib, Version=8.3.0.0, Culture=neutral, PublicKeyToken=607dd73ee2bd1c00, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. CustomActivityTestOne

Warning 2 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Interop.LFSO90Lib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=607dd73ee2bd1c00, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. CustomActivityTestOne

 

What's the difference between OpenConnectionRA91 and OpenConnectionRA92 ?

How can I solve the warning ?

Thanks.

0 0

Replies

replied on February 19, 2015

What I would check is that all the libraries that you are using are of the same version. You may need to remove and then re-add the references and select all of them that are for Laserfiche as the same version.

0 0
replied on December 19, 2016

Was the solution for this question found? I am getting same error. I have SDK 9.2 installed.

0 0
replied on December 19, 2016

Apurva - I believe there might have been an issue with the 9.2 SDK and the OpenConnectionRA92 definition.  Read through this post to see if the provided code snippets work for you.

http://answers.laserfiche.com/questions/73772/Workflow-Custom-Activity--Could-not-load-file-or-assembly-LaserficheDocumentServices

0 0
replied on December 20, 2016 Show version history

Thank you. My Issue is due to using webaccess dll and LFSO91Lib. Let me create a new thread. Thanks.

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

Sign in to reply to this post.