MICaller
  • 02 Nov 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light

MICaller

  • Dark
    Light

Article summary

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.

Argument1) MapData mapData, String metadataId, String transactionName, ProcessData processData
2) ApplicationObject applicationObject, String transactionName, ProcessData processData
ReturnsSortedMap<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".

Argument1) MapData mapData, String miName, String miMethod, boolean logEvents, ProcessData processData
2) MapData mapData, String metadataId, String miName, String miMethod, boolean logEvents, ProcessData processData
ReturnsExecution success - true/false

Example of usage

MICaller.miCallNoResponse(mapData, "CRS620MI", "UpdAddress", false, processData);



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.