jBPM
  1. jBPM
  2. JBPM-3618

TaskSummary.getName() returns null while using persistence

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: jBPM 5.2
    • Fix Version/s: jBPM 6.0.0.Final
    • Component/s: Human Task Service
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      redhat Linux 5.5; Database: tried with both postresql and mysql
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      you have to get NodeInstance object from of the ProcessInstance to retrieve these values.

      Show
      you have to get NodeInstance object from of the ProcessInstance to retrieve these values.
    • Steps to Reproduce:
      Hide

      Enable persistence for both jBPM core engine and human task service. Then start a process that stops at a human task. Now use above API - getTasksAssignedAsPotentialOwner - to retrieve pending tasks for a user.

      Show
      Enable persistence for both jBPM core engine and human task service. Then start a process that stops at a human task. Now use above API - getTasksAssignedAsPotentialOwner - to retrieve pending tasks for a user.
    • Similar Issues:
      Show 10 results 

      Description

      while using persistence with jBPM, TaskClient.getTasksAssignedAsPotentialOwner returns list of TaskSummary objects with null name and description.

      Also I18NText database table is empty even though I have couple of pending human tasks. I think names and descriptions are being retrieved out of this table, so that might be the reason why they are blank.

        Activity

        Hide
        Mauricio Salatino
        added a comment -

        I've just update the TasksAdminTest, which shows an scenario where a TaskSummary is returned and we are checking for the name to not be empty. Notice that in order to be able to query tasks with I18NText the following needs to be true:
        1) if you are creating the task programmatically you need to be sure to add the Task.setNames()
        List<I18NText> names = new ArrayList<I18NText>();
        names.add(new I18NText("en-UK", "My Simple Task"));
        task.setNames(names);
        as its shown in the mentioned test
        2) If you jBPM is creating the task for you from a process using a work item handler, the workItem should provide the TaskName property, and it should be a non empty value. That value will be used to set the Task name, which will enable the queries to retrieve the right task.

        Show
        Mauricio Salatino
        added a comment - I've just update the TasksAdminTest, which shows an scenario where a TaskSummary is returned and we are checking for the name to not be empty. Notice that in order to be able to query tasks with I18NText the following needs to be true: 1) if you are creating the task programmatically you need to be sure to add the Task.setNames() List<I18NText> names = new ArrayList<I18NText>(); names.add(new I18NText("en-UK", "My Simple Task")); task.setNames(names); as its shown in the mentioned test 2) If you jBPM is creating the task for you from a process using a work item handler, the workItem should provide the TaskName property, and it should be a non empty value. That value will be used to set the Task name, which will enable the queries to retrieve the right task.

          People

          • Assignee:
            Mauricio Salatino
            Reporter:
            Jboss fan99
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: