ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chrishxl@163.com" <chris...@163.com>
Subject Using setVariable of InstanceManagementAPI failed.
Date Mon, 28 Jul 2014 09:21:52 GMT
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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message