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

Question

Question

Workflow Script Actvity

asked on June 9, 2021

Please suggest some  effective ways to  debug code of script activity in workflow . Also tokens created are scoped for the script can be traced through track tokens activity within workflow or not? 

0 0

Answer

SELECTED ANSWER
replied on June 9, 2021 Show version history

See the below code for creating tokens (StringToken and NumberToken) and outputting debug messages:

 

// Create two tokens
SetTokenValue("StringToken","This is the value of the StringToken");
SetTokenValue("NumberToken",12345);

// Output messages
WorkflowApi.TrackInformation("This is an information message that contains the NumberToken: "+GetTokenValue("NumberToken").ToString());
WorkflowApi.TrackWarning("This is a warning message that contains the StringToken: "+GetTokenValue("StringToken").ToString());
WorkflowApi.TrackError("This is an error message that contains both the StringToken and NumberToken: "+GetTokenValue("StringToken").ToString() +" / "+GetTokenValue("NumberToken").ToString());

 

These messages can be used to debug token/variable values. When you run this script you'll see the following:

 

Also, any tokens created using this method can be used downstream in the same Workflow:

 

They are also fully trackable:

0 0

Replies

replied on June 9, 2021 Show version history

Hi Arjun,

You and @████████have been asking a bunch of questions about the same project but haven't yet said what you're actually trying to accomplish with this workflow and the Script activity it contains. It's been difficult for us to offer advice specific to your situation because we still don't know what you're try to do. 

If you can share details about your objective and what this script is doing and why, people might be able to offer you more relevant guidance. Better yet, post the script code (redact/replace variable names etc. if you think that's necessary for confidentiality), and some of the programmers who frequent Answers might take a look.

0 0
replied on June 10, 2021

Hi Carson,

I think you are referring to High CPU usage we are posting 

I have started separate thread for the same.

Workflow CPU Load - Laserfiche Answers

If ask is not clear can elaborate on the above thread.

 

Thanks.

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

Sign in to reply to this post.