on 06-23-2015 7:10 PM
Hi All,
I have a requirement to append unique identifier (Identifier will differ each box) in payload which will not be sent through sender,I am using Java Mapping for message transformation hence need to know how to accomplish the requirement.
Is it possible to call mapping parameters using Java mapping? or any other suggestion?
PI 7.4 Single Stack
Regards,
Mani
Hi Manikandan,
Recently I also faced the same requirement.
I have done this requirement. you can directly pass the parameters from Integration directory as many as you can.
here is the code snippet for that requirement.
public class MIME_CIF extends AbstractTransformation
{
public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException
{
try
{
//Info message is added to trace.
getTrace().addInfo("JAVA Mapping Called");
InputStream inputstream = transformationInput.getInputPayload().getInputStream();
OutputStream outputstream = transformationOutput.getOutputPayload().getOutputStream();
--------------------------
String paramS = transformationInput.getInputParameters().getString("systemid");
SOP("<Identity>" + paramS + "</Identity>");
------------------
}
}
Please let me know if you need any further information or clarification...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
of course. if your method declaration is
public void transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException
then you can call your mapping parameter like this:
in.getInputParameters().getString("myParameter");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why do you want to access mapping parameters for generating unique identifier?
Just take the message ID and append a counter at the end for each segment which makes it unique.
However, if you are talking about parameterized java mapping then refer below blogs
Parametrized Java Mapping in PI 7.1 - Process Integration - SCN Wiki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manikandan,
A similar issue happens in the case of IDocs, where whenever we have similar segment names, we use qualifiers in order to make each of the repeating segment unique.
In your current case it is XML, so please add a new field (lets say FLD) in each of the repeating segments. In order to distinguish amongst repeating segments, the value of FLD in each case should be different.
Now, in graphical mapping in each segment map FLD to a unique constant, and you have a mapping for each of the other field(s) in that segment or that segment itself where you apply a condition "IF FLD equalS Constant[number] THEN the corresponding mapping should follow.
Regards,
Souvik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.