Sfoglia il codice sorgente

fix: handle nullable worlfowTask

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

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

@ -256,10 +256,12 @@ 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);
if(workflowTask != null) {
Map<String, Serializable> workflowContext = getWorkflowContext(controlloPratica); Map<String, Serializable> workflowContext = getWorkflowContext(controlloPratica);
WorkflowTaskManagerUtil.assignWorkflowTaskToUser(companyId, assegnatoreUserId, WorkflowTaskManagerUtil.assignWorkflowTaskToUser(companyId, assegnatoreUserId,
workflowTask.getWorkflowTaskId(), istruttoreId, StringPool.BLANK, null, workflowContext); workflowTask.getWorkflowTaskId(), istruttoreId, StringPool.BLANK, null, workflowContext);
} }
}
public static Map<String, Serializable> getWorkflowContext(ControlloPratica controlloPratica) public static Map<String, Serializable> getWorkflowContext(ControlloPratica controlloPratica)
throws PortalException, SystemException { throws PortalException, SystemException {

Caricamento…
Annulla
Salva