Simple Migration Example.


Source file

Either copy and paste this behavior into a file named Migrate.salsa or click below to download the file. Migrate.salsa must be placed in a directory named demo/.


Source code

module demo;

   Actors with this behavior simply create a migrate actor with the specified UAN and first UAL
   and then migrate to the second UAL.

behavior Migrate {

   void print() {

      standardOutput<-println( "Migrate actor just migrated here." );

   void act( String[] args ) {

         if (args.length != 3) {
                 standardOutput<-println( "Usage: java migration.Migrate  <UAN> <srcUAL> <destUAL> " );


        UAN uan = new UAN(args[0]);
        UAL ual = new UAL(args[1]);

        Migrate  migrateActor = new Migrate() at (uan, ual);

        migrateActor<-print() @
        migrateActor<-migrate( args[2] ) @




return to the salsa home page.