1 Reply Latest reply: Aug 7, 2014 2:38 AM by Anshul RSS

    IWorkflowContext is getting null

    868989

      Hi,

      I am trying to get the tasks in the BPM worklist. I am getting IWorkflowContext as null with error " Invalid Token Error in Verification Service. Received invalid token in null.Verify that correct token is passed. ORABPEL-30503..... "

       

      The code I have is

       

      try
                  {
                       IWorkflowServiceClient wfSvcClient = getIWorkflowServiceClient();
                       _logger.severe("======================== wfSvcClient  =========================   " + wfSvcClient);
                       ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
                       HttpServletRequest request = (HttpServletRequest)ADFContext.getCurrent().getEnvironment().getRequest();          //  Actual code for application
                       _logger.severe("======================== request  =========================   " + request);
                       IWorkflowContext ctx = querySvc.createContext(request);     
                       _logger.severe("======================== workflow ctx  =========================   " + ctx);//  Actual code for application
                      
                       //Set up list of columns to query
                       List queryColumns = new ArrayList();
                       queryColumns.add("TASKID");
                       queryColumns.add("TASKNUMBER");
                       queryColumns.add("TITLE");
                       queryColumns.add("OUTCOME");
                      
                       List additionalInfo = new ArrayList();
                       additionalInfo.add("Payload");
                      
                       ITaskQueryService.AssignmentFilter assignmentFilter = null;
                      
                       assignmentFilter = ITaskQueryService.AssignmentFilter.MY_AND_GROUP_ALL;

                       Predicate statePredicate = new Predicate(TableConstants.WFTASK_STATE_COLUMN, Predicate.OP_EQ, IWorkflowConstants.TASK_STATE_ASSIGNED);
                       _logger.severe("======================== before quering the tasks   =========================   " );
                       List tasks = querySvc.queryTasks(ibpmCtx,
                                    queryColumns,
                                    additionalInfo,
                                    assignmentFilter,
                                    null,
                       //                              predicate,
                                    statePredicate,
                                    null,
                                    0,   
                                    0);
                      _logger.severe("old tasksSize : " + tasks.size());

       

       

       

       

      }

      catch(Exception e_) {

      }

       

      Any pointers is appreciated.

       

      Thanks