on 12-22-2013 4:26 PM
Dear Gurus,
I want to generate Mail from PCO but with some terms and condition. I am saving notification in SQL data base with required entries. But I also need to generate E Mail against each new message. my condition is if a notification with a unique counter has already send an E mail, system will not repeat sending mail for specified tags for Email not for all.
In main transaction, I have configured E mail sending and in this I have assigned child transaction for processing XML output message from PCO which update SQL server with data required.
After mail action block, I use SQL query to update digit "1" against same counter.
I have child transaction out put tag Name (string), and from this tag name, I fetch data for E mail ID either it belong to Email tag or not
if this condition true,
SQL query, to fetch data against tag by filtering parameters "TagName" and "Email" not equal to "1".
system give me output,
Here I am putting condition action block, if there is counter metting query, system give me blank, and my logic came false and I am not able to get respective result.
Kindly suggest me how to use either condition block, switch or any other one.
Thanks
Best Regards,
Muhammad Ashfaq
Hi Muhammad,
SQL table structure should be with table name COUNTER
Tag Name | Email ID | Counter |
Tag001 | xxx@email.com | 1 |
And Transaction should be
1st Sequence: Tag query for fetching from Pco
2nd Sequence: SQL query, which needs to fetch existing data from COUNTER table by passing above tag query details
3rd Sequence: keep condition action block, if above query scucces or rowcount more than 1, it should go through left path (i.e. Email action block). If not it skip (i.e. Right side path)
4th : Down to Email action block, add SQL insert Query action block which it needs to insert new records in COUNTER table with details (i.e. Tagname, EmailID & counter).
Hope it will solve your requirement
Regards,
Praveen Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Praveen,
I have already same structure, but at the time of transaction call my condition become false while it shows me true in workbench. My condition was this.
if(GetNotificationMailsent.Results{/Rowsets/Rowset/Row/email_status} == 2, 1, 0)
email_status having only two values,
1 = Mail has send
2 = Mail not send
In SQL output, emai_status == 2, but on execution it come false.
and I have replace it with this logic
if(GetNotificationMailsent.Results{/Rowsets/Rowset/Row/email_status} != 1, 1, 0)
system giving me my desire logic.
Thanks for your kind support.
Best Regards,
Muhammad Ashfaq
If you want keep two validation in one condition action block,
select AND radio button (by default it will be on OR radio button) in conditions action block properties and add two validation conditions in Config link.
And also, you can pass two or more inputs to condition action block; goto Config object and pass number of inputs (by default it will one).
Regards,
Praveen Reddy
User | Count |
---|---|
11 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.