Multi line email body using email action pack and UC_CRLF() script function

book

Article ID: 210147

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Not able to configure multi line email body using email action pack and UC_CRLF() script function

Trying to get new line in body of mail for better formatting using script variable and UC_CRLF() script function

Example


1) Create JOBP standard workflow and use the email action pack

In Process tab Use the :PSET statement to assign UC_CRLF script function to variable
:pset &nl# = UC_CRLF()

 

2) Use this variable in the email body
example

TEST &nl# TEST2 &nl# TEST 3

On execution Job fails and Report of [email protected] contains below exception

=================================================
Exception NullPointerException occured
Message: null
Detailed Information:

email-tool: ERROR: null
java.lang.NullPointerException
at com.uc4.ara.feature.mail.Send.run(Send.java:62)
at com.uc4.ara.feature.AraFileCmd.main(AraFileCmd.java:125)

=================================================
Executing mail Send finished
Ended at 2021-02-20 03:06:00
Elapsed Time: 0 min, 0 sec
Return Code: 999

Exception found: System.Management.Automation.CommandNotFoundException
Exception text: The term 'TEST2' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Environment

Release : 12.3 /12.3.x

Component : AUTOMATION ENGINE /AWA

Email action pack 1.17/1.19

Resolution

Set the email body text between "".
Instead of

TEST &nl# TEST2 &nl# TEST 3

Use

"TEST &nl# TEST2 &nl# TEST 3"
in the email body.