0 Replies Latest reply on Nov 24, 2010 5:45 AM by Sergei Degtyarev

    Seam 2.2.0.GA: Bijection and BusinessProcess Interceptors

    Sergei Degtyarev Newbie

      i have some problem with jbmp process in seam.
      Main process definition:

      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition xmlns="urn:jbpm.org:jpdl-3.2"
           <start-state name="start">
                <transition name="to task" to="some task" />
           <task-node name="some task">
                <task name="HumanTask">
                     <assignment actor-id="#{creator}"></assignment>
                <transition to="Some subprocess"></transition>
           <process-state name="Some subprocess">
                <sub-process name="subprocess" binding="late"/>
                <variable access="read,write" name="neededVariable"
                <transition to="end" name="to_end">
           <end-state name="end"></end-state>

      Sub process definition:

      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="subprocess">
           <start-state name="start">
                <transition to="Human task"></transition>
                <event type="node-leave">
           <task-node name="Human task">
                <task name="subHumanTask"></task>
                <transition to="end"></transition>
           <end-state name="end"></end-state>

      In task-node 'some task' we need to create and set into process a variable, which is needed for subprocess.

      In java code it looks like this:

      @Out(required = false, scope = ScopeType.BUSINESS_PROCESS, value = "neededVariable")
      private String someString;
      public void endHumanTask(){
        someString = "some value for SubProcess";

      There is a problem.

      • 1. BijectionIntercepter fills up BisinessProcessContext

      • 2. BusinessProcess executes endTask, and process goes to executions (neededVariable doesn't exists in jBpm process, only in BisinessProcessContext)

      • 3. After that interceptor flushes a variable from BisinessProcessContext to jBpm ContextInstance of current process

      Is it common seam behaviour when seam works with subProcess/nonhuman task?