[jboss-user] [jBPM Development] - Some questions about the script execution code

Michael Wohlfart do-not-reply at jboss.com
Fri Aug 6 12:28:10 EDT 2010


Michael Wohlfart [http://community.jboss.org/people/mwohlf] replied to the discussion

"Some questions about the script execution code"

To view the discussion, visit: http://community.jboss.org/message/556294#556294

--------------------------------------------------------------
Hi HuiSheng,
thanks a lot for your reply,
> [..]
> And I find both evaluateExpression() and evaluateScript() are using evaluate() internal.  There is no different between them.  So we just using evaluateExpression() to do all of work about eval script.  Maybe sometimes it become much confused.
the problem I see here is that a script might get executed with the default expression language instead with the default script language, this part of the source is indeed very confusing can't we just remove the evaluateExpression() and evaluateScript() and in general use the evaluate() method and throw an exception if the execution language is not specified, this would be more in line with the rest of the code in my opinion.
> [...]
> 2.EnvironmentBinding had not finished yet.  We just removed all of IllegalStateException in jBPM-4.4 in order to get more feeback from community.  I think we could finish it in the next version, like achieve the put() method to store data into process variable.
I didn't think of this, but it would be a cool feature to have a groovy script write to process variables
> [...]
> 3.Did we have to achieve the readContext and writeContext.  In which scenarios we should use them?  If they are not neccessary,  I want to deprecated them in the next version,  so we could delete them in the future.
I also don't see an urgent need for them, the read contexts are hard coded now as far as I understand?
The write context would be where ever the variable is declared?
> [...]
> 4.How should we refactor TaskContext and ExecutionContext.  A long times ago, Tom said he want to refacter the TaskContext and ExecutionContext,  But he didn't make it more clearly.  if we could make a good plan,  we could finish this work by ourselves.
Could they be used to have access to task scoped and execution scoped variables, at least this would make sense to me :-/ right now the TaskContext just gives access to the task itself, so a script can do stuff like task.getVariable('varname')

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/556294#556294]

Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100806/0f5c86a6/attachment.html 


More information about the jboss-user mailing list