JBoss Community

Re: How to add Java code to the jbpm process

created by Al Daher in jBPM - View the full discussion

Hi,

 

well if you are definig the proces through the diagram, you can select a node and do the following steps:

 

  1. Create a class under the following Package com.xxx.yyy.workflow.action.  call it MyClassHandler
  2. MyClassHandler should implement org.jbpm.graph.def.ActionHandler.
  3. in execute Method you should implement what you like to do (call EJB,  orsystem.out, call database, change process variables....)
  4. Go to your processdefinition.xml
  5. Select the node to which you want to assign an action
  6. under Properties View, select Action tab
  7. select Configure Action
  8. go to Details and add the class name that implements your node action. For example : com.xxx.yyy.workflow.action.MyClassHandler
  9. choose  "Field" as a Config Type
  10. select Handler in the dropdown list
  11. Save the process Definition

 

This description is for a simple node. Some changes mut be done for Decision nodes or other components.

Hopefully it helped

 

Regards

Reply to this message by going to Community

Start a new discussion in jBPM at Community