This page lists all the sample code distributed with the MeDICi Integration Framework (MIF). You will find the sample code in MIF_HOME/sources/mif-samples. Before starting to program against the MIF API, we recommend that you start with the Hello World sample.
Before you start working through these samples:
- If desired, set up an IDE for MIF development
- Hello World - Sample which accepts a string from the console, appends 2 additional strings, and returns the new string to the console
- Hello Component - Hello World using a MIF Component and JMS endpoints
- Aggregator - Demonstrate a simple aggregator which combines 2 strings
- Splitter - Demonstrates a simple splitter which breaks apart a string into multiple smaller strings.
- Specialized Modules - These are modules which have a special purpose and are used often. So, they have been made available in the MIF API.
- WorkflowModule - This specialized module is used when creating components to be orchestrated using the MeDICi workflow designer and engine.
If it is not specified by a particular sample, you can run all the samples on the command line by opening a terminal and changing to the MIF_HOME directory. Then use the launcher script (bin/mif.sh on UNIX and mif.bat on windows) and specify the sample class with the -c option, e.g.: bin/mif_script -c <class-name>. This command not only works for the samples, it will launch any MIF pipeline if the specified class has a main method that configures and starts the piepline.
So, to run a sample class called com.example.Sample1 from UNIX, you would enter the command:
bin/mif.sh -c com.example.Sample1
To run Sample1 from Windows, enter the command:
bin\mif.bat -c com.example.Sample1
Some sample documentation may reference the UNIX launcher script (bin/mif.sh) only. However, all samples and pipelines will also work with the Windows launcher (bin\mif.bat).