1 Reply Latest reply on Sep 10, 2006 6:54 PM by james1969

    why am i getting a null ProcessDefinition from graphSession.

    james1969

      I'm very new at jBPM. I'm trying to get a DecisionHandler working in a new workflow I've defined:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition
       xmlns="urn:jbpm.org:jpdl-3.1"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="urn:jbpm.org:jpdl-3.1 http://jbpm.org/jpdl-3.1.xsd"
       name="jpgWorkflow">
      
       <start-state>
       <transition to="check gif"/>
       </start-state>
      
       <decision name="check gif">
       <handler class="com.amg.condenet.mediaflow.task.GifTypeDecisionHandler">
       <targetBean>sizeGifImageAction</targetBean>
       <factoryKey>jbpmConfiguration</factoryKey>
       </handler>
       <transition name="gif identified as anmiated" to="keyframe" />
       <transition name="gif identified as image" to="size gif" />
       </decision>
      
       <node name="size gif">
       <transition name="image sized" to="crop gif" />
       </node>
      
       <node name="crop gif">
       <transition name="image cropped" to="end" />
       </node>
      
       <node name="keyframe">
       <transition name="keyframe extracted" to="gif2swf conversion" />
       </node>
      
       <node name="gif2swf conversion">
       <transition name="gif2swf converted" to="end" />
       </node>
      
       <end-state name="end"/>
      
      </process-definition>


      This workflow gets deployed with no errors, but when I go to execute it, graphSession.findLatestProcessDefinition("gifWorkflow") returns null? Is there a problem with the workflow definition? My DecisionHandler looks like this:

      public class GifTypeDecisionHandler implements DecisionHandler {
      
      
       private static Log log = LogFactory.getLog(GifTypeDecisionHandler.class);
      
       public String decide(ExecutionContext executionContext) throws Exception {
       log.info("********************************");
       log.info("* GifTypeDecisionHandler *");
       log.info("********************************");
      
       return "size gif";
       }
      }
      


      Right now, it's stubbed out, I simply trying to see if I'm defining a DecisionHandler properly for a 'decision' node.