[Design of JBoss jBPM] - Re: GetOutcomes returns additional transition
by shekharv
Agree with Ronald. That was what I also thought would be the case. Hence the question,
The fact that jbpm now automatically adds an outcome to the list is quite counter-intuitive actually as that list of outcomes is what we present to the user as possible actions he can take as part of completing the task. So by choosing the action we are saying that the completion is implied. If an action is not chosen then we need to implicitly select an action/transition and then complete it. And that is being handled as expected.
Let me see if I can make a point with an example:
Here's the processdefinition:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process key="CompletedOutcome"
| name="CompletedOutcome"
| xmlns="http://jbpm.org/4.0/jpdl">
|
| <start g="20,20,48,48">
| <transition to="Please Pick A Designation"/>
| </start>
|
| <task name="Please Pick A Designation" g="96,16,127,52">
| <assignment-handler
| class="org.jbpm.examples.task.assignmenthandler.AssignTask">
| <field name="assignee">
| <string value="shekharv"/>
| </field>
| </assignment-handler>
| <transition name="Manager" to="Manager"/>
| <transition name="Programmer" to="Manager"/>
| </task>
|
| <end name="Manager" g="255,16,88,52"/>
| <end name="Manager" g="255,16,88,75"/>
|
| </process>
|
Here's the unit test: Am trying to mimic how a client application would interact with jbpm.
| public void test_task_has_correct_outcome() {
|
| ProcessInstance pi =
| executionService.startProcessInstanceByKey("CompletedOutcome");
|
| List<Task> tasks = taskService.findPersonalTasks("shekharv");
|
| System.out.println("shekharv has to complete the following task:"
| + tasks.get(0).getName());
|
| Set<String> outcomes = taskService
| .getOutcomes(tasks.get(0).getDbid());
|
| System.out.println("Task \"" + tasks.get(0).getName()
| + "\" has the following possible outcomes:");
|
| assertTrue(outcomes.contains("Stage 1"));
| assertTrue(outcomes.contains("Stage 2"));
| //assertTrue(outcomes.size() == 2);
|
| for (String outcome : outcomes) {
| System.out.println(outcome);
| }
|
| taskService.completeTask(tasks.get(0).getDbid()
| , "Stage 1");
|
| }
|
output of the test case:
| shekharv has to complete the following task:Please Pick A Designation
| Task "Please Pick A Designation" has the following possible outcomes:
| Manager
| Programmer
| completed
|
So the user will now see an option of 'completed', and depending on how the transitions are ordered in that task node it might result in either the "Manager" activity selected or the "Programmer". On the lighter end, that is scary :)
In the context of this workflow the transition 'completed' does not even make sense.
Another example is, what if I have workflows and the actions depicted in a non-english language, people might not even understand what 'completed' means.
So if jbpm adds that transition by default the client applications have to filter it out, they will not have any other option but to.
sorry about the length of the post, it just grew on me!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241311#4241311
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241311
14 years, 10 months
[Design of Management Features on JBoss] - Contents of jnp-service.url file
by charles.crouch@jboss.com
This question arises out of https://jira.jboss.org/jira/browse/JOPR-254
JBAS5 now generates a file when it starts up which contains a jnp url which can be used by clients to connect to the JBAS instance. This was done to make it easier for the Jopr/JON agent to bootstrap its connection without have to go into the bowels of the app server and parse various configuration files to determine the url.
This all works great until someone binds the JBAS instance to 0.0.0.0, at which point the url in the file also contains 0.0.0.0 which is not very helpful for a client to connect to. So in this case what address should we be using?
a) default for the host (could be loopback or external address)
b) any loopback address
c) change the file to return all addresses
Since the Jopr/JON agent is the only client for this file so far, option b) is fine for us.
I'm wondering if we ever need to specify a non-loopback address in this case for any other future clients? The JON agent is almost always local so want's to go over the loopback address. If we don't hear any other opinions to the contrary will probably go with option b).
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241306#4241306
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241306
14 years, 10 months
[Design the new POJO MicroContainer] - Re: ClassPool for JBoss Reflection
by flavia.rainone@jboss.com
"flavia.rainone(a)jboss.com" wrote : "kabir.khan(a)jboss.com" wrote : The classpools from asintegration-mc could be put into another jar, although I am not sure if jboss-reflect is the right place for them. Maybe they should be put into another project.
| This is a question whose answer I don't know. I thought it belonged to JBoss Reflect, as there is a task to create an appropriate class loader (JBREFLECT-3). Isn't those class pools all that is needed to make JBoss Reflect/Javassist to work on the AS environment?
Ales, the main question here is where do these class pools belong to.
I'm gonna adapt the Class Pools Kabir wrote, removing AOP related stuff, and a few inconsistencies that I found throughout the CP hierarchy. The resulting CP is gonna fit JBoss AS CL structure, and that's what is necessary for using JBoss Reflect/Javassist with AS.
So, how tied is JBoss Reflect in to AS? If it is not tied in, these class pools belong elsewhere (where?). Otherwise, they belong to JBoss Reflect itself.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241280#4241280
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241280
14 years, 10 months