02-06-2006 08:27 AM
02-06-2006 08:51 AM
Hi,
The items you set in the Configure | Database Options, can also be set vi the Override Callback Sequence called DatabaseOptions.
You can add this to your SequenceFile via the Sequence File Callback... dialog.
In the Parameters of the DatabaseOptions sequence is a container called DatabaseOptions. When the sequence is called from the ProcessModel entry points Test UUTs or Single Pass, the values of DatabaseOptions are set from the Dialog Configure | Database Options values.
You can now set you own setting, depending on your runtime requirements, by changing the values in the container Parameters.DatabaseOptions. You can use a Expression Step to to this.
I hope this helps
Regards
Ray Farmer
02-07-2006 09:28 AM
Hello,
thanks for your answer.
I tested your solution, but the problem is the process model itself. The sequence "DatabaseOption" is normally called from the sequence call "Get Database Option" in "Test UUTs" sequence. "Get Report Option" copies the content of the container "DatabaseOptions" to the local variable of the sequence "Test UUTs". So if I call the sequence "DatabaseOption" as callback from within my "MainSequence", every option I change is in the container "Parameters.DatabaseOption".
The "Log to Database Callback" uses the local variable as precondition.
So I have to change the local variable in Test UUTs. Is their an opportunity to change local variables from extern.
Regards,
M. Brosig
02-07-2006 04:07 PM
Hi,
No you dont have to modify the process model, that's the idea with the Override Callbacks.
The parameter being passed by reference in the step Get Database Options is Locals.DatabaseOptions.
The parameter being passed by reference to the step Call Database Options Callback is Parameters.DatabaseOptions.
Therefore, when you change the values inside the Sequence DatabaseOptions, these values will be passed back into Get Database Options and then back into Test UUTs or Single Pass, where Locals.DatabaseOptions will contain your changes.
.To check this out, place a break point your Override callback, then F10 back into the callers, you can check the values of the DatabaseOptions Container as it progresses through the various sequences.
Hope this helps
Regards
Ray Farmer
02-08-2006 03:33 AM
Hello,
you are right, it was a wrong approach.
I understand that with callbacks I can overwrite sequences which are located in the process model without making changes to the process model itself. This works fine. But in my case, I want to change the DisableDatabaseLogging flag while runtime. The callback sequence is called once before my MainSequence is called. So when I decide to use database logging in my MainSequence, I have no chance to change the DisableDatabaseLogging flag from their.
That is the reason why I talked about the need of changing the process model. Maybe (I hope) I am wrong.
thanks and regards
M. Brosig
02-08-2006 05:13 AM
Hi,
Ah! I understand.
You can change the runtime properties from you sequence or inside your step by using the Lookup string of
"RunState.Caller.Locals.DatabasesOptions.DisableDatabaseLogging"
Use the TS API PropertyObject.SetValBoolean("DatabasesOptions.DisableDatabaseLogging", 0, newValue) method with RunState.Caller.Locals as your ActiveX Reference. (where newValue would be True or False.)
Depending at what level you perform this API method depends how many "RunState.Caller" you have in your lookup string.
eg.
My example of
PropertyObject.SetValBoolean("DatabasesOptions.DisableDatabaseLogging", 0, newValue) with RunState.Caller.Locals as your ActiveX Reference is based on a step in MainSequence which has been called by the Process Model sequence.
If you have a step in a Sub-Sequence of MainSequence then the lookup string would be
"RunState.Caller.RunState.Caller.Locals" as the activeX reference.
Hope this helps
Regards
Ray Farmer
02-08-2006 08:56 AM
Hello,
perfect, that's what I needed.
Everything works fine, thanks a lot.
Regards
M. Brosig