- 02 Nov 2020
- 1 Minute to read
- Contributors
- Print
- DarkLight
MICaller
- Updated on 02 Nov 2020
- 1 Minute to read
- Contributors
- Print
- DarkLight
This is a simpler method to communicate with Movex Interfaces (MI) where one does not need to create MI classes in order to perform calls.
Project
com.corzia.comflow.utils.MI
List of methods
miCall
Performs a MI call using MapData for input variables. It will use MRS001MI to retrieve which columns are used in the specified Transaction and get the values from the MapData argument.
If an Application Object is used it will be transformed to MapData before execution.
Argument | 1) MapData mapData, String metadataId, String transactionName, ProcessData processData 2) ApplicationObject applicationObject, String transactionName, ProcessData processData |
Returns | SortedMap<Integer, MapData> Integer represents the row number in the result. MapData contains Short Column Name from MI repository + Value from the MI transaction. |
Example of usage
SortedMap<Integer, MapData> response = null;
try {
String serverName = SystemWorkspace.getProperty("movex.api.servername");
int portNumber = Integer.parseInt(SystemWorkspace.getProperty("movex.api.portnumber"));
String userName = SystemWorkspace.getProperty("movex.api.username");
String passWord = SystemWorkspace.getProperty("movex.api.password");
MICaller micaller = new MICaller(serverName, portNumber, userName, passWord, "GRS620MI", true, processData);
response = micaller.miCall(mapData, MICaller.METADATAID, "GetSupplierRef", processData);
} catch (MIException e) {
e.printStackTrace();
}
if (response != null) {
getDataInstance().internalInsert(DM, 1, response.get(0));
}
miCallNoResponse [static]
Performs a MI call using MapData for input variables. It will use MRS001MI to retrieve which columns are used in the specified Transaction and get the values from the MapData argument.
Requires that there are properties in SiteDef.xml for "movex.api.servername", "movex.api.portnumber", "movex.api.username" and "movex.api.password".
Argument | 1) MapData mapData, String miName, String miMethod, boolean logEvents, ProcessData processData 2) MapData mapData, String metadataId, String miName, String miMethod, boolean logEvents, ProcessData processData |
Returns | Execution success - true/false |
Example of usage
MICaller.miCallNoResponse(mapData, "CRS620MI", "UpdAddress", false, processData);