If you want to define them as custom attributes, you would have to extend the jBPM code, yes.
It's probably a lot easier to just define an additional task parameter that contains your data. So it will be similar to properties like Comment and Priority, but the data will simply be stored as a task parameter, as part of the ioSpecification of the userTask. This would not require you to extend the code itself, as tasks allow you to define additional task parameters out of the box. You can then use this parameter in your handler by doing workItem.getParameter(name).
Assuming you're defining your processes in XML, I would suggest taking a look at how properties like Comment and Priority get saved in the BPMN2 XML, so you can do something similar for your parameter.
I edited jbpm-bpmn2-5.1.0.Final.jar\META-INF\BPMN2SemanticModule.conf,add codes:
myuserTask=org.drools.bpmn2.xml.MyUserTaskHandler .MyUserTaskHandler.java extends TaskHandler,but bpmn file could not find myuserTask view.
So,how can I set conf file to present myuserTask view.
why is it wrong when I do this
"name" : "myUserTask",
"parameters" : [
"ActorId" : new StringDataType("kris"),
"Content" : new StringDataType()
"displayName" : "My User Task",