Hi there,
Can i add 2 business error from config file when i use throw activity? With this business message i wan to split and put one error as subject header and the other is body
Hi there,
Can i add 2 business error from config file when i use throw activity? With this business message i wan to split and put one error as subject header and the other is body
You can pass something like
New BusinessRuleException(“Subject: " + Config(“BESubject”).toString +” Body: "+ Config(“BEBody”).ToString)
Later where ever you wanna pass it separately you can split the string:
For Subject : exception.Message.Split(“Body:”)(0).Replace(“Subject:”,“”).Trim
For Body : exception.Message.Split(“Body:”)(1).Trim
Thanks
Hi @adiijaiin i am getting an error when i input in throw activity New BusinessRuleException(Config(“BESubject”).toString, Config(“bedate”).ToString)
@Palaniyappan please help me
the request can be interpreted in multiple directions and maybe you can share with us a sample with the expected result.
In general we can do:
BEX - Business (Rule) exception
@ppr i am trying to throw a data entry using business error. However i need 2 values to be a business message from config file. One is for email header and another is email body. How to achieve it?
sorry, repeating the use case description will not help us, when we ask for reformulation or sample. Thanks for support
What is the error?
And have you created key value pairs in Config by the name BESubject and bedate?
@adiijaiin the error message is Value of type ‘string’ cannot be converted to system exception
Hi
Step 1:
Add the business exception to your config like this
Text sample:
This is the email Subject|This is the body of the email
Step 2:
Capture the Subject using an assign
Left assign
str_Subject
Right assign
Split(Config(“BE_1”).ToString, “|”)(0).ToString
Step 3:
Capture the Body using an assign
Left assign
str_Body
Right assign
Split(Config(“BE_1”).ToString, “|”)(1).ToString
Hopefully I have understood your request.
Cheers
Steve