[jboss-user] [JBoss jBPM] - newbie: Configurable Decision nodes in JBPM3.1

urkens_jp do-not-reply at jboss.com
Thu Jan 4 10:27:09 EST 2007

I am trying to create a configurable decision node in JBPM3.1 using a DecisionHandler class that in its decide() method calls a method on a specific class.
I have an example from JBPM2.1 where the 'Configurable' interface is used to make the decision node configurable by passing a String parameter in the decision node. This String parameter then represents the method to be called.
However this 'Configurable' interface does no longer exist in JBPM3.1.
So how does this work in JBPM 3.1 ?

Example from JBPM2.1 project:
1) DecisionHandler class
public class VodItemMethodDecision implements DecisionHandler, Configurable {
    public String decide(ExecutionContext context) {
        Long contentId =  (Long) context.getVariable(VariableNames.CONTENT_ITEM_ID);
        String result = null;
        try {
            VodItem vodItem = new VodItem();
            vodItem = (VodItem) vodItem.lookup(contentId);
            Class vodItemClass = vodItem.getClass();
            Method method = vodItemClass.getMethod(methodName,null);
            result =  method.invoke(vodItem,null).toString();
        } catch (Exception e) { } 
        if (result == null)
        return (result != null ? result : "unknown");

    public void configure(String configuration) throws ConfigurationException {
        if (configuration == null) {
            throw new ConfigurationException("The method name is missing");
        methodName = configuration;
    private String methodName = null;
    private static Log log = ogFactory.getLog(VodItemMethodDecision.class);

2) Decision Node declaration:

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

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

More information about the jboss-user mailing list