How do we get the next task Id of a User Input Task. This has to be entered in t

How do we get the next task Id of a User Input Task. This has to be entered in the Send Email Smart Service which is triggered before the User Input Task? Is there any such Out Of The Box function?...

OriginalPostID-114894

OriginalPostID-114894

  Discussion posts and replies are publicly visible

Parents
  • I am getting a null pointer exception when I put the following code with the interface implementation of processExecutionService

    Long[] currentTasksForProcess = new Long[100];
    ProcessExecutionService processExecutionService = new ProcessExecutionService() {
                                  
                                  @Override
                                  public void setServiceContext(ServiceContext arg0) {
                                            // TODO Auto-generated method stub
                                            
                                  }
    ResultPage resultPage;
    resultPage = processExecutionService.getCurrentTasksForProcess(processID, com.appiancorp.suiteapi.process.ProcessExecutionService.UNATTENDED_AND_ATTENDED_TASKS, 1, 10, TaskSummary.SORT_BY_ID, Constants.SORT_ORDER_ASCENDING);
                                  currentTasksForProcess = (Long[])resultPage.getResults();

    What could be the root cause of this null pointer exception?

    Is processExecutionService() null or currentTasksForProcess() .

    The error is at line 1787 which is this:-

    resultPage = processExecutionService.getCurrentTasksForProcess(processID, com.appiancorp.suiteapi.process.ProcessExecutionService.UNATTENDED_AND_ATTENDED_TASKS, 1, 10, TaskSummary.SORT_BY_ID, Constants.SORT_ORDER_ASCENDING);
                                  currentTasksForProcess = (Long[])resultPage.getResults();
Reply
  • I am getting a null pointer exception when I put the following code with the interface implementation of processExecutionService

    Long[] currentTasksForProcess = new Long[100];
    ProcessExecutionService processExecutionService = new ProcessExecutionService() {
                                  
                                  @Override
                                  public void setServiceContext(ServiceContext arg0) {
                                            // TODO Auto-generated method stub
                                            
                                  }
    ResultPage resultPage;
    resultPage = processExecutionService.getCurrentTasksForProcess(processID, com.appiancorp.suiteapi.process.ProcessExecutionService.UNATTENDED_AND_ATTENDED_TASKS, 1, 10, TaskSummary.SORT_BY_ID, Constants.SORT_ORDER_ASCENDING);
                                  currentTasksForProcess = (Long[])resultPage.getResults();

    What could be the root cause of this null pointer exception?

    Is processExecutionService() null or currentTasksForProcess() .

    The error is at line 1787 which is this:-

    resultPage = processExecutionService.getCurrentTasksForProcess(processID, com.appiancorp.suiteapi.process.ProcessExecutionService.UNATTENDED_AND_ATTENDED_TASKS, 1, 10, TaskSummary.SORT_BY_ID, Constants.SORT_ORDER_ASCENDING);
                                  currentTasksForProcess = (Long[])resultPage.getResults();
Children
No Data