From ea7d8203744e4fd35e787e5c225f12627ea85bf7 Mon Sep 17 00:00:00 2001 From: Gabriele Zigurella Date: Mon, 27 Feb 2023 16:27:19 +0100 Subject: [PATCH] fix: handle void safety on workflowTask assignment in GestioneAttivitaPortlet --- .../portos/bo/portlet/GestioneAttivitaPortlet.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java index c5ad6632..669fb667 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java @@ -188,9 +188,11 @@ public class GestioneAttivitaPortlet extends MVCPortlet { default: break; } - WorkflowTaskManagerUtil.assignWorkflowTaskToRole(controlloPratica.getCompanyId(), - serviceContext.getUserId(), workflowTaskId, role.getRoleId(), StringPool.BLANK, null, - WorkflowUtil.getWorkflowContext(controlloPratica)); + if(Validator.isNotNull(role)){ + WorkflowTaskManagerUtil.assignWorkflowTaskToRole(controlloPratica.getCompanyId(), + serviceContext.getUserId(), workflowTaskId, role.getRoleId(), StringPool.BLANK, null, + WorkflowUtil.getWorkflowContext(controlloPratica)); + } } else { throw new SystemException("riassegnare al ruolo non possibile"); }