Hi all,
Using Workflow and SDK (C# .NET) I created a script that allows me to automatically print documents.
This is my Script.
namespace WorkflowActivity.Scripting.Print
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Laserfiche.RepositoryAccess;
using System.Diagnostics;
using System.IO;
public class Script1 : RAScriptClass102
{
protected override void Execute()
{
Process process = new Process();
process.StartInfo.FileName = "C:\\Program Files (x86)\\Foxit Software\\Foxit Reader\\Foxit Reader.exe";
process.StartInfo.Arguments = string.Format("-p \"" + GetTokenValue("File") + "\" \"gdn02ptr006\"");
process.Start();
process.WaitForExit();
}
}
}
I updated Laserfiche from 10.2 to 10.4 the week before and from this moment, my script doesn't work anymore.
I tried to make a new one and run the calc.exe.
namespace WorkflowActivity.Scripting.ScriptSDK
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Laserfiche.RepositoryAccess;
using System.Diagnostics;
/// <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 : RAScriptClass104
{
/// <summary>
/// Cette méthode est exécutée quand l'activité est effectuée.
/// </summary>
protected override void Execute()
{
Process process = new Process();
process.StartInfo.FileName = "C:\\Windows\\System32\\calc.exe";
process.Start();
}
}
}
This is strange because from the Script Editor, my Script is running correctly and my calc.exe is executed.
Do I have to change something?
Thanks for your help.
Regards