[jboss-jira] [JBoss JIRA] Closed: (JBPM-554) New tasks created with "taskMgmtInst.createStartTaskInstance()" cannot be "end()-ed"

Tom Baeyens (JIRA) jira-events at lists.jboss.org
Tue Feb 27 08:41:35 EST 2007


     [ http://jira.jboss.com/jira/browse/JBPM-554?page=all ]

Tom Baeyens closed JBPM-554.
----------------------------

    Fix Version/s:     (was: jBPM jPDL 3.2)
       Resolution: Cannot Reproduce Bug

this tests were added to the test suite for trying to reproduce this bug:

  public void testStartTaskPresent() {
    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition>" +
      "  <start-state>" +
      "    <task name='lets get it started' />" +
      "    <transition to='going steady' />" +
      "  </start-state>" +
      "  <state name='going steady' />" +
      "</process-definition>"
    );
    
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    
    TaskInstance taskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance();
    assertNotNull(taskInstance);
    assertEquals("lets get it started", taskInstance.getName());
    taskInstance.end();
    
    assertEquals("going steady", processInstance.getRootToken().getNode().getName());
  }

  public void testStartTaskAbsent() {
    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition>" +
      "  <start-state>" +
      "    <transition to='going steady' />" +
      "  </start-state>" +
      "  <state name='going steady' />" +
      "</process-definition>"
    );
    
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    
    TaskInstance taskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance();
    assertNull(taskInstance);
  }


> New tasks created with "taskMgmtInst.createStartTaskInstance()" cannot be "end()-ed"
> ------------------------------------------------------------------------------------
>
>                 Key: JBPM-554
>                 URL: http://jira.jboss.com/jira/browse/JBPM-554
>             Project: JBoss jBPM
>          Issue Type: Bug
>    Affects Versions: jBPM 3.1 beta 2
>            Reporter: James Schopp
>         Assigned To: Tom Baeyens
>            Priority: Critical
>
> The following code will generate an NPE:
> TaskInstance taskInstance = taskMgmtInst.createStartTaskInstance();
> taskInstance.end();
> It appears that the "task" datamember of TaskInstance may be null. In end( ) (line 350 of TaskInstance.java), there is a debug statements which accesses task.getName(), when task is null.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list