KTA 7.1 - Can the KTA SDK be called in the C# node
Summary
12271
Problem
How do I call the TotalAgility SDK from a c# script activity?
Answer
Please see and example below of how the logon method can be called from a c# script node. Information on namespaces and the assemblies they lie in can be found in the SDK documentation. Any referenced assemblies must be added as a .NET reference in the Integration module.
using System; using Agility.Server.Scripting.ScriptAssembly; using Agility.Sdk.Services; using Agility.Sdk.Model.Interfaces.Services; using Agility.Sdk.Model.Users; using System.Runtime.Serialization; namespace MyNamespace { public class Class1 { public Class1() { } [StartMethodAttribute()] public void Method1(ScriptParameters sp) { UserService us = new UserService(); UserIdentity ui = new UserIdentity() { LogOnProtocol = 7, UnconditionalLogOn = true, UserId = "testuser" }; us.LogOn2(ui); } } }
Keywords: script, TotalAgility.sdk