How do you embed Java code in your JPDL ?

 

You can use a BeanShell expression to add a Java script in your JPDL process definition, you can use the <script> tag

ex:
<process-definition>
  <event type="node-enter">
    <script>
      System.out.println("Entered node"+node);
    </script>

  </event>
  ...
</process-definition> 
You can use in your script all process variables created plus the following process variables :

  • executionContext
  • token
  • node
  • task
  • taskInstance

Related articles available on mastertheboss.com

JBPM tutorial

JBoss jBPM 3 is a flexible, extensible framework for process lang

How do I fire an action every time a JBPM Node enters?

JBoss recipe of the day

JBoss Jbpm superstates

What is a superstate ? a Superstate is a group of nodes. Supersta

Jbpm Mail delivery

Almost every workflow needs a notification of the process activit

JBPM best practices

There's no perfect rule to model your workflow, it depends on the

How to delete/persist your JBPM process after restart ?

JBoss recipe of the day

Follow us on Twitter