PM-475 "16052 - Revisar problema de self-service con Value-based de grupos" SOLVED
Issue:
El CasesList es lento cuando existen casos con tipo de asignacion "Self Service Value Based Assignment"
Cause:
Para todos los casos se esta verificando si su asignacion es de tipo "Self Service Value Based Assignment"
Solution:
- Se ha creado una nueva tabla "APP_ASSIGN_SELF_SERVICE_VALUE", en la misma se registraran los casos
con asignacion "Self Service Value Based Assignment"
- Se ha agregado la opcion "database-generate-self-service-by-value" al comando "./processmaker", para poder
generar los registros de la nueva tabla.
Ej: $ ./processmaker database-generate-self-service-by-value myWorkspace
This commit is contained in:
@@ -172,6 +172,20 @@ CLI::taskOpt("workspace", "Select which workspace to migrate the cases folders,
|
||||
"w:", "workspace=");
|
||||
CLI::taskRun("runStructureDirectories");
|
||||
|
||||
CLI::taskName("database-generate-self-service-by-value");
|
||||
CLI::taskDescription(<<<EOT
|
||||
Generate or upgrade the table "self-service by value"
|
||||
|
||||
This command populate the table "self-service by value", this for the cases when
|
||||
a task it's defined with "Self Service Value Based Assignment" in "Assignment Rules".
|
||||
|
||||
If no workspace is specified, the command will be run in all workspaces. More
|
||||
than one workspace can be specified.
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg("workspace-name", true, true);
|
||||
CLI::taskRun("run_database_generate_self_service_by_value");
|
||||
|
||||
/**
|
||||
* Function run_info
|
||||
* access public
|
||||
@@ -394,9 +408,9 @@ function run_workspace_backup($args, $opts) {
|
||||
foreach ($workspaces as $workspace) {
|
||||
if (!$workspace->workspaceExists()) {
|
||||
throw new Exception("Workspace '{$workspace->name}' not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//If this is a relative path, put the file in the backups directory
|
||||
if (strpos($filename, "/") === false && strpos($filename, '\\') === false){
|
||||
$filename = PATH_DATA . "backups/$filename";
|
||||
@@ -494,4 +508,23 @@ function runStructureDirectories($command, $args) {
|
||||
}
|
||||
}
|
||||
|
||||
function run_database_generate_self_service_by_value($args, $opts)
|
||||
{
|
||||
try {
|
||||
$arrayWorkspace = get_workspaces_from_args($args);
|
||||
|
||||
foreach ($arrayWorkspace as $value) {
|
||||
$workspace = $value;
|
||||
|
||||
try {
|
||||
echo "Generating the table \"self-service by value\" for " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
$workspace->appAssignSelfServiceValueTableGenerateData();
|
||||
} catch (Exception $e) {
|
||||
echo "Errors generating the table \"self-service by value\" of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo CLI::error($e->getMessage()) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user