Datapower WTX output issue - ibm-datapower

I am doing WTX transformation in datapower in probe i can see output is generated properly, but when I check the output in the target queue it is populating with the input request and the WTX transformed output. can i get some cause why it may come like this?

make sure you have some action that takes INPUT as its input context before your WTX binary transform. Otherwise it gets passed along to the backend.

I normally set the WTX Transform as explicit and then have the INPUT as Input to the Action and explicitly set the "real" Inputs to the context of the Input-card(s) on the map.

Related

How do you apply src_indices in promotes_inputs=[], when you have multiple promoted inputs?

The docs only show examples for when a component promotes a single input. How do I use src_indices to indicate that only one of my promoted inputs takes a certain slice?
p.model.add_subsystem('ComputeWakePosition', ComputeWakePosition(num_wake_points_per_side=4),
promotes_inputs=['wake_upper_lengths',
'wake_lower_lengths',
'wake_upper_angles',
'wake_lower_angles',
'displaced_cw_coordinates'], <-- I want to specify src_indices for this input only.
promotes_outputs=['upper_wake_coordinates',
'lower_wake_coordinates'])
I think I would be able to just use connect for that input, but given that everything else I've written doesn't use it, it'd be nice if there was a way to avoid it.
There is a function called promotes that you can call on your group after you've added a subsystem. In your code above, you could remove the promotion of the displaced_cw_coordinates variable from your add_subsystem call and make a separate call something like this p.model.promotes('ComputeWakePosition', inputs=['displaced_cw_coordinates'], src_indices=[2,4,6,8])

How to format the Level column value in Serilog’s MS Sql Server Sink

I am trying to use Serilog in my .Net Core API to log to SQL Server with the Serilog-Sinks-MSSqlServer sink. The standard Level column either writes out the full value (e.g. Information, Warning, Error) or a TinyInt enum value if you set the StoreAsEnum property to true as shown here. I cannot seem to find an easy way (like there is in Log4net and NLog) to format the output to write only the first character of the Level (e.g. I, W, E). I tried setting the DataLength property to 1 but that causes the log entry to not be written at all.
I have been able to accomplish my desired behavior with a custom enricher that takes the Level value from the standard column and then uses just the first character to write to a custom column while removing the standard Level column but that really seems like overkill when I feel like there may be a formatting mechanism somewhere that I just haven’t seen.
For Serilog.Sinks.MSSqlServer, it does not expose easy way to custom the Level value.
If you check MSSqlServerSink, you will see that it convert IEnumerable<LogEvent> events to _traits.eventTable by a private method, which means you could not override the method void FillDataTable(IEnumerable<LogEvent> events).
In addition, for MSSqlServerSinkTraits, it is internal, you could not inherit from it to implement your own MSSqlServerSinkTrait.
There is no much thing you could not if you want to override something from Serilog.Sinks.MSSqlServer.
For easiest way, you may consider forking the Serilog.Sinks.MSSqlServer, and change GetStandardColumnNameAndValue from below code
case StandardColumn.Level:
return new KeyValuePair<string, object>(columnOptions.Level.ColumnName, columnOptions.Level.StoreAsEnum ? (object)logEvent.Level : logEvent.Level.ToString());
to change logEvent.Level.ToString() to your expected value like logEvent.Level.ToString().Substring(0,1).
Then build the project and reference this project instead of Serilog.Sinks.MSSqlServer

BizTalk Create Message in BRE Rule

In an orchestration I notice that if I right-click in a construct message shape and select "Insert Shape" then three options are enabled:
Transform
Message Assignment
Call Rules
I would like to use the Call Rules option, have the rule populate a newly constructed message. Unfortunately, when I select this, I get the message "A Construct statement can only contain Message Assignment and Transform shapes".
Does anyone know if it possible to have a message populated in a BRE rule?
It seems the construct shape isn’t required. I guess a copy of the message that’s passed into the rule gets created implicitly.

Setting default RTO (Retransmit Timeout) value in ns-3 simulator

I found this in rtt-estimator.h the constructor sets the value for m_initialEstimatedRtt which I believe directly controls the Retransmit Timeout value.
I am not sure how to set the value for m_initialEstimatedRtt.
I see a method named SetCurrentEstimate that could be used to change that value but I am not sure at what stage in the simulation I should modify it if I use that so I prefer to control the initial.
Also I'm wondering what is the default value set in the examples and where can I find it?
There are many ways to set that variable, chiefly through the attribute system. The attriobute associated to that variable is ns3::RttEstimator::InitialEstimation from rtt-estimator.cc)
If you have followed the standard script layout, all you need is to use the following command-line argument:
--ns3::RttEstimator::InitialEstimation=1.0s
The tutorial gives a gentle introduction to the use of attributes through the command-line and environment variables:
http://www.nsnam.org/docs/release/3.19/tutorial/html/tweaking.html#using-command-line-arguments
There are more details there:
http://www.nsnam.org/docs/release/3.19/manual/html/attributes.html
You might find the ConfigStore useful too:
http://www.nsnam.org/docs/release/3.19/manual/html/attributes.html#configstore

Can connectSlotsByName connect to selection model changes?

In my main window (QMainWindow) I have a QTableView (named commandsTableView). Now I want to react on its selection changes.
I made a slot and connected it manually to ui.commandsTableView->selectionModel(). All works fine.
But then I thought: why not use auto-connection (especially that there will be more connections to be done)? At least it will add more force to consistent naming rules.
Yet I wasn't able to find proper name syntax. I tried:
on_commandsTableView_selectionModel_selectionChanged,
on_commandsTableViewSelectionModel_selectionChanged,
on_commandsTableView_selectionChanged,
on_commandsTableView___selectionChanged
but neither worked. In all cases there is there is a message on output when running the app (with corresponding slot name, here only first given as an example):
QMetaObject::connectSlotsByName: No matching signal for on_commandsTableView_selectionModel_selectionChanged(QItemSelection,QItemSelection)
(Why there are no assertions in response for connection errors - that I cannot understand. I lost much time wondering what is wrong before I spotted those - and alike - messages on output.)
The object returned by ui.commandsTableView->selectionModel() has an empty name. But setting it to selectionModel prior to making a call to connectSlotsByName doesn't help either.
According to the documentation connectSlotsByName() only supports signatures like
void on_<object name>_<signal name>(<signal parameters>);
According to the sources that's the only form it checks (watch how it collects a list of children, then matches parent's method names against names of the children).
Hence, to be able to use auto-connection you would have needed a named selection model, which would continue existing from the call to connectSlotsByName() onwards. Each time you change the selection model (not likely) or the model (likely) you'd have to name the selection model and auto-connect again. But alas connectSlotsByName() will duplicate all other connections as it doesn't seem to check if connections are unique, so we have to connect signals to such dynamic children as models, scenes etc manually.
I think it's
on_selectionModel_selectionChanged(const QItemSelection & selected, const QItemSelection & deselected)

Resources