5 Replies Latest reply on Nov 4, 2005 8:43 AM by phantomass

    script tag in

    phantomass

      Hi,
      After reading the Fork node source code, i've try to put a script tag in the fork tag.

      <fork name="AJob" >
       <script>
       <variable name='a' access='read' />
       <expression>
       a = executionContext.getVariable("dynamicForkTransition");
       </expression>
      </script>
      <transition name="trans10" to="nextStep1" />
      <transition name="trans11" to="nextStep2" />
      </fork>
      


      It works fine, and the fork continues its path following the order specified in the Collection 'a'.

      But when i try this trick with a process Definition from the Database it doesn't work anymore. The fork node is executed as if i'had no script tag.

      Is there a way to solve this ?

      Thank You
      Regards,
      Jerôme

        • 1. Re: script tag in
          phantomass

          I've solved my problem.
          I must put 'write' for the variable access.

          • 2. Re: script tag in
            phantomass

            Sorry the problem is still there. I didn't solve the problem.
            If somebody has an idea.
            Thanks

            • 3. Re: script tag in
              kukeltje

              can you provide a full testcase including a unit test?

              • 4. Re: script tag in
                tom.baeyens

                it's a know problem. the script in a fork is not persisted. afaik this should have printed a warning while parsing the processdefinition.xml

                we are going to extend the nodetypes. probably we will go into the direction of many node types with limited configuration options. instead of limited node types with extensive configuration options.

                we have currently taken the approach to offer a limited set of node types for now. (we have done some research in test cases to verify that our core engine design actually covers all the workflow patterns) but we only documented the most used subselection of the node types and created documentation and persistence for that subset.

                so in 3.2 you'll see the number of supported node types grow. we will have support for adding dynamic programming logic in a fork. not sure yet if this will be done in the current Fork implementation or in a differrent node type...

                regards, tom.

                • 5. Re: script tag in
                  phantomass

                  Thank you Tom.
                  I'll try a work around with node and action delegation to do my dynamic execution path.

                  regards,
                  Jérôme