if (xpdlFileNames != null && xpdlFileNames.length > 0)
{
for (int i = 0; i < xpdlFileNames.length; ++i)
{
WorkflowPackage workflowPackage = findDeployedPackage(xpdlFileNames[i]);
EventMonitorThread eventMonitorThread = this.getEventMonitorThread(workflowPackage);
eventMonitorThread.start();
}
}
}
else
{
//has been stopped
String[] xpdlFileNames = findDeployedPackages();
if (xpdlFileNames != null && xpdlFileNames.length > 0)
{
for (int i = 0; i < xpdlFileNames.length; ++i)
{
WorkflowPackage workflowPackage = findDeployedPackage(xpdlFileNames[i]);
String threadName = "EventMonitorThread[" + toString() + " - " + workflowPackage.getName() + "]";
EventMonitorThread eventMonitorThread = new EventMonitorThread(threadName);
eventMonitorThread.setDaemon(true);
eventMonitorThread.start();
this.putEventMonitorThread(workflowPackage, eventMonitorThread);
}
}
}