We used below code in one of the steps to remove security tag. Recently we moved to SSL. This script activity stopped working after moving to SSL
namespace WorkflowActivity.Scripting.RemoveAccessTags
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using LFSO80Lib;
//using LFSO81Lib;
/// <summary>
/// Provides one or more methods that can be run when the workflow scripting activity is performed.
/// </summary>
public class RemoveAccessTags : ToolkitScriptClass
{
// Execute the script below when this activity is executed.
// The 'MsgBox' function is available for design-time testing.
protected override void Execute()
{
// TODO: Script Code Here
LFDatabase db = (LFDatabase) this.Database;
LFDocument doc = (LFDocument) this.Entry;
RemoveTags(doc, db);
//MsgBox("this id: ");
}
public void RemoveTags(LFDocument doc, LFDatabase db) {
System.Collections.Hashtable hash = new System.Collections.Hashtable();
LFTagData tagInfo = (LFTagData) doc.TagData;
foreach (LFTag single in tagInfo) {
hash.Add(single.Name, single);
}
LFTag t;
foreach (string s in hash.Keys) {
t = (LFTag) db.GetTagByName(s);
tagInfo.RemoveTag(t);
}
tagInfo.Update();
}
}
}