|
|
|
@ -3,11 +3,18 @@ package it.tref.liferay.portos.kaleo.controller.scheduler;
|
|
|
|
|
import it.tref.liferay.portos.bo.model.ControlloPratica; |
|
|
|
|
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; |
|
|
|
|
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; |
|
|
|
|
import it.tref.liferay.portos.kaleo.controller.model.KaleoInstance; |
|
|
|
|
import it.tref.liferay.portos.kaleo.controller.model.KaleoInstanceToken; |
|
|
|
|
import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskAssignmentInstance; |
|
|
|
|
import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskInstanceToken; |
|
|
|
|
import it.tref.liferay.portos.kaleo.controller.service.KaleoInstanceLocalServiceUtil; |
|
|
|
|
import it.tref.liferay.portos.kaleo.controller.service.KaleoInstanceTokenLocalServiceUtil; |
|
|
|
|
import it.tref.liferay.portos.kaleo.controller.service.KaleoTaskAssignmentInstanceLocalServiceUtil; |
|
|
|
|
import it.tref.liferay.portos.kaleo.controller.service.KaleoTaskInstanceTokenLocalServiceUtil; |
|
|
|
|
|
|
|
|
|
import java.io.Serializable; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.concurrent.locks.Lock; |
|
|
|
|
import java.util.concurrent.locks.ReentrantLock; |
|
|
|
@ -24,6 +31,8 @@ import com.liferay.portal.kernel.log.LogFactoryUtil;
|
|
|
|
|
import com.liferay.portal.kernel.messaging.Message; |
|
|
|
|
import com.liferay.portal.kernel.messaging.MessageListener; |
|
|
|
|
import com.liferay.portal.kernel.messaging.MessageListenerException; |
|
|
|
|
import com.liferay.portal.kernel.workflow.WorkflowInstance; |
|
|
|
|
import com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil; |
|
|
|
|
import com.liferay.portal.model.User; |
|
|
|
|
|
|
|
|
|
public class SchedulerKaleoController implements MessageListener { |
|
|
|
@ -37,7 +46,7 @@ public class SchedulerKaleoController implements MessageListener {
|
|
|
|
|
if (lock.tryLock()) { |
|
|
|
|
try { |
|
|
|
|
// Riparazione pratiche con workflow sporco
|
|
|
|
|
riparaLifecycleWorkflowNew(); |
|
|
|
|
// riparaLifecycleWorkflowNew();
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
_log.error(e, e); |
|
|
|
|
} finally { |
|
|
|
@ -48,139 +57,139 @@ public class SchedulerKaleoController implements MessageListener {
|
|
|
|
|
|
|
|
|
|
// ADT
|
|
|
|
|
private void riparaLifecycleWorkflowNew() throws Exception { |
|
|
|
|
// List<Object[]> listaKO = new ArrayList<Object[]>();
|
|
|
|
|
// List<Object[]> lista = IntPraticaLocalServiceUtil.riparaWorkflow();
|
|
|
|
|
// for (Object[] objs : lista) {
|
|
|
|
|
// long kaleotaskinstancetokenid = Long.parseLong(String.valueOf(objs[0]));
|
|
|
|
|
// long kaleoinstancetokenid = Long.parseLong(String.valueOf(objs[1]));
|
|
|
|
|
// long controllopraticaid = (objs[2] != null) ? Long.parseLong(String.valueOf(objs[2])) : 0;
|
|
|
|
|
// long statusbyuserid = Long.parseLong(String.valueOf(objs[3]));
|
|
|
|
|
// _log.info("RIPARA_WORKFLOW inizio lavorazione -- controllopraticaid=" + controllopraticaid
|
|
|
|
|
// + " statusbyuserid=" + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid
|
|
|
|
|
// + " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid);
|
|
|
|
|
// if (controllopraticaid == 0) {
|
|
|
|
|
// _log.info("RIPARA_WORKFLOW KO controllopraticaid non valorizzato =" + controllopraticaid);
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// try {
|
|
|
|
|
// ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
|
|
|
|
|
// .fetchControlloPratica(controllopraticaid);
|
|
|
|
|
// DynamicQuery queryKIT = DynamicQueryFactoryUtil.forClass(KaleoTaskInstanceToken.class);
|
|
|
|
|
// queryKIT.add(RestrictionsFactoryUtil.eq("classPK", controllopraticaid));
|
|
|
|
|
// Order defaultOrderDettPrtatica = OrderFactoryUtil.asc("createDate");
|
|
|
|
|
// queryKIT.addOrder(defaultOrderDettPrtatica);
|
|
|
|
|
// List<KaleoTaskInstanceToken> listas = KaleoTaskInstanceTokenLocalServiceUtil.dynamicQuery(queryKIT);
|
|
|
|
|
// if (listas != null && !listas.isEmpty()) {
|
|
|
|
|
// KaleoTaskInstanceToken ktit = null;
|
|
|
|
|
// for (KaleoTaskInstanceToken k : listas) {
|
|
|
|
|
// if (k.getKaleoTaskName().equalsIgnoreCase("Assegnazione")) {
|
|
|
|
|
// ktit = k;
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (ktit != null) {
|
|
|
|
|
// WorkflowInstance wfInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(
|
|
|
|
|
// controlloPratica.getCompanyId(), ktit.getKaleoInstanceId());
|
|
|
|
|
// Serializable wfVariante = wfInstance.getWorkflowContext().get("wf_variante");
|
|
|
|
|
// boolean isVariante = false;
|
|
|
|
|
// if (wfVariante != null) {
|
|
|
|
|
// isVariante = (wfVariante != null && wfVariante.toString().length() > 0);
|
|
|
|
|
// }
|
|
|
|
|
// _log.info("RIPARA_WORKFLOW isVariante=" + isVariante + " per controllopraticaid="
|
|
|
|
|
// + controllopraticaid);
|
|
|
|
|
// _log.info("RIPARA_WORKFLOW KaleoTaskInstanceTokenId=" + ktit.getKaleoTaskInstanceTokenId()
|
|
|
|
|
// + " --controllopraticaid=" + controllopraticaid);
|
|
|
|
|
// DynamicQuery queryKAT = DynamicQueryFactoryUtil.forClass(KaleoTaskAssignmentInstance.class);
|
|
|
|
|
// queryKAT.add(RestrictionsFactoryUtil.eq("kaleoTaskInstanceTokenId",
|
|
|
|
|
// ktit.getKaleoTaskInstanceTokenId()));
|
|
|
|
|
// List<KaleoTaskAssignmentInstance> listass = KaleoTaskAssignmentInstanceLocalServiceUtil
|
|
|
|
|
// .dynamicQuery(queryKAT);
|
|
|
|
|
// _log.info("size lista KaleoTaskAssignmentInstance per kaleoTaskInstanceTokenId="
|
|
|
|
|
// + ktit.getKaleoTaskInstanceTokenId() + " :" + listass.size());
|
|
|
|
|
// if (listass != null && !listass.isEmpty()) {
|
|
|
|
|
// // creazione record assente sulla tabella KaleoTaskAssignmentInstance
|
|
|
|
|
// KaleoTaskAssignmentInstance assignmentInstanceApp = listass.get(0);
|
|
|
|
|
// long kaleoTaskAssignementInstanceId = CounterLocalServiceUtil
|
|
|
|
|
// .increment("com.liferay.counter.model.Counter");
|
|
|
|
|
// KaleoTaskAssignmentInstance assignmentInstance = KaleoTaskAssignmentInstanceLocalServiceUtil
|
|
|
|
|
// .createKaleoTaskAssignmentInstance(kaleoTaskAssignementInstanceId);
|
|
|
|
|
// assignmentInstance.setCreateDate(assignmentInstanceApp.getCreateDate());
|
|
|
|
|
// assignmentInstance.setModifiedDate(assignmentInstanceApp.getModifiedDate());
|
|
|
|
|
// assignmentInstance.setModifiedDate(assignmentInstanceApp.getModifiedDate());
|
|
|
|
|
// assignmentInstance.setGroupId(assignmentInstanceApp.getGroupId());
|
|
|
|
|
// assignmentInstance.setCompanyId(assignmentInstanceApp.getCompanyId());
|
|
|
|
|
// assignmentInstance.setUserId(assignmentInstanceApp.getUserId());
|
|
|
|
|
// assignmentInstance.setUserName(assignmentInstanceApp.getUserName());
|
|
|
|
|
// assignmentInstance.setKaleoDefinitionId(assignmentInstanceApp.getKaleoDefinitionId());
|
|
|
|
|
// assignmentInstance.setKaleoInstanceId(assignmentInstanceApp.getKaleoInstanceId());
|
|
|
|
|
// assignmentInstance.setKaleoInstanceTokenId(kaleoinstancetokenid);
|
|
|
|
|
// assignmentInstance.setKaleoTaskInstanceTokenId(kaleotaskinstancetokenid);
|
|
|
|
|
// assignmentInstance.setKaleoTaskId(21642L);
|
|
|
|
|
// assignmentInstance.setKaleoTaskName("Esito");
|
|
|
|
|
// assignmentInstance.setAssigneeClassName(User.class.getName());
|
|
|
|
|
// assignmentInstance.setAssigneeClassPK(statusbyuserid);
|
|
|
|
|
// assignmentInstance.setCompleted(false);
|
|
|
|
|
// KaleoTaskAssignmentInstanceLocalServiceUtil
|
|
|
|
|
// .updateKaleoTaskAssignmentInstance(assignmentInstance);
|
|
|
|
|
// // patch per tener contro anche delle varianti create da applicativo portos2: forzo lo stato
|
|
|
|
|
// // del WF a ESITO
|
|
|
|
|
// long kaleoInstanceId = assignmentInstanceApp.getKaleoInstanceId();
|
|
|
|
|
// KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil
|
|
|
|
|
// .getKaleoInstance(kaleoInstanceId);
|
|
|
|
|
// long rootKaleoInstanceTokenId = kaleoInstance.getRootKaleoInstanceTokenId();
|
|
|
|
|
// KaleoInstanceToken rootKaleoInstanceToken = KaleoInstanceTokenLocalServiceUtil
|
|
|
|
|
// .getKaleoInstanceToken(rootKaleoInstanceTokenId);
|
|
|
|
|
// _log.info("rootKaleoInstanceToken=" + rootKaleoInstanceToken.getCurrentKaleoNodeName());
|
|
|
|
|
// rootKaleoInstanceToken.setCurrentKaleoNodeId(21639);
|
|
|
|
|
// rootKaleoInstanceToken.setCurrentKaleoNodeName("Esito");
|
|
|
|
|
// KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(rootKaleoInstanceToken);
|
|
|
|
|
// // task di assegnazione viene inserito a completato:
|
|
|
|
|
// if (!assignmentInstanceApp.isCompleted()) {
|
|
|
|
|
// assignmentInstanceApp.setCompleted(true);
|
|
|
|
|
// assignmentInstanceApp.setCompletionDate(new Date());
|
|
|
|
|
// KaleoTaskAssignmentInstanceLocalServiceUtil
|
|
|
|
|
// .updateKaleoTaskAssignmentInstance(assignmentInstanceApp);
|
|
|
|
|
// }
|
|
|
|
|
// // solo per le nuove varianti di PORTOS2
|
|
|
|
|
// if (isVariante) {
|
|
|
|
|
// _log.info("cancellazione task di assegnazione per controllopraticaid="
|
|
|
|
|
// + controllopraticaid);
|
|
|
|
|
// KaleoTaskInstanceTokenLocalServiceUtil.deleteKaleoTaskInstanceToken(ktit);
|
|
|
|
|
// KaleoTaskAssignmentInstanceLocalServiceUtil
|
|
|
|
|
// .deleteKaleoTaskAssignmentInstance(assignmentInstanceApp);
|
|
|
|
|
// } else if (!ktit.isCompleted()) {
|
|
|
|
|
// ktit.setCompleted(true);
|
|
|
|
|
// ktit.setCompletionDate(new Date());
|
|
|
|
|
// KaleoTaskInstanceTokenLocalServiceUtil.updateKaleoTaskInstanceToken(ktit);
|
|
|
|
|
// }
|
|
|
|
|
// if (controlloPratica != null) {
|
|
|
|
|
// _log.info("RIPARA_WORKFLOW - Pulisco Workflow ed indicizzo per intPraticaId="
|
|
|
|
|
// + controlloPratica.getIntPraticaId());
|
|
|
|
|
// CacheRegistryUtil.clear();
|
|
|
|
|
// IntPraticaLocalServiceUtil.reIndexFasciolo(controlloPratica.getIntPraticaId(),
|
|
|
|
|
// controlloPratica.getCompanyId());
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// _log.info("RIPARA_WORKFLOW fine lavorazione OK -- controllopraticaid=" + controllopraticaid
|
|
|
|
|
// + " statusbyuserid=" + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid
|
|
|
|
|
// + " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid);
|
|
|
|
|
// } else {
|
|
|
|
|
// _log.info("RIPARA_WORKFLOW fine lavorazione KO --task assegnazione non trovato per controllopraticaid="
|
|
|
|
|
// + controllopraticaid
|
|
|
|
|
// + " statusbyuserid="
|
|
|
|
|
// + statusbyuserid
|
|
|
|
|
// + " kaleoinstancetokenid="
|
|
|
|
|
// + kaleoinstancetokenid + " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid);
|
|
|
|
|
// listaKO.add(objs);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// _log.error("Errore RIPARA_WORKFLOW -- controllopraticaid=" + controllopraticaid + " statusbyuserid="
|
|
|
|
|
// + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid
|
|
|
|
|
// + " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid, e);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// patchTaskEsitiForWF(listaKO);
|
|
|
|
|
List<Object[]> listaKO = new ArrayList<Object[]>(); |
|
|
|
|
List<Object[]> lista = IntPraticaLocalServiceUtil.riparaWorkflow(); |
|
|
|
|
for (Object[] objs : lista) { |
|
|
|
|
long kaleotaskinstancetokenid = Long.parseLong(String.valueOf(objs[0])); |
|
|
|
|
long kaleoinstancetokenid = Long.parseLong(String.valueOf(objs[1])); |
|
|
|
|
long controllopraticaid = (objs[2] != null) ? Long.parseLong(String.valueOf(objs[2])) : 0; |
|
|
|
|
long statusbyuserid = Long.parseLong(String.valueOf(objs[3])); |
|
|
|
|
_log.info("RIPARA_WORKFLOW inizio lavorazione -- controllopraticaid=" + controllopraticaid |
|
|
|
|
+ " statusbyuserid=" + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid |
|
|
|
|
+ " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid); |
|
|
|
|
if (controllopraticaid == 0) { |
|
|
|
|
_log.info("RIPARA_WORKFLOW KO controllopraticaid non valorizzato =" + controllopraticaid); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil |
|
|
|
|
.fetchControlloPratica(controllopraticaid); |
|
|
|
|
DynamicQuery queryKIT = DynamicQueryFactoryUtil.forClass(KaleoTaskInstanceToken.class); |
|
|
|
|
queryKIT.add(RestrictionsFactoryUtil.eq("classPK", controllopraticaid)); |
|
|
|
|
Order defaultOrderDettPrtatica = OrderFactoryUtil.asc("createDate"); |
|
|
|
|
queryKIT.addOrder(defaultOrderDettPrtatica); |
|
|
|
|
List<KaleoTaskInstanceToken> listas = KaleoTaskInstanceTokenLocalServiceUtil.dynamicQuery(queryKIT); |
|
|
|
|
if (listas != null && !listas.isEmpty()) { |
|
|
|
|
KaleoTaskInstanceToken ktit = null; |
|
|
|
|
for (KaleoTaskInstanceToken k : listas) { |
|
|
|
|
if (k.getKaleoTaskName().equalsIgnoreCase("Assegnazione")) { |
|
|
|
|
ktit = k; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (ktit != null) { |
|
|
|
|
WorkflowInstance wfInstance = WorkflowInstanceManagerUtil.getWorkflowInstance( |
|
|
|
|
controlloPratica.getCompanyId(), ktit.getKaleoInstanceId()); |
|
|
|
|
Serializable wfVariante = wfInstance.getWorkflowContext().get("wf_variante"); |
|
|
|
|
boolean isVariante = false; |
|
|
|
|
if (wfVariante != null) { |
|
|
|
|
isVariante = (wfVariante != null && wfVariante.toString().length() > 0); |
|
|
|
|
} |
|
|
|
|
_log.info("RIPARA_WORKFLOW isVariante=" + isVariante + " per controllopraticaid=" |
|
|
|
|
+ controllopraticaid); |
|
|
|
|
_log.info("RIPARA_WORKFLOW KaleoTaskInstanceTokenId=" + ktit.getKaleoTaskInstanceTokenId() |
|
|
|
|
+ " --controllopraticaid=" + controllopraticaid); |
|
|
|
|
DynamicQuery queryKAT = DynamicQueryFactoryUtil.forClass(KaleoTaskAssignmentInstance.class); |
|
|
|
|
queryKAT.add(RestrictionsFactoryUtil.eq("kaleoTaskInstanceTokenId", |
|
|
|
|
ktit.getKaleoTaskInstanceTokenId())); |
|
|
|
|
List<KaleoTaskAssignmentInstance> listass = KaleoTaskAssignmentInstanceLocalServiceUtil |
|
|
|
|
.dynamicQuery(queryKAT); |
|
|
|
|
_log.info("size lista KaleoTaskAssignmentInstance per kaleoTaskInstanceTokenId=" |
|
|
|
|
+ ktit.getKaleoTaskInstanceTokenId() + " :" + listass.size()); |
|
|
|
|
if (listass != null && !listass.isEmpty()) { |
|
|
|
|
// creazione record assente sulla tabella KaleoTaskAssignmentInstance
|
|
|
|
|
KaleoTaskAssignmentInstance assignmentInstanceApp = listass.get(0); |
|
|
|
|
long kaleoTaskAssignementInstanceId = CounterLocalServiceUtil |
|
|
|
|
.increment("com.liferay.counter.model.Counter"); |
|
|
|
|
KaleoTaskAssignmentInstance assignmentInstance = KaleoTaskAssignmentInstanceLocalServiceUtil |
|
|
|
|
.createKaleoTaskAssignmentInstance(kaleoTaskAssignementInstanceId); |
|
|
|
|
assignmentInstance.setCreateDate(assignmentInstanceApp.getCreateDate()); |
|
|
|
|
assignmentInstance.setModifiedDate(assignmentInstanceApp.getModifiedDate()); |
|
|
|
|
assignmentInstance.setModifiedDate(assignmentInstanceApp.getModifiedDate()); |
|
|
|
|
assignmentInstance.setGroupId(assignmentInstanceApp.getGroupId()); |
|
|
|
|
assignmentInstance.setCompanyId(assignmentInstanceApp.getCompanyId()); |
|
|
|
|
assignmentInstance.setUserId(assignmentInstanceApp.getUserId()); |
|
|
|
|
assignmentInstance.setUserName(assignmentInstanceApp.getUserName()); |
|
|
|
|
assignmentInstance.setKaleoDefinitionId(assignmentInstanceApp.getKaleoDefinitionId()); |
|
|
|
|
assignmentInstance.setKaleoInstanceId(assignmentInstanceApp.getKaleoInstanceId()); |
|
|
|
|
assignmentInstance.setKaleoInstanceTokenId(kaleoinstancetokenid); |
|
|
|
|
assignmentInstance.setKaleoTaskInstanceTokenId(kaleotaskinstancetokenid); |
|
|
|
|
assignmentInstance.setKaleoTaskId(21642L); |
|
|
|
|
assignmentInstance.setKaleoTaskName("Esito"); |
|
|
|
|
assignmentInstance.setAssigneeClassName(User.class.getName()); |
|
|
|
|
assignmentInstance.setAssigneeClassPK(statusbyuserid); |
|
|
|
|
assignmentInstance.setCompleted(false); |
|
|
|
|
KaleoTaskAssignmentInstanceLocalServiceUtil |
|
|
|
|
.updateKaleoTaskAssignmentInstance(assignmentInstance); |
|
|
|
|
// patch per tener contro anche delle varianti create da applicativo portos2: forzo lo stato
|
|
|
|
|
// del WF a ESITO
|
|
|
|
|
long kaleoInstanceId = assignmentInstanceApp.getKaleoInstanceId(); |
|
|
|
|
KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil |
|
|
|
|
.getKaleoInstance(kaleoInstanceId); |
|
|
|
|
long rootKaleoInstanceTokenId = kaleoInstance.getRootKaleoInstanceTokenId(); |
|
|
|
|
KaleoInstanceToken rootKaleoInstanceToken = KaleoInstanceTokenLocalServiceUtil |
|
|
|
|
.getKaleoInstanceToken(rootKaleoInstanceTokenId); |
|
|
|
|
_log.info("rootKaleoInstanceToken=" + rootKaleoInstanceToken.getCurrentKaleoNodeName()); |
|
|
|
|
rootKaleoInstanceToken.setCurrentKaleoNodeId(21639); |
|
|
|
|
rootKaleoInstanceToken.setCurrentKaleoNodeName("Esito"); |
|
|
|
|
KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(rootKaleoInstanceToken); |
|
|
|
|
// task di assegnazione viene inserito a completato:
|
|
|
|
|
if (!assignmentInstanceApp.isCompleted()) { |
|
|
|
|
assignmentInstanceApp.setCompleted(true); |
|
|
|
|
assignmentInstanceApp.setCompletionDate(new Date()); |
|
|
|
|
KaleoTaskAssignmentInstanceLocalServiceUtil |
|
|
|
|
.updateKaleoTaskAssignmentInstance(assignmentInstanceApp); |
|
|
|
|
} |
|
|
|
|
// solo per le nuove varianti di PORTOS2
|
|
|
|
|
if (isVariante) { |
|
|
|
|
_log.info("cancellazione task di assegnazione per controllopraticaid=" |
|
|
|
|
+ controllopraticaid); |
|
|
|
|
KaleoTaskInstanceTokenLocalServiceUtil.deleteKaleoTaskInstanceToken(ktit); |
|
|
|
|
KaleoTaskAssignmentInstanceLocalServiceUtil |
|
|
|
|
.deleteKaleoTaskAssignmentInstance(assignmentInstanceApp); |
|
|
|
|
} else if (!ktit.isCompleted()) { |
|
|
|
|
ktit.setCompleted(true); |
|
|
|
|
ktit.setCompletionDate(new Date()); |
|
|
|
|
KaleoTaskInstanceTokenLocalServiceUtil.updateKaleoTaskInstanceToken(ktit); |
|
|
|
|
} |
|
|
|
|
if (controlloPratica != null) { |
|
|
|
|
_log.info("RIPARA_WORKFLOW - Pulisco Workflow ed indicizzo per intPraticaId=" |
|
|
|
|
+ controlloPratica.getIntPraticaId()); |
|
|
|
|
CacheRegistryUtil.clear(); |
|
|
|
|
IntPraticaLocalServiceUtil.reIndexFasciolo(controlloPratica.getIntPraticaId(), |
|
|
|
|
controlloPratica.getCompanyId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
_log.info("RIPARA_WORKFLOW fine lavorazione OK -- controllopraticaid=" + controllopraticaid |
|
|
|
|
+ " statusbyuserid=" + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid |
|
|
|
|
+ " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid); |
|
|
|
|
} else { |
|
|
|
|
_log.info("RIPARA_WORKFLOW fine lavorazione KO --task assegnazione non trovato per controllopraticaid=" |
|
|
|
|
+ controllopraticaid |
|
|
|
|
+ " statusbyuserid=" |
|
|
|
|
+ statusbyuserid |
|
|
|
|
+ " kaleoinstancetokenid=" |
|
|
|
|
+ kaleoinstancetokenid + " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid); |
|
|
|
|
listaKO.add(objs); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
_log.error("Errore RIPARA_WORKFLOW -- controllopraticaid=" + controllopraticaid + " statusbyuserid=" |
|
|
|
|
+ statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid |
|
|
|
|
+ " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid, e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
patchTaskEsitiForWF(listaKO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void patchTaskEsitiForWF(List<Object[]> lista) { |
|
|
|
|