Close popover
Soujanya T (SOUJANYA11)
Infosys Limited

Infosys Limited
SOUJANYA11 Member since 2011 2 posts
Infosys Limited
Posted: January 22, 2019
Last activity: February 26, 2019

Email Channel Interface - ruta scripts written for text extraction are not working

Hi Team,

We are implementing e-mail channel for our POC. We want to run text analyzer on our incoming e-mail to parse the email body. As part of that we are creating Decision Data entities and corresponding Text Files with ruta scripts. The challenge we are facing is that the body has content as below.

Hi Team,

Kindly raise a claim with below details.

Policy Number : XXXXXXX

Was there any fatality : Yes

Was there any witness : No etc..

Thanks & Regards,


So we want to set WasThereAnyFatality property to hold value "Yes", WasThereAnyWitness property to hold value "No" based on the information from email. We have written ruta script in text file with naming convention as EntityRule.FileName.ruta but the script does not seem to work. Your help will be greatly appreciated.

Was there any fatality script looks like below.

PACKAGE uima.ruta.example;


W?{REGEXP("(^Was there any fatality :)")-> MARK(VarA)}
W?{REGEXP("[Yes|No]")->MARKB, MARK(EntityType,1,3), UNMARK(VarA),UNMARK(VarB)};

The above script doesn't throw any error but when we test from Decision Data rule it doesn't extract anything when we provide input as "Was there any fatality : Yes".

Our expectation is the property should hold the entire text and we can use WhatComesAfterFirst(:) function to get the exact value.

Kindly help us resolve the issue of parsing data from email body.

Thanks & Regards,


***Edited by Moderator: Pallavi to update platform capability tags***

Pega Intelligent Virtual Assistant Case Management Decision Management
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.