/** * A record with this datasource handle changed, notify any behaviors that are checking. * NOTE: Be very careful as this code is running in an independent thread * (synchronize to the task before calling record calls). * NOTE: For now, you are only notified of the main record changes. * @param message The message to handle. * @return The error code. */ public int handleMessage(BaseMessage message) { if (message != null) if (message.getMessageHeader().getRegistryIDMatch() != null) // My private message if (message.getMessageHeader().getRegistryIDMatch().equals(m_intRegistryID)) // My private message { Application app = (Application)this.getTask().getApplication(); String strMessage = app.getResources(ResourceConstants.DEFAULT_RESOURCE, true).getString("Remote action completed"); this.getTask().setStatusText(strMessage, Constants.INFORMATION); message.consume(); } return super.handleMessage(message); }
/** * A record with this datasource handle changed, notify any behaviors that are checking. * NOTE: Be very careful as this code is running in an independent thread * (synchronize to the task before calling record calls). * NOTE: For now, you are only notified of the main record changes. * @param message The message to handle. * @return The error code. */ public int handleMessage(BaseMessage message) { if (message != null) if (message.getMessageHeader().getRegistryIDMatch() != null) // My private message if (message.getMessageHeader().getRegistryIDMatch().equals(m_intRegistryID)) // My private message { Application app = (Application)this.getTask().getApplication(); String strMessage = app.getResources(ResourceConstants.DEFAULT_RESOURCE, true).getString("Remote action completed"); this.getTask().setStatusText(strMessage, Constants.INFORMATION); message.consume(); } return super.handleMessage(message); }
/** * Handle this message. * Get the name of this process and run it. */ public int handleMessage(BaseMessage message) { String strClassName = this.getMessageProcessorClassName(message); if ((strClassName == null) || (strClassName.length() == 0)) return this.handleOtherMessage(message); message.consume(); // I'll be handling this one. String strParams = Utility.addURLParam(null, DBParams.PROCESS, strClassName); Application application = m_application; if (message.getProcessedByClientSession() instanceof TaskSession) application = ((TaskSession)message.getProcessedByClientSession()).getApplication(); // If I have the task session, run this task under the same app MessageProcessRunnerTask task = new MessageProcessRunnerTask(application, strParams, null); task.setMessage(message); m_application.getTaskScheduler().addTask(task); return DBConstants.NORMAL_RETURN; // No need to call super. } /**
/** * Handle this message. * Get the name of this process and run it. */ public int handleMessage(BaseMessage message) { String strClassName = this.getMessageProcessorClassName(message); if ((strClassName == null) || (strClassName.length() == 0)) return this.handleOtherMessage(message); message.consume(); // I'll be handling this one. String strParams = Utility.addURLParam(null, DBParams.PROCESS, strClassName); App application = m_application; if (message.getProcessedByClientSession() instanceof RemoteTask) if (message.getProcessedByClientSession() instanceof Task) // Always application = ((Task)message.getProcessedByClientSession()).getApplication(); // If I have the task session, run this task under the same app MessageProcessRunnerTask task = new MessageProcessRunnerTask(application, strParams, null); task.setMessage(message); m_application.getTaskScheduler().addTask(task); return DBConstants.NORMAL_RETURN; // No need to call super. } /**