Sfoglia il codice sorgente

fix: handle nullable worlfowTask

fix/NullPointer-Exceptions
Gabriele Zigurella 2 anni fa
parent
commit
98c3e7bdcd
  1. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java

8
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java

@ -256,9 +256,11 @@ public class WorkflowUtil {
ControlloPratica controlloPratica) throws PortalException, SystemException { ControlloPratica controlloPratica) throws PortalException, SystemException {
WorkflowTask workflowTask = getLastTask(companyId, groupId, null, controlloPratica); WorkflowTask workflowTask = getLastTask(companyId, groupId, null, controlloPratica);
Map<String, Serializable> workflowContext = getWorkflowContext(controlloPratica); if(workflowTask != null) {
WorkflowTaskManagerUtil.assignWorkflowTaskToUser(companyId, assegnatoreUserId, Map<String, Serializable> workflowContext = getWorkflowContext(controlloPratica);
workflowTask.getWorkflowTaskId(), istruttoreId, StringPool.BLANK, null, workflowContext); WorkflowTaskManagerUtil.assignWorkflowTaskToUser(companyId, assegnatoreUserId,
workflowTask.getWorkflowTaskId(), istruttoreId, StringPool.BLANK, null, workflowContext);
}
} }
public static Map<String, Serializable> getWorkflowContext(ControlloPratica controlloPratica) public static Map<String, Serializable> getWorkflowContext(ControlloPratica controlloPratica)

Caricamento…
Annulla
Salva