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.