Enterprise Architect: create a return message in sequence diagram - enterprise-architect

I have the following sequence diagram:
How do I change the message which comes from Object2 to Object1 to contain a return result message and not a method call.

As xmojmr said:
in the context menu / Properties of the message.

Related

How to add Currency and SettlType to InstrmtMDReqGrp in MarketDataRequest <V>

I'm implementing a FIX program as initiator that connect to market and send & receive fix messages. In one step I need send MarketDataRequest message to market, but something happened that the message is rejected by market.
I have tried add Fields Currency.FIELD and SettlType.FIELD, but in final message in the final message they do not appear.
I need send message like:
8=FIXT.1.1 9=222 35=V 34=1013 49=**** 52=20190117-17:23:48.670 56=**** 128=FGW 262=MD1 263=0 264=5 265=1 266=Y 146=1 55=GGAL 48=GGAL-0002-C-CT-ARS 167=GO 207=XMEV 15=ARS 63=2 267=9 269=0 269=1 269=2 269=4 269=5 269=7 269=8 269=B 269=3 10=215
But I can not put the tag 15 and 63 before the tag 267.
My code now:
InstrmtMDReqGrp instrmtMDReqGrp = new InstrmtMDReqGrp();
NoRelatedSym noRelatedSym = new NoRelatedSym(1); //146
instrmtMDReqGrp.set(noRelatedSym);
SettlType settlType = new SettlType(); // 63
settlType.setValue("2");
Currency currency = new Currency(); // 15
currency.setValue("ARS");
instrmtMDReqGrp.setField(Currency.FIELD, currency);
instrmtMDReqGrp.setField(SettlType.FIELD, settlType);
In the final message these fields do not appear.
I'm using quickfixj with quickfixj-spring-boot-starter 2.2.1.
You are forgetting to call addGroup on the message, like so:
fixMessage.addGroup(instrmtMDReqGrp);
A small documentation page exists for repeating groups in QuickFIX/J, which demonstrates this:
Creating Messages With Repeating Groups
Here is an example of a message that distributes market data. When the
message is created the required field with the number of repeating
groups is set to zero. This is because QuickFIX will automatically set
this field for you when you add groups. This way there is never an
inconsistancy between the number of entries in the field and in the
message.
package quickfix;
quickfix.fix42.MarketDataSnapshotFullRefresh message =
new quickfix.fix42.MarketDataSnapshotFullRefresh(new Symbol("QF"));
quickfix.fix42.MarketDataSnapshotFullRefresh.NoMDEntries group =
new quickfix.fix42.MarketDataSnapshotFullRefresh.NoMDEntries();
group.set(new MDEntryType('0'));
group.set(new MDEntryPx(12.32));
group.set(new MDEntrySize(100));
group.set(new OrderID("ORDERID"));
message.addGroup(group);
group.set(new MDEntryType('1'));
group.set(new MDEntryPx(12.32));
group.set(new MDEntrySize(100));
group.set(new OrderID("ORDERID"));
message.addGroup(group);
What's reject fix message you get back? It usually gives the tag number that contains the error plus some error description.
Usually the structure of fix messages is defined by a data dictionary provided by the Acceptor. If this data dictionary differs from the one built in the quickfixj library, you will need to recompile quickfixj core library with this data dictionary so messages are parsed correctly but also tags are placed in the correct order when creating new messages.

mirth connect Database Reader automatic column mapping

Please could somebody confirm the following..
I am using Mirth Connect 3.5.08232.
My Source Connector is a Database Reader.
Say, I am using a query that returns multiple rows, and return the result (via JavaScript), as documentation suggests, so that Mirth would treat each row as a separate message. I also use a couple of mappers as source transformers, and save the mapped fields in my channel map (which ends up to contain only those fields that I define in transformers)
In the destination, and specifically, in destination response transformer (or destination body, if it is a JavaScript writer), how do I access the source fields?
the only way I found by trial and error is
var rawMsg = connectorMessage.getRawData();
var xmlMsg = new XML(rawMsg);
logger.info(xmlMsg.some_field); // ignore the root element of rawMsg
Is this the right way to do this? I thought that maybe the fields that were nicely automatically detected would be put in some kind of a map, like sourceMap - but that doesn't seem to be the case, right?
Thank you
If you are using Mapper steps in your transformer to extract the data and put it into a variable map (like the channel map), then you can use any of the following methods to retrieve it from a subsequent JavaScript context (including a JavaScript Writer, and your response transformer):
var value = channelMap.get('key');
var value = $c('key');
var value = $('key');
Look at the Variable Maps section of the User Guide for more information.
So to recap, say you're selecting a column "mycolumn" with a Database Reader. The XML sent to the channel will be something like this:
<result>
<mycolumn>value</mycolumn>
</result>
Then you can choose to extract pieces of that message into specific variables for later use. The transformer allows you to easily drag-and-drop pieces of the sample inbound message.
Finally in your JavaScript Writer (or in any subsequent filter, transformer, or response transformer), just drag the value into the field you want:
And the corresponding JavaScript code will automatically be inserted:
One last note, if you are selecting a lot of variables and don't want to make Mapper steps for each one individually, you can use a JavaScript Step to iterate through the message and extract each column into a separate map variable:
for each (child in msg.children()) {
channelMap.put(child.localName(), child.toString());
}
Or, you can just reference the columns directly from within the JavaScript Writer:
var msg = new XML(connectorMessage.getEncodedData());
var column1 = msg.column1.toString();
var column2 = msg.column2.toString();
...

