You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by "chrishxl@163.com" <ch...@163.com> on 2014/07/28 11:21:52 UTC
Using setVariable of InstanceManagementAPI failed.
Hello there,
I have tried setVariable in InstanceManagementAPI of ODE 2.0,but it changed noting but to return a xmlInfo of the variable.
So, I went to check the source code of setVariable from https://github.com/apache/ode/commit/8e8b2f09a2b1e7845fca7d4b6eec524ca7217ff9.
And I found that the whole codes related with DAO is just as follow:
line 491 ScopeDAO scope = session.getScope(new Long(scopeId));
line 497 scope.getProcessInstance().getInstanceId().toString()
line 500 XmlDataDAO var = scope.getVariable(varName);
Obviously, this will change nothing of Scope but to get some values of it.
Then, a view of ScopeDao.java indicates that there is no variable set like method.
What Scope.getVaribale(varName) got is in private HashMap<String, XmlDataDAO> _variables.
Above all, what I want to do is to modify the value of variable in running process.
Using managementAPI is the best but the setVariable seems ineffective.What should I do with my need?
Directly query derby database and change the variable? Or using Java reflect mechanism to modify the variable in memory?
I really want to get help of you, my friend !
Chris Wong
Re: Using setVariable of InstanceManagementAPI failed.
Posted by Sathwik B P <sa...@gmail.com>.
Hi Chris,
ODE 2.0 was an experimental branch. There is no active development on it.
Future maintenance releases will be from 1.3.x branch.
To get your tomcat running with ODE-1.3.6 use the packaging application
listed below
http://ode.apache.org/resource-services.html -> Useful Tools ->
- Apache ODE Tomcat Bundle
<https://github.com/vanto/apache-ode-tomcat-bundle>: Build script that
creates a fully configured bundle with Tomcat 7, Apache ODE, Hibernate and
Bitronix.
Once your tomcat bundle is configured, you can build 1.3.x branch which
will generate 1.3.7-snapshot build.
Replace ode-1.3.6 jars with ode-1.3.7-snapshot jars in your tomcat.
regards,
sathwik
regards,
sathwik
On Mon, Jul 28, 2014 at 2:51 PM, chrishxl@163.com <ch...@163.com> wrote:
> Hello there,
>
> I have tried setVariable in InstanceManagementAPI of ODE 2.0,but
> it changed noting but to return a xmlInfo of the variable.
> So, I went to check the source code of setVariable from
> https://github.com/apache/ode/commit/8e8b2f09a2b1e7845fca7d4b6eec524ca7217ff9
> .
> And I found that the whole codes related with DAO is just as
> follow:
> line 491 ScopeDAO scope = session.getScope(new
> Long(scopeId));
> line 497
> scope.getProcessInstance().getInstanceId().toString()
> line 500 XmlDataDAO var = scope.getVariable(varName);
> Obviously, this will change nothing of Scope but to get some
> values of it.
> Then, a view of ScopeDao.java indicates that there is no variable
> set like method.
> What Scope.getVaribale(varName) got is in private HashMap<String,
> XmlDataDAO> _variables.
> Above all, what I want to do is to modify the value of variable in
> running process.
> Using managementAPI is the best but the setVariable seems
> ineffective.What should I do with my need?
> Directly query derby database and change the variable? Or using
> Java reflect mechanism to modify the variable in memory?
> I really want to get help of you, my friend !
>
>
>
> Chris Wong
>