3 Replies Latest reply on Jun 30, 2010 7:52 PM by rebody

    JBPM-1209 about el refactor(2rd)

    rebody

      Hi guys,

       

      I upload a patch to finish the el refactor jobs which Tom left.  The details is followed:

       

      org.jbpm.bpmn.flownodes.ScriptTaskActivity.java                 [no modification]
      org.jbpm.jpdl.internal.activity.JmsActivity.java                [delete unused import]
      org.jbpm.jpdl.internal.activity.ScriptActivity.java             [no modification]
      org.jbpm.jpdl.internal.activity.ScriptBinding.java              [no modification]
      org.jbpm.jpdl.internal.activity.SubProcessActivity.java         [delete unused import - already fixed by alejandro]
      org.jbpm.jpdl.internal.activity.TaskActivity.java               [delete unused import - already fixed by alejandro]
      org.jbpm.pvm.internal.cal.Duration.java                         [change scriptmanager to el]
      org.jbpm.pvm.internal.el.ScriptExpression.java                  [no modification]
      org.jbpm.pvm.internal.email.impl.MailProducerImpl.java          [change scriptmanager to el]
      org.jbpm.pvm.internal.model.ExecutionImpl.java                  [change scriptmanager to el]
      org.jbpm.pvm.internal.model.ExpressionCondition.java            [change scriptmanager to el]
      org.jbpm.pvm.internal.model.VariableOutDefinitionSet.java       [change scriptmanager to el]
      org.jbpm.pvm.internal.script.ScriptManager.java                 [no modification]
      org.jbpm.pvm.internal.wire.binding.ScriptManagerBinding.java    [no modification]
      org.jbpm.pvm.internal.wire.descriptor.ExpressionDescriptor.java [change scriptmanager to el]
      

       

      After add some method into Expression, I could replace all of ScriptManager by Expression,  except for Script****Activity part,  these activities should use ScriptManager to evaluate script content.

       

      Please refer this https://jira.jboss.org/browse/JBPM-1209.  Any reply will be apprieciated.  Thank you very much.

        • 1. Re: JBPM-1209 about el refactor(2rd)
          aguizar

          HuiSheng, I examined the patch and all looks good to me. As for the script activities, I don't see why they need to call ScriptManager directly, they might as well call Expression.create and let that method instantiate the correct expression class according to the language. Did I miss something?

          • 2. Re: JBPM-1209 about el refactor(2rd)
            rebody

            Hi Alejandro,

             

            In my opinion,  Because the name of Script****Activity contains 'Script', so it should use ScriptManager.  Somewhere we need el could use Expression.  I think the difference between the Script and Expression is Expression has to write in one line,  Script could contain mutiply lines.

             

            And you are right.  At this time, Expression.create() could provide multiple scripts supporting.  I will make another patch for that.  Thank you for reviewing.

            • 3. Re: JBPM-1209 about el refactor(2rd)
              rebody

              Done.  Replace Script****Activity to use Expression.  Attached a new patch.

               

              https://jira.jboss.org/browse/JBPM-1209