[jboss-user] [JBoss jBPM] - adding default Action to Node

MarcS do-not-reply at jboss.com
Tue Apr 22 02:40:04 EDT 2008


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>

What I expect:
<node name="node1">
  | 	<action class="MyAction"></action>
  | </node>

Properly there is something wrong with my code.

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");
  | 	}
  | ...
  | }

Is it actually doable? What am I doing wrong?

Thanks,
Marc

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145692#4145692

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145692



More information about the jboss-user mailing list