Talend component tPivotToColumnsDelimited generates error "The method parseObject(String) is undefined for the type Object"

I am using the component tPivotToColumnsDelimited in Talend 6.1.1. When I try to run the job I get the error message "The method parseObject(String) is undefined for the type Object".
In code view I can see the error relates to this line of Talend-generated code:
sumtPivotToColumnsDelimited_1 = Object.parseObject(row3.Amount + "")
As you can see from the process flow above, the data comes from an SQL query. The schema flowing into the tPivotToColumnsDelimited looks like this:
The tPivotToColumnsDelimited component settings look like this:
Any suggestion how to fix it?
Its clear that Talend cannot parse an Object typed variable, You need to change the type of column Ammount to other type like int, float.

Lookup Edit binding

I have a model written using Entity Framework Code First called Project.
In my UI, there is a page called ProjectEdit as shown in the image below. As seen in the image below, Customer and BOMs are Lookup Edit.
I'm trying to load Customer and BOMs to Lookup Edit but it's not working. Below is my code.
//New
if (entity == null)
{
Entity = new Project();
}
//Edit
else
{
ProjectCodeTextEdit.DataBindings.Add("EditValue", entity, "ProjectCode");
DescriptionTextEdit.DataBindings.Add("EditValue", entity, "Description");
CustomerLookUpEdit.DataBindings.Add("EditValue", entity, "CustomerId");
BOMsLookUpEdit.DataBindings.Add("EditValue", entity, "BOMs");
}
Below is my LookUpEdit Properties.
Generally LookUpEdit object's data binding is not implemented the same way as a TextEdit object's. While in TextEdits's case you just need to assign the variable value to EditValue property (I suppose your TextEdits binding work fine, isn't it?), with LookUp Edit you should assign variables to ValueMember and a DisplayMember properties of the object. That is why we usually display data rows with LookUpEdit objects, where ValueMember is the identification field of the row and DisplayMember is the field of the row whose value you wish to be displayed.
In your case you should be more clear about what you wish to display in your lookupedits. Each Project instance has one Customer property and many BOMs, right? So CustomerLookUpEdit will show one record and BOMsLookUpEdit a list of values according to the Project object that was chosen for edit, correct? I suppose that both your Customer and BOM classes have some kind of ID property and description property of their own. In this case you should bind these values to the LookUpEdits. eg. in your initialization function code add these lines
CustomerLookUpEdit.Properties.DataSource = entity.Customer;
CustomerLookUpEdit.Properties.ValueMember = "someCustomerIDpropertyName" ;
CustomerLookUpEdit.Properties.DisplayMember = "someCustomerDescriptionpropertyName";
BOMsLookUpEdit.Properties.DataSource = entity.BOMs;
BOMsLookUpEdit.Properties.ValueMember = "someBOMIDpropertyName" ;
BOMsLookUpEdit.Properties.DisplayMember = "someBOMDescriptionpropertyName" ;
You can read more in this topic https://documentation.devexpress.com/#WindowsForms/clsDevExpressXtraEditorsLookUpEdittopic
When we are adding entities to a List, we have to take care of our DataSource if is a DBContext or a DBSet, each one has implications in the compiler, that was your case, in this case you had to especify your DataSource like a DBSet and get the Entities
Add<TEntity>(TEntity entity)
The type parameter omitted is posible because the compiler will infer it.

pointing a skipped item and the error field in a chunk in spring batch

Scenario 1
The skip listener interface is as below:
public interface SkipListener<T,S> extends StepListener {
void onSkipInRead(Throwable t);
void onSkipInProcess(T item, Throwable t);
void onSkipInWrite(S item, Throwable t);
}
This interface is best used to log the skipped item and the error.
Is is possible to get the number of the skipped item in the input. For e.g. if the 10th item in the input is getting skipped, I should be able to log "Item number 10 was skipped!" through above listener.
I need this since I have input as a file where the rows are not having any identifying key. So just by logging out the item, it would not be possible to pin point the item itself in the file.
What if instead of file, the input is a database table ? Is it possible to get the position number of the skipped item there as well ?
Scenario 2
My bean has three properties one, two and three (all strings) where the input is read from a file through appropriate row mapper and then a database table gets loaded with the data after some processing.
Below is a code block from processor:
if(two.charAt(4) == '_')
{ // do some processing }
Clearly if field two is coming empty from the file above block will throw "string index out of bound exception" and will get skipped.
So, inside skip listener, what I want is the information about the column which threw error.
Here since field named two gave error, the information I would like to log in skip listener would be like "Property one threw error "string index out of bound exception" in line number 10" or if possible, even more specific "property one is empty in line number 10" which makes more sense to business who does not know java jargons.
Hope I made my doubts clear.
Thanks for reading!
Scenario 1
to get line number for skipped item from reading a file you can:
for onSkipInRead - implement own/wrap the reader to act on exception
onSkipInProcess - implement own linemapper which writes line number to item or writes current line number in step context
onsKipInWrite - same as for onSkipInProcess
to get line number for skipped item from reading a table you can:
for onSkipInRead - implement own/wrap the reader to act on exception, but i'm not sure if it's possible to the get the line number here, might only be the current chunk-start-number
onSkipInProcess - implement own rowmapper which writes row number to item or writes current row number in step context
onsKipInWrite - same as for onSkipInProcess
Scenario 2
see scenario 1 and add a try/catch block inside your processor, so you throw your own exception e.g. with information on property position, or alter the step context in a similar way