Simply add a results node in your wid:
import org.drools.process.core.datatype.impl.type.StringDataType;
[
[
"name" : "MyServiceTask“,
"parameters" : [
"parameter1" : new StringDataType()
],
"results":[
"result": new StringDataType()
],
"displayName" : „MyServiceTask",
"icon" : "icons/myServiceTask.gif"
]
]
As far as I know, there is now way to specify mapping. This has to be done in the bpmn editor.