truClient - 2nd transaction starts before 1st one ends
I have a script with multiple transactions that was developed using truClient. The script fails in about half of the executions (via BPM).
When running the script manually, I notice that whenever I get a failure, the 2nd transaction starts being executed before the 1st transaction ends, although all the steps in both transactions finish successfully . When a failure happens, at the end of the reply log I get either a notify message about the 1st transaction failing or an error message suggesting that the transaction was never started. :
- Notify: Transaction "View Inbox" ended with "Fail" status (Duration: 103.6854).
Error: Failed to end Transaction "View Inbox" (by name). Please check that you made a call to start transaction operation
Did anyone encounter this issue before? Any ideas how to work around it?
I tried to put a "wait 3 seconds" step in between the 1st and 2nd transactions. I also tried to remove the 1st transaction and then re-apply it but I'm still getting these errors.
Thanks for you help!
Check the step that your transaction is using as a Starting Point is set to level 1, and the event used is something that will happen consistently. You can also try using a "Wait for Object" function instead of a hard coded "Wait x seconds" function.
Does the script run from start to finish in interactive (Firefox) mode?
The script does run from start to finish in interactive mode but anyway, I believe I found the issue.
While each step has an "End Event" trigger, the transaction itself hold its own value of ending event. One would expect the transaction's End Event value to have the same value of the last step contained in it, but this is not necessarily the case.
For example, if your last step has an End Event="Action Completed" but the wrapping transaction has an End Event value="Step network completed", than you might run into a situation in which the last step has ended but the transaction is still hanging. This is exactly the scenario I was facing. vuGen finished the last step on a given transaction, and continued to execute the steps in the following transaction while the transaction itself did not finish. Once I changed the transaction's End Event to match the value of its last step, the transaction finished right after its last step.
Not sure if this is a bug or not, but for me, the intuitive thing is to have the transactions inherit the End Event value from their contained last step. Especially, given that the End Event for the transactions is not visually present on the left pane, with the steps and transactions sequence.
Thanks again for your help. I hope I saved some time for some other folks that may run into the same issue.
My script is running fine in the standalone Vugen mode, but when i run it in HP PC, it is logged as transaction failed inspite of all the steps in the transaction completed successfully. On investigating through the logs I found that the transactions are not ending & at the end it shows that the script is failed as all the transactions failed as they are not ended.
I tried the solution of using the same end event for the transaction same as the end event of the last step in the transaction.
Please suggest me a way out of this ASAP.
Thanks a lot........