cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow System Task/ Unity Script - Hidden Keyword

Christie_Rasiah
Confirmed Champ
Confirmed Champ

We upgraded our test environment v16 to v18.  We have a system workflow action to run a unity script to retrieve a hidden keyword and do some processing.

string keywordTypeName= "SSN";

KeywordType keywordType = app.Core.KeywordTypes.Find(keywordTypeName);

if (keywordType == null)

{

          app.Diagnostics.WriteIf(Diagnostics.DiagnosticsLevel.Warning,"Keyword Type '{0}' Not Found!",keywordTypeName);

}

else

{

           if (args.Document.KeywordRecords.Find(keywordType) == null)

          {

                    app.Diagnostics.WriteIf(Diagnostics.DiagnosticsLevel.Warning,"Keyword Type '{0}' Not Configured in Document Type                {1}",keywordTypeName,args.Document.DocumentType.Name);

          }

else

         {

         if (args.Document.KeywordRecords.Find(keywordType ).Keywords.FindAll(keywordType ) == null)

                 {

                 app.Diagnostics.WriteIf(Diagnostics.DiagnosticsLevel.Warning,"Keyword Values for '{0}' Not Found in Document [{0}]: [{1}] -    {2}",keywordTypeName,args.Document.DocumentType.Name,args.Document.Name,args.Document.ID);

                 }

         }

}

I am getting below message in dignostic console. 

Keyword Type 'SSN' Not Configured in Document Type Employee File.

Does any unity script execution security changed in v18 workflow user context?

1 ACCEPTED ANSWER

Scott_Poti1
Star Contributor
Star Contributor

I've never used hidden keywords but after looking at the sdk for v18 this might be what you are looking for,

https://sdk.onbase.com/unitySDK/html/baf2aa10-47f7-c398-baa0-cb11512d393f.htm

DocumentType.HiddenKeywordTypes Property

The collection of KeywordTypes that are configured to be hidden on this document type. Note: This is not enforced by the Unity API and if the programmer wants to enforce it this collection must be used to enforce it.

View answer in original post

2 REPLIES 2

Scott_Poti1
Star Contributor
Star Contributor

I've never used hidden keywords but after looking at the sdk for v18 this might be what you are looking for,

https://sdk.onbase.com/unitySDK/html/baf2aa10-47f7-c398-baa0-cb11512d393f.htm

DocumentType.HiddenKeywordTypes Property

The collection of KeywordTypes that are configured to be hidden on this document type. Note: This is not enforced by the Unity API and if the programmer wants to enforce it this collection must be used to enforce it.

Thank you Scott!

I changed the script to use property and it worked without error.

 Set hidden keyword to a property using workflow action and used the property in Unity Script.