Hi,
I'm developing a workflow for datamining application. Therefore I need to create my own nodes. These own nodes are no fancy new nodes, they basically extend the jbpm node with a default action.
What I did so far:
- extended the GPD to work with my own nodes
- extended my own node from the jbpm node and adapted the constructor
Adding nodes in the GPD works! But XML is not generated right.
What I get:
<node name="node1"> <action></action> </node>
<node name="node1"> <action class="MyAction"></action> </node>
public class MyNode extends Node {
public MyNode() {
Action action = new Action();
action.setAcceptPropagatedEvents("true");
action.setAsync("false");
action.setConfigType("field");
ImageDescriptor imageDescriptor = ImageDescriptor.createFromFile(null,
"/icons/full/obj16/action_enabled.gif");
action.setIconDescriptor(imageDescriptor);
action.setElementId("org.jbpm.gd.jpdl.action");
action.setLabel("Action");
action.setNamePrefix("action");
SemanticElementFactory factory = new SemanticElementFactory(
"org.jbpm.gd.jpdl.editor");
action.setFactory(factory);
setAction(action);
firePropertyChange("action", null, action);
firePropertyChange("expression", null, null);
firePropertyChange("className", null, null);
firePropertyChange("configInfo", "", null);
firePropertyChange("configType", "field", "field");
firePropertyChange("className", null, "");
firePropertyChange("expression", null, null);
firePropertyChange("className", null, "MyActionClass");
}
...
}