Workflow trouble with a script

chbartholom
Tera Contributor

I'm having some trouble with the following script in a workflow catalog task.  The task default has a 3rd step in the description and short description.WFScript.png 

The problem is the description and short description are being shortened even when employee type is "Regular". I added the log line just to be sure the employee type was being captured correctly and have confirmed that part. I also have this same script running in 2 sub PROD instances and it is working as expected in both of them. This is only an issue in the PROD instance. 

 

Any idea what would be causing an issue only in 1 instance?

6 REPLIES 6

SAI VENKATESH
Tera Sage
Tera Sage

Hi @chbartholom 

 

can you trim function to remove unnecessary spaces?

 

Thanks and Regards

Sai Venkatesh

James Chun
Kilo Patron

Hi @chbartholom,

 

What do you mean by the description and short description are being shortened? Are you saying that they are being truncated? If so, they may be due to the 'Max length' property of the dictionaries.

 

Cheers

Hi James, thanks for the response.

 

The default short description is" Set Out of Office / Forward Email / Update OneDrive Owner". The description has steps 1-3 with a line for each thing mentioned in the short description. The script sets the short description text to "Set Out of Office / Update OneDrive Owner" and similarly sets the description without the step for forwarding email. I've attached a screenshot of the default vars from the TASK below. 

TASK_default_vars.png

 

The issue I'm having is that the if is triggering and removing the forward email text when it shouldn't be. The task and script are working as expected in both of our sub-PROD environments. I'm only seeing the issue in our PROD environment. 

 

If script screenshot again for convenience:

WFScript.png

Thanks @chbartholom,

 

Correct me if I misunderstood the issue, what you are saying is that once the 'If' activity is triggered, the description of the Task is being overwritten to the following:

1. Set up a default out of ......

2. Set up terminated user...

And the issue is that the description doesn't include the instruction about forwarding the email (i.e. Set up email forwarding to to terminated....).

 

I don't see the instruction about forwarding the email in the 'If' script, isn't that why the description is not behaving as your expectation?

 

Cheers