code: public RemoteTask createRemoteTask(Map<String, Object> properties) throws RemoteException
      {
          try   {
              Application app = this.getApplication();
              RemoteTask remoteServer = new TaskSession(app);
              ((TaskSession)remoteServer).setProperties(properties);
              return remoteServer;
          } catch (Exception ex) {
              ex.printStackTrace();
              return null;
          }
      }
docs: Build a new remote session and initialize it.
  NOTE: This is convenience method to create a task below the current APPLICATION (not below this task)
  @param properties to create the new remote task
  @return The remote Task.