BPM & VuGen: parameters & alerts (294 Views)
Reply
Frequent Advisor
Didier Honore
Posts: 44
Registered: ‎09-15-1999
Message 1 of 13 (294 Views)

BPM & VuGen: parameters & alerts

Hello,

I am developing a script with Virtual User Generator which will run a transaction over several database.
So I have defined a parameter for the database name.

I can import my script in Business Process Monitor and get alerts if the transaction fails.

But how to know on which database?
Can we include the value of the parameters in the alerts??

Something like:

Database A : passed
Database B : failed


Any ideas , comments??

Thanks

Didier

Please use plain text.
HP Expert
Dmitry Shevchenko
Posts: 4,726
Registered: ‎01-30-2008
Message 2 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

There is no way to include a script parameter value in an alert message. You have 2 workarounds here.

1. Define separate transactions for separate databases in the same script.
2. Accompany every transaction failure with lr_error_message() to put database name in the error message. In this case you'll be able to see the message e.g. in Error Details section of Transaction Analysis report for a specific BPM transaction failure.
Please use plain text.
Advisor
Anders Markussen
Posts: 22
Registered: ‎03-06-2008
Message 3 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

You can also use the function "lr_fail_trans_with_error" witch will fail the active transaction with the specified error message. Include database name in the error message.

Kind regards
Anders
Please use plain text.
Trusted Contributor
Tomer Eckhous
Posts: 230
Registered: ‎02-01-2008
Message 4 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

The only thing that you can do is putting it as error message when you discovered that the transacting failed.
Add in Vugen the option to fail the transaction on error messages.

From your point of view what's going to happened is that when you will see a filature you need to login into BAC -> EUM -> transaction analysis report, click on the cell that got the filature into it, scroll down and you will be able to see the full error description with the DB details.


Please use plain text.
Frequent Advisor
Didier Honore
Posts: 44
Registered: ‎09-15-1999
Message 5 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

an example to be clear about my need:

a transaction:


lr_start_transaction("Login1");

sprintf(env_strg,"Login1 - %s - %s",lr_eval_string("{Hostname}"),lr_eval_string("{Instance}"));

nca_logon_connect("Logon", "{Login}", "{Password}", "{Instance}");

nca_set_window("Navigator");

if (lr_get_transaction_status("Login1") == LR_FAIL)
{
lr_error_message("Login - An error has occurred: %s", param);
}

lr_end_transaction("Login1", LR_AUTO);


I want to send an error message in case of transaction failed.

to test this transaction, I have locked my account.

and currently my transaction is "Pass" and I don't display the message:

Action.c(115): Notify: Transaction "Login1" started.
Action.c(119): Console message: ORA-28000: the account is locked
Action.c(119): Alert message: ORA-28000: the account is locked
Action.c(119): nca_logon_connect("Logon", "ops$ocvalid", "ocvalid01", "OCT451")
Action.c(121): nca_set_window("Navigator")
Action.c(128): Notify: Transaction "Login1" ended with "Pass" status (Duration: 0,5807).
Action.c(130): Error: nca_menu_select_item("Navigator","File;Exit") failed, Window or object is disabled
The window currently in focus: "Forms".
The last popup/alert message received: "Forms - ORA-28000: the account is locked "
Action.c(130): Continuing after error in Vuser script.
Ending action Action.

Any recommendations??

Thanks

Didier
Please use plain text.
HP Expert
Dmitry Shevchenko
Posts: 4,726
Registered: ‎01-30-2008
Message 6 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

Your problem is that neither nca_logon_connect nor nca_set_window return ERROR as you can see in the execution log. It's an error for you as you expected to be logged in, but it's not an error for script - functions were successfully executed.

It's your responsibility to put some check like a text check on the page stating "The account is locked", or whatever check works for you to differentiate between success and failure upon logging in. Think it over.
Please use plain text.
Frequent Advisor
Didier Honore
Posts: 44
Registered: ‎09-15-1999
Message 7 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

That means I have to manage all kinds of error message!!??

