1

I have been working with custom tasks in my project and palette for a few weeks. Today I was adding a new task into my configuration. After I restarted eclipse, the Custom Tasks tab of the palette stopped displaying. I reverted my changes and restarted eclipse again; however, the custom tasks were still not appearing in my palette.

I am using JBPM 6.1 and Luna 1.1.3 for the Eclipse BPMN2 Modeler plug-in.

Below is my WorkItemDefinitions.wid

import org.drools.core.process.core.datatype.impl.type.StringDataType;
import org.drools.core.process.core.datatype.impl.type.BooleanDataType;
import org.jbpm.examples.model.WTSRRequest;
import org.jbpm.examples.model.UserSelection;

[
  [
    "name" : "FormEmail",
    "parameters" : [
      "From" : new StringDataType(),
      "To": new StringDataType(),
      "Subject" : new StringDataType(),
      "Body" : new StringDataType(),
      "Request" : new WTSRRequest()
    ],
    "results" : [
      "success" : new BooleanDataType(),
      "errorMsg" : new StringDataType()
    ],
    "displayName" : "Email Users",
    "icon" : "icon-info.gif"
  ],
  [
    "name" : "Fortress",
    "parameters" : [
      "Request" : new WTSRRequest(),
      "SpecificUser": new StringDataType(),
      "RoleSelection": new StringDataType(),
    ],
    "results" : [
      "user_selection_out" : new UserSelection(),
      "user_list_out" : new StringDataType(),
      "groups_out" : new StringDataType()
    ],
    "displayName" : "Fortress Lookup",
    "icon" : "icon-info.gif"
  ],
  [
    "name" : "AddFormHistory",
    "parameters" : [
      "Request" : new WTSRRequest(),
      "User" : new StringDataType(),
      "FormType" : new StringDataType(),
      "Role" : new StringDataType(),
      "Action" : new StringDataType(),
      "Comment" : new StringDataType()
    ],
    "results" : [
      "request_out" : new WTSRRequest()
    ],
    "displayName" : "Add History",
    "icon" : "icon-info.gif"
  ]
]

Below is my CustomWorkItemHandlers.config

[
  "FormEmail" : new org.jbpm.examples.util.handler.EmailHandler(),
  "Fortress" : new org.jbpm.examples.util.handler.FortressHandler(),
  "AddFormHistory" : new org.jbpm.examples.util.handler.AddFormHistoryHandler()
]

And for posterity's sake, here is my drools.session.conf

drools.workItemHandlers = CustomWorkItemHandlers.conf

Is there some syntax error that I am not finding? If not, is there some way to debug or print some output to determine why the palette is not displaying the Cutom Tasks?

Mike
  • 820
  • 7
  • 19
  • 1
    A few questions: 1) What version of jbpmn? 2) I assume you mean "drools.session.conf" versus "drolls.session.conf" Also, you may need to close your bpmn files in the editor (close tabs) and reopen the workflows. Eclipse plugin isn't very well behaved w/ loading work item handlers. – Grady G Cooper Apr 29 '15 at 20:46
  • I updated my question. I am using JBPM 6.1 and Luna 1.1.3 for the eclipse BPMN2 Modeler plug-in. – Mike Apr 29 '15 at 20:54
  • 1
    May want to check this post: http://stackoverflow.com/questions/28825365/jbpm6-service-task-to-execute-java-code/28832896#28832896 – Grady G Cooper Apr 29 '15 at 21:34
  • Thanks for the link, but I was the one that wrote that answer. It was what I was originally using until I made an update and suddenly it wasn't working. I was hoping that there was some syntax error that I was missing. – Mike Apr 30 '15 at 11:53
  • I figured out the issue. I moved my processes into a subfolder and that appears to be the reason the custom tasks were not loading. – Mike Apr 30 '15 at 15:29

1 Answers1

0

I figured out the issue. I had moved my processes into a new folder src/main/resources/processes to clean up my project. I moved all my processes back to src/main/resources and the custom tasks are now appearing. I submitted a bug to the BPMN2 Editor bugzilla.

Mike
  • 820
  • 7
  • 19