. * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. * * @author Alexandre Rosenfeld * @package workflow-engine-bin-tasks */ G::LoadClass("system"); G::LoadClass("wsTools"); CLI::taskName('upgrade'); CLI::taskDescription(<< $workspace) { try { $countWorkspace = $countWorkspace + $index; CLI::logging("Upgrading workspaces ($countWorkspace/$count): " . CLI::info($workspace->name) . "\n"); $workspace->upgrade($first, $buildCacheView, $workspace->name); $workspace->close(); $first = false; } catch (Exception $e) { CLI::logging("Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n"); $errors = true; } } if ($errors) { CLI::logging("Upgrade finished but there were errors upgrading workspaces.\n"); CLI::logging(CLI::error("Please check the log above to correct any issues.")."\n"); } else { CLI::logging("Upgrade successful\n"); } //setting flag to false $flag = G::isPMUnderUpdating(0); }