There is no way to say : if there is an error (at any level) set the transaction status to LR_FAIL????

Thanks

Didier
Please use plain text.
HP Expert
Dmitry Shevchenko
Posts: 4,726
Registered: ‎01-30-2008
Message 8 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

You should differentiate between logical error (error from your standpoint) and script error (error from script standpoint). In your example the first function that generated a script error was nca_menu_select_item, but you put it outside of the transaction.

If you want to rely on automatic script failure make sure you have it within your transaction. Otherwise, you have to write some sort of error handlers to interpret the logical errors.

One more example. Assume you have a web app and request a page from it with web_url function. If you receive HTTP 404 NotFound web_url will generate an error automatically. But if you get a nice page saying "Sorry, the requested page cannot be found. Please go to Home page." it will be a logical error for you, but web_url returns success just because it got HTTP 200 OK from web server.

I hope it's clear now.
Please use plain text.
Frequent Advisor
Chetan B Dixit (TSP)
Posts: 64
Registered: ‎03-16-2008
Message 9 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

Hello,

I was trying to generate email alerts from BAC, whenever a BPM transaction fails.

I want to get the message in "lr_fail_trans_with_error" into the body of this email alert.

But when I configure email alerts for a business process profile, the status of the alert in "Applications->Alerts->Event Based Alert Reports" is shown as "Fail"! - which means Alerts are being triggered but the email-configuration is incorrect!

I had given a dummy SMTP server name during BAC installation - later I changed it to the correct SMTP server name in the topazsetup.ini (HPBAC\conf directory) and restarted BAC services. I couldn't find any place where I can configure the MS Exchange server name for this email account.

Could anyone please help?

Thanks,
Chetan Dixit
Please use plain text.
HP Expert
Dmitry Shevchenko
Posts: 4,726
Registered: ‎01-30-2008
Message 10 of 13 (294 Views)

Re: BPM & VuGen: parameters & alerts

The right place to edit SMTP server name to be used by BAC is Admin-Platform-Setup and Maintenance-Infrastructure Settings, Foundations=Alerting, "SMTP server (Windows only)".
Please use plain text.
Frequent Advisor
Didier Honore
Posts: 44
Registered: ‎09-15-1999
Message 11 of 13 (292 Views)

Re: BPM & VuGen: parameters & alerts

Below I example of transaction:

lr_start_transaction("Login");

sprintf(env_strg,"Login - %s - %s",lr_eval_string("{Hostname}"),lr_eval_string("{Instance}"));

nca_logon_connect("Logon", "{Login}", "{Password}", "{Instance}");

nca_set_window("Navigator");

// test if the forms window is displayed

nca_get_top_window(window);
if (strcmp(window, "Navigator") != 0){
lr_fail_trans_with_error( " An error has occurred: %s", env_strg);
}

lr_end_transaction("Login", LR_AUTO);


In the alter, I have:



Triggered at location "QFRA"
on Sun Apr 06 8:19:01 PM 2008 (-0400)
Triggered by host "frstr-vsbpm01" (Group "QFRA Group")
Triggered during run of script "OC_45_V11b" (Transaction "Login")

Transaction Error Message:

User Message:

HP Application Management Web Site URL: HP Business Availability Center


But as you can see I don't have the transaction error message.

Any ideas??

Thanks for your help

Didier

Please use plain text.
Frequent Advisor
Chetan B Dixit (TSP)
Posts: 64
Registered: ‎03-16-2008
Message 12 of 13 (292 Views)

Re: BPM & VuGen: parameters & alerts

Thanks Dmitry. It's working now.

Best Regards,
Chetan Dixit
Please use plain text.
Frequent Advisor
Chetan B Dixit (TSP)
Posts: 64
Registered: ‎03-16-2008
Message 13 of 13 (292 Views)

Re: BPM & VuGen: parameters & alerts

For the question from Didier Honore about Transaction Error Message:

Upgrade to BAC 7.01 - you will start seeing the Transaction Error messages.

I too did the same - the messages which were not appearing in BAC 7.0 started appearing in BAC 7.01.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation