@fluxhub/fluxhub-lib 19.0.216 → 19.0.217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -34496,12 +34496,62 @@ class FHWorkflowForm {
|
|
|
34496
34496
|
// Ricarico dal DB invece di aggiornare in locale: `locked` degli altri task
|
|
34497
34497
|
// dipende da questo, e un altro utente puo' aver chiuso qualcosa nel frattempo.
|
|
34498
34498
|
this.load_step_tasks(() => {
|
|
34499
|
-
if (this.tasks_all_done && this.b_edit)
|
|
34499
|
+
if (this.tasks_all_done && this.b_edit) {
|
|
34500
|
+
// Lo step avanza: ci pensa procedi() -> exec_wkf, che ricalcola lettori e
|
|
34501
|
+
// notifiche sullo step di destinazione. Inutile (e sbagliato) notificare i
|
|
34502
|
+
// task di uno step che stiamo lasciando.
|
|
34500
34503
|
this.procedi();
|
|
34504
|
+
}
|
|
34505
|
+
else {
|
|
34506
|
+
this.notify_task_closed(task.uiid);
|
|
34507
|
+
}
|
|
34501
34508
|
});
|
|
34502
34509
|
});
|
|
34503
34510
|
return true;
|
|
34504
34511
|
}
|
|
34512
|
+
/**
|
|
34513
|
+
* Segnala a exec_wkf che un task e' stato chiuso, cosi' che possa gestire gli
|
|
34514
|
+
* effetti collaterali: i task che dipendevano da questo sono ora sbloccati, i loro
|
|
34515
|
+
* esecutori vanno messi tra i `lettori` del documento e vanno inviate le notifiche
|
|
34516
|
+
* configurate su quei task.
|
|
34517
|
+
*
|
|
34518
|
+
* La CHIUSURA resta nel frontend (UPDATE atomico con `preso_da`): serve un esito
|
|
34519
|
+
* sincrono per sapere chi ha vinto la corsa. Qui passiamo solo l'evento.
|
|
34520
|
+
* exec_wkf ricava i figli dal DB (`depends_on = uiid_task`): non gli mandiamo una
|
|
34521
|
+
* lista, cosi' non possiamo sbagliarla.
|
|
34522
|
+
*/
|
|
34523
|
+
notify_task_closed(uiid_task) {
|
|
34524
|
+
let dev_mode = false;
|
|
34525
|
+
if (this.app_s.dev_mode != null)
|
|
34526
|
+
if (this.app_s.dev_mode == '1')
|
|
34527
|
+
dev_mode = true;
|
|
34528
|
+
const uiid_op = this.uti_s.newGuid();
|
|
34529
|
+
const p = new QParam();
|
|
34530
|
+
p.sql = 'INSERT_WKF_OP';
|
|
34531
|
+
p.values = [
|
|
34532
|
+
uiid_op,
|
|
34533
|
+
JSON.stringify({
|
|
34534
|
+
op_type: 'TASK_CLOSED',
|
|
34535
|
+
uiid_task: uiid_task,
|
|
34536
|
+
id_applicazione: this.id_applicativo,
|
|
34537
|
+
id_documento: this.id_documento,
|
|
34538
|
+
username: this.app_s.user,
|
|
34539
|
+
dev_mode: dev_mode || !this.is_send_email() ? 1 : 0,
|
|
34540
|
+
}),
|
|
34541
|
+
];
|
|
34542
|
+
p.types = ['string', 'string'];
|
|
34543
|
+
this.m_dataService.doQuery(p).subscribe((d) => {
|
|
34544
|
+
if (d == null || d.result_msg != 'OK')
|
|
34545
|
+
return;
|
|
34546
|
+
const fs = new FSInput();
|
|
34547
|
+
fs.command = 'exec_app';
|
|
34548
|
+
fs.p1 = 'exec_wkf';
|
|
34549
|
+
fs.p2 = uiid_op;
|
|
34550
|
+
// Fire-and-forget: l'utente ha gia' visto il task chiuso, non lo facciamo
|
|
34551
|
+
// aspettare per l'invio delle mail.
|
|
34552
|
+
this.m_fileservice.doQuery(fs).subscribe();
|
|
34553
|
+
});
|
|
34554
|
+
}
|
|
34505
34555
|
/**
|
|
34506
34556
|
* Riapre un task chiuso, azzerando anche la presa in carico. Ammesso a chiunque
|
|
34507
34557
|
* abbia i ruoli del task, finche' il documento e' ancora in quello step (dopo
|
|
@@ -34980,6 +35030,9 @@ class FHWorkflowHeaderBar {
|
|
|
34980
35030
|
</div>
|
|
34981
35031
|
|
|
34982
35032
|
<div *ngIf="dt_agg != null && dt_agg?.b_init_next">
|
|
35033
|
+
<!-- Respingi resta attivo anche in modalita' task: uno step a task deve
|
|
35034
|
+
poter tornare indietro. Sparisce solo Procedi (vedi sotto): li'
|
|
35035
|
+
l'avanzamento e' governato dalla chiusura dei task. -->
|
|
34983
35036
|
<button
|
|
34984
35037
|
mat-flat-button
|
|
34985
35038
|
(click)="respingi()"
|
|
@@ -35228,6 +35281,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
35228
35281
|
</div>
|
|
35229
35282
|
|
|
35230
35283
|
<div *ngIf="dt_agg != null && dt_agg?.b_init_next">
|
|
35284
|
+
<!-- Respingi resta attivo anche in modalita' task: uno step a task deve
|
|
35285
|
+
poter tornare indietro. Sparisce solo Procedi (vedi sotto): li'
|
|
35286
|
+
l'avanzamento e' governato dalla chiusura dei task. -->
|
|
35231
35287
|
<button
|
|
35232
35288
|
mat-flat-button
|
|
35233
35289
|
(click)="respingi()"
|