Wednesday, July 27, 2016

MEC repository functions

Repository Functions are reusable Java and Boolean functions stored in Function Repository that is part of a Mapper database. Usage of repository function in MEC reduce the development time and increases the reusability.

For an example we can write a java function to send emails and add it to the mapper database as repository function. Then that function can be used in every maps those are in same mapper database.

Create repository function.

Step 1: First create your java or Boolean function.


Step 2: right click on function and press add to repository.


Step 3:

Select the location(MEC mapper database) where, repository function need be saved and click finish.


Now you repository function has been successfully added to mapper database and it ready to use.

Use repository functions:

Step 1:

From the Palette tab, select the Repository function element. Drag and drop it to the space between the input and output document trees. After that new reusable function window is displayed.

Select the Mapper Database location to use.


Step 2: Select a reusable function.


Once you clicked the finish the selected function is inserted to the mapping

Thursday, July 14, 2016

MEC :add values to the manifest file .

For some MEC developments we need to add some usefull information to the MEC manifest file. Then you can use below function.

setManifestInfo("map:myvalue", “test”);

After execution of this function test will be added to the MEC manifest table under map:myvalue key .

Tuesday, July 12, 2016

MEC : Use External jar files in old MEC mapper

Even though this is very straight forward I thought its worth to share with all because it can save time when it need to used external Jar files inside the  old MEC mapper. In new MEC mapper we can do this easily but old MEC mapper we can’t do it directly (Old mapper is Windows based version and if you interested about old MEC mapper my colleague has written overview about it In this case we need to copy external jar files to MEC server manually.

There two places to copy Jar files in MEC server. If there are multiple MEC environments, jar files needs to be copied each environment as well.

· ~\MecMapGen\lib folder

· ~\MECServer\lib folder

MecMapGen and MECServer folders are located inside MEC installation folder.

Please remember to restart the MEC environment after copying the file. Otherwise changes will not be reflected.