expression to access instance variable
by Sebastian Schneider
Hello everybody,
first of all sorry for bothering the dev-list but I've been trying around for some time now and would like to know if this is possible or not. Actually I just want to do a very simple thing. I have process variables and I would like to use them as parameter values when performing java tasks. So I specify the argument of a java task like this:
<arg><object expr="#{attendeeId}" /></arg>
! Supposing attendee is a process variable of type String. !
Caused by: java.lang.Exception: couldn't create argument 0: script evaluation er
ror: javax.el.PropertyNotFoundException: Cannot find property attendeeId
at org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.getArgs(Object
Descriptor.java:348)
at org.jbpm.jpdl.internal.activity.JavaActivity.perform(JavaActivity.jav
a:79)
Is this possible? Ronald thought it was. How does JUEL know that attendeeId is of simple type and that there isn't a getter to be invoked like in the examples given in the documentation? For #{order.owner} JUEL would inkove order.getOwner() on the bean.
Thanks for your help.
Sebastian
--
Mit freundlichen Grüßen / Best regards / Cordialement
Sebastian Schneider, schneider(a)dvz.fh-aachen.de
15 years
[jBPM Development] - Re: Issue #JBPM-2537
by jbarrez
"sebastian.s" wrote :
| 1) I don't understand the test case you've supplied. What's the reason for task2 and the second end state? They are not even connected to the start?? At first I thought I had misread the definition and so I copied it into a process definition file to visualize it with the GPD.
|
The test process is just the one that is attached to the issue you mention. So it may not make sense, but I didn't want to change it because I wanted to replicate the issue as the poster intended
"sebastian.s" wrote :
| 2) I did not know you've started to work on this and I tried to resolve this issue with my limited knowledge on my own right now. Within TimerImpl I checked if the activity of the execution was of type task and in case of this was true I retrieved the task-object and called OpenTask.delete().
|
I didn't start working on the issue, I only made a test case to verify if the issue was correct. Which is the case.
"sebastian.s" wrote :
| Afterwards I saw your test case failing since the task was now deleted and not completed but your test case checks if the task is closed/completed when the timer fires.
|
So the test was almost perfect ... almost ;-)
"sebastian.s" wrote :
| Wouldn't it make more sense to delete the task? Completing it does not seem right since it was open and not completed when the timer fired. Especially in from a reporting perspective it does not make sense, does it?
| When you run a report on the gathered process data it seems as if this task was completed by its assignee although it was not.
|
At first, I indeed assumed deleting the task was enough. But now I'm thinking about it: from a history perspective, the task existed for a while. So the task may be deleted (runtime data), but the history should reflect that the task has been open for a while, but a timer interrupted it.
I triggered Tom to take a look at the issue.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263431#4263431
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263431
15 years
[jBPM Development] - Re: Issue #JBPM-2537
by sebastian.s
The source code posted is faulty. I did not set activityIsTask to true. However I have 2 problems:
I don't manage to retrieve the task. I can get the execution but getTask() returns null. Furthermore the constructor of TaskDelete which is fired when delete() is called on a task-object checks if the task is related to an execution and prevents deletion in such case.
| public TaskDelete(TaskImpl task, String reason) {
| if (task.getExecution()!=null) {
| throw new JbpmException("tasks related to an execution must be completed. they cannot just be deleted");
| }
|
| this.task = task;
| this.reason = reason;
| }
|
The task I intend to delete is related to an execution. So what about checking if it belongs to an active execution but allow deletion of it in case the execution has ended which should be the case when the timer has fired, right?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263329#4263329
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263329
15 years