[jBPM Users] - List task comments with Activity name
by edeleflie
I'm finding the HistoryService's API slightly criptic.
I'd like to display, for any given ProcessInstance, all the activity-names it passed through, and the list of comments added each of those tasks.
what I do is retrieve all the HistoryTasks. Then use their Id's to retrieve all the HistoryComments. ... but the HistoryTask does not give me the activity name! (it gives me the outcome, however).
To get the activity-name, I have to go into a completely separate API space ... via the HistoryActivityInstanceQuery. Then I can do HistoryActivityInstance.getActivityName(). But this object does not expose access to comments!
I can find no programmatic way to associate a HistoryActivityInstance with a HistoryTask .. meaning that I have no way to associate Task Comments to their task's activity names.
Have I missed something? .. is there a way to retrieve comments listed by activity name?
I feel as though JBPM4's API is driven by something other than end-user logic. Maybe it is driven by some complex DB restrictions or something. I dont understand why I cant do (groovy syntax):
tasks = History.getTasks(proccessInstanceId)
tasks.each { task ->
println(task.getActivityName())
task.comments.each { comment ->
println(comment.getMessage())
}
}
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267431#4267431
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267431
14 years, 7 months
[Javassist Users] - Bytecode error loading class
by maltaweel
Hi,
I am loading classes via javassist and everything works fine when i run processes on one node.
However, I am now running my javassist code using a distributed process.
I have this code:
________________________________________________________
ClassPool pool = ClassPool.getDefault();
CtClass clazz = pool.makeClass("repast.simphony.util.bytecode.__DataSource" + counter++);
clazz.addInterface(pool.get("repast.simphony.util.bytecode.DataSource"));
StringBuilder methodStr = new StringBuilder("public Object getData(Object obj) {return ");
_____________________________________________________________
In the distributed mode I get an error stating:
javassist.NotFoundException: repast.simphony.util.bytecode.__DataSource0
at javassist.ClassPool.get(ClassPool.java:436)
at repast.simphony.util.bytecode.ByteCodeUtilities.createMethodCall(ByteCodeUtilities.java:74)
at repast.simphony.data.logging.gather.MethodMapping.initDataSource(MethodMapping.java:48)
at repast.simphony.data.logging.gather.MethodMapping.getColumnValue(MethodMapping.java:71)
at repast.simphony.data.logging.gather.aggregate.AbstractStatsAggregateMapping.getStats(AbstractStatsAggregateMapping.java:44)
________________________________________________________
So it seems that the DataSource class that I can make in one node is not able to be made in the other (remote) node. Is there something I should do to enable the class to be distributed and loaded across nodes?
Thanks for your help.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267428#4267428
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267428
14 years, 7 months