package Dialog_Server;

import j4d.open.*;

class Examplet {

  /* doExecuteOnServer execute a 4D method named "myMethod" onto the server
  */
  public void doExecuteOnServer(opProcess process) throws opException {

    try{
      opServerProcess executeOnProcess = new opServerProcess();
      opVariableArray mArrayVar = new opVariableArray(1);
      //Name of the 4D method to execute
      executeOnProcess.mMethodName = new String("myMethod");
      //Name of the process visible onto de 4D Server window
      executeOnProcess.mProcessName = new String("Currently indexing...");
      //Fixing the size of the stack
      executeOnProcess.mStackSize = 32000;
      //Allowing the process multiple
      executeOnProcess.mUnique = 0;
      //Passing the string parameter "Hello" to the method
      mArrayVar.mVariableArray[0].mData = new opData(ALPHANUMERIC,"Hello");
      process.ExecuteOnServer(executeOnProcess, mArrayVar);
    }
    catch (opException er){throw er;}

  }

}