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

Question

Question

The script method was not found

SDK
asked on June 25, 2018

Hi all,

 

I'm using Workflow Designer 10.2.0.202

I have a script to exporte PDF's file from Laserfiche to Windows.

namespace WorkflowActivity.Scripting.ScriptSDKExport
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SqlClient;
    using System.Text;
    using Laserfiche.RepositoryAccess;
    using Laserfiche.DocumentServices;

    /// <summary>
    /// Offre une ou plusieurs méthodes qui peuvent être exécutées au moment de l'exécution de l'activité de scriptage du flux de travail.
    /// </summary>
    public class Script1 : RAScriptClass102
    {
        /// <summary>
        /// Cette méthode est exécutée quand l'activité est effectuée.
        /// </summary>
        protected override void Execute()
        {
            // Rédigez votre code ici. La propriété BoundEntryInfo accèdera à l'entrée, RASession obtiendra la section de Repository Access
            Laserfiche.DocumentServices.DocumentExporter DocEx = new Laserfiche.DocumentServices.DocumentExporter();
            DocumentInfo DI = Document.GetDocumentInfo(this.BoundEntryId, RASession);
           // DocumentInfo DI = Document.GetDocumentInfo(GetTokenValue("IDNewDoc"), RASession);
            DocEx.ExportElecDoc(DI, Convert.ToString(GetTokenValue("Chemin")));

        }
    }
}

 

Overnight, my script stopped. It worked last week.

 

I have this error : "The script method was not found [0267-WF1]".

Under the Event Viewer, I have no error message about this.

From Workflow Administration Console (10.2), under subscriber_error.log, I have an error.

----------------------------------------
Timestamp: 2018-06-25 18:38:07.079
Local Time: 25/06/2018 08:38:07
Category: Errors
Machine: USER1
Severity: Error
Application Domain: Laserfiche.Workflow.Subscriber.exe
Process Id: 6760
Process Name: C:\Program Files\Laserfiche\Laserfiche Workflow 10.2\Laserfiche.Workflow.Subscriber.exe
Win32 Thread Id: 18184 - VARKIT Notification Thread
Thread Name: VARKIT Notification Thread
Message: <Exception handlingInstanceId="b9abb7f3-c3d1-4490-becd-4904d87afef2">
  <Description>An exception of type 'Laserfiche.Connection.LFSOException' occurred and was caught.</Description>
  <DateTime>2018-06-25 08:38:07Z</DateTime>
  <ExceptionType>Laserfiche.Connection.LFSOException, Laserfiche.Workflow.Common, Version=8.3.0.0, Culture=neutral, PublicKeyToken=d8428ff9263e6cda</ExceptionType>
  <Message>Ne parvient pas à se connecter au Serveur Laserfiche.</Message>
  <Source />
  <HelpLink />
  <Property name="LFROError">False</Property>
  <Property name="LFSOError">False</Property>
  <Property name="ErrorCode">797</Property>
  <Property name="TargetSite">&lt;undefined value&gt;</Property>
  <Property name="HResult">-2146233088</Property>
  <StackTrace />
  <additionalInfo>
    <info name="MachineName" value="USER1" />
    <info name="TimeStamp" value="25/06/2018 18:38:07" />
    <info name="FullName" value="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <info name="AppDomainName" value="Laserfiche.Workflow.Subscriber.exe" />
    <info name="ThreadIdentity" value="" />
    <info name="WindowsIdentity" value="AUTORITE NT\Système" />
  </additionalInfo>
  <InnerException>
    <ExceptionType>Laserfiche.RepositoryAccess.NoConnectionException, Laserfiche.RepositoryAccess, Version=10.2.0.0, Culture=neutral, PublicKeyToken=3f98b3eaee6c16a6</ExceptionType>
    <Message>Ne parvient pas à se connecter au Serveur Laserfiche.</Message>
    <Source>Laserfiche.RepositoryAccess</Source>
    <HelpLink />
    <Property name="ErrorCode">0</Property>
    <Property name="Server">user1</Property>
    <Property name="Repository">VARKIT</Property>
    <Property name="User">WFUser$</Property>
    <Property name="Thread">VARKIT Notification Thread</Property>
    <Property name="LastASN">36864</Property>
    <Property name="TargetSite">Laserfiche.RepositoryAccess.Activity.Notification WaitForNotification(Int32)</Property>
    <Property name="HResult">-2146233088</Property>
    <StackTrace>   à Laserfiche.RepositoryAccess.Activity.HttpNotificationManager.WaitForNotification(Int32 seconds)
   à Laserfiche.Connection.Lfso.RepositoryAccess91.LFNotificationManagerRA.WaitGetNotification(Int32 timeoutMilliseconds)
   à Laserfiche.Workflow.Subscriber.Runtime.Threads.NotificationThread.ListenToLaserfiche(LFDatabase database, Int64 lastASN)
   à Laserfiche.Workflow.Subscriber.Runtime.Threads.NotificationThread.ListenToNotifications()
   à Laserfiche.Workflow.Subscriber.Runtime.Threads.NotificationThread.Run(Object state)</StackTrace>
  </InnerException>
</Exception>
----------------------------------------

 

I do not know if it's related because the hours do not match.

Today (06/25/2018) I make a new test at 09:12am, I still have the error but I don't have any errors at this time under the Windows's Event or Workflow's Event.

 

Someone have an idea?

 

Thanks in advance.

Regards

0 0

Replies

replied on June 25, 2018

Scripts default to reporting their exceptions as warnings. You can change them to be errors in the activity's advanced options. Then they'll be logged with stack traces to activity errors.log.

The subscriber error is unrelated.

0 0
replied on June 25, 2018

Miruna,

 

It's already on Errors.

0 0
replied on June 25, 2018

Ne parvient pas à se connecter au Serveur Laserfiche

 

This seems to indicate that Workflow couldn't connect to LFS. You might start by troubleshooting connectivity.

0 0
replied on June 25, 2018

Hi Devin,

 

Yes I saw it but I don't think this is the reason because my workflow is working. Only my SDK doesn't work.

 

0 0
replied on June 26, 2018

Can you paste the current version of the script? It seems to have changed from the one above.

0 0
replied on June 28, 2018 Show version history

Hi Miruna,

 

True, I made a lot of version.

this is the last one.

namespace WorkflowActivity.Scripting.ScriptSDKExport
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SqlClient;
    using System.Text;
    using Laserfiche.RepositoryAccess;
    using Laserfiche.DocumentServices;

    /// <summary>
    /// Offre une ou plusieurs méthodes qui peuvent être exécutées au moment de l'exécution de l'activité de scriptage du flux de travail.
    /// </summary>
    public class Script1 : RAScriptClass102
    {
        /// <summary>
        /// Cette méthode est exécutée quand l'activité est effectuée.
        /// </summary>
        protected override void Execute()
        {
            // Rédigez votre code ici. La propriété BoundEntryInfo accèdera à l'entrée, RASession obtiendra la section de Repository Access
            Laserfiche.DocumentServices.DocumentExporter DocEx = new Laserfiche.DocumentServices.DocumentExporter();
            DocumentInfo DI = Document.GetDocumentInfo(this.BoundEntryId, RASession);
           // DocumentInfo DI = Document.GetDocumentInfo(GetTokenValue("IDNewDoc"), RASession);
            DocEx.ExportElecDoc(DI, Convert.ToString(GetTokenValue("Chemin")));

        }
    }
}

It looks same.

This is my token.

chemin = "C:\Program Files\Laserfiche\Laserfiche Forms\Forms\PDFAttachment\FeuillePointage\%(Récupérerlesvaleursdechamp_Utilisateur)\RECAPmois1.pdf"

0 0
replied on June 28, 2018

Is this the one that was running in the workflow instance that got the error? Because the version you had in your post earlier had code outside of the public class, so the error would've been correct.

0 0
replied on June 28, 2018

Yes this is the last one.

I made a new test and got the same error.

 

What do you mean by "outside of the public class" ?

I can't see my error.

0 0
replied on June 28, 2018

Your initial version of the updated code looked like this:

That's not in the proper script infrastructure. So it looks like you published a malformed script.

0 0
replied on July 2, 2018

Oh my bad!

This is not the good one. I changed it on the forum but it looks like the change was not made.

 

This is the good one.

 

namespace WorkflowActivity.Scripting.ScriptSDKExport
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SqlClient;
    using System.Text;
    using Laserfiche.RepositoryAccess;
    using Laserfiche.DocumentServices;

    /// <summary>
    /// Offre une ou plusieurs méthodes qui peuvent être exécutées au moment de l'exécution de l'activité de scriptage du flux de travail.
    /// </summary>
    public class Script1 : RAScriptClass102
    {
        /// <summary>
        /// Cette méthode est exécutée quand l'activité est effectuée.
        /// </summary>
        protected override void Execute()
        {
            // Rédigez votre code ici. La propriété BoundEntryInfo accèdera à l'entrée, RASession obtiendra la section de Repository Access
            Laserfiche.DocumentServices.DocumentExporter DocEx = new Laserfiche.DocumentServices.DocumentExporter();
            DocumentInfo DI = Document.GetDocumentInfo(this.BoundEntryId, RASession);
           // DocumentInfo DI = Document.GetDocumentInfo(GetTokenValue("IDNewDoc"), RASession);
            DocEx.ExportElecDoc(DI, Convert.ToString(GetTokenValue("Chemin")));

        }
    }
}

 

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

Sign in to reply to this post.