@fluxhub/fluxhub-lib 19.0.205 → 19.0.207
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.
|
@@ -33491,6 +33491,25 @@ class FHWorkflowForm {
|
|
|
33491
33491
|
v: this.app_s.user,
|
|
33492
33492
|
nc: this.app_s.user_surname + ' ' + this.app_s.user_name,
|
|
33493
33493
|
});
|
|
33494
|
+
// Fallback *REQUESTER: alcuni documenti non hanno la variabile wkf
|
|
33495
|
+
// 'REQUESTER' (es. creati da flussi che non la popolano). Senza di essa
|
|
33496
|
+
// gli step con context *REQUESTER non vengono risolti e l'avanzamento
|
|
33497
|
+
// fallisce con [0x002]. In quel caso la sintetizzo dal creatore del
|
|
33498
|
+
// documento (wkf_documents.creatore), da cui vengono poi derivati anche
|
|
33499
|
+
// *ALLUSERS e *CREATOR nei blocchi seguenti.
|
|
33500
|
+
if (!datav.result_data.some((v) => v.k === '*REQUESTER') &&
|
|
33501
|
+
this.m_obj && this.m_obj.creatore) {
|
|
33502
|
+
datav.result_data.push({
|
|
33503
|
+
k: '*REQUESTER',
|
|
33504
|
+
v: this.m_obj.creatore,
|
|
33505
|
+
nc: this.m_obj.nc || this.m_obj.creatore,
|
|
33506
|
+
});
|
|
33507
|
+
// Oltre a crearla al volo, la persisto sul documento: dai load
|
|
33508
|
+
// successivi arriva gia' da SELECT_WKF_VARIABILES_V2 e il fallback
|
|
33509
|
+
// non serve piu'. La query 'insert_wkf_variabile' e' un upsert
|
|
33510
|
+
// (UNIQUE su id_applicativo+uiid+chiave), quindi e' idempotente.
|
|
33511
|
+
this.insert_wkf_variabile(this.id_applicativo, this.id_documento, 'REQUESTER', this.m_obj.creatore);
|
|
33512
|
+
}
|
|
33494
33513
|
if (this.m_obj.stato == null || this.m_obj.stato <= 10)
|
|
33495
33514
|
datav.result_data.push({
|
|
33496
33515
|
k: '*ALLUSERS',
|