[JBoss jBPM] - Error in documentation regarding Implementation of DecisionH
by sebastian.s
If you write your own Decision Class which has to implement DecisionHandler the documentation tells you to implement a method called select().
| public class ContentEvaluation implements DecisionHandler {
|
| public String select(OpenExecution execution) {
| String content = (String) execution.getVariable("content");
| if (content.equals("you're great")) {
| return "good";
| }
| if (content.equals("you gotta improve")) {
| return "bad";
| }
| return "ugly";
| }
| }
|
When I created my own class DecisionHandler made me implement a method called decide(). I think this an error in the docs and so it should be like this:
| public class ContentEvaluation implements DecisionHandler {
|
| public String decide(OpenExecution execution) {
| String content = (String) execution.getVariable("content");
| if (content.equals("you're great")) {
| return "good";
| }
| if (content.equals("you gotta improve")) {
| return "bad";
| }
| return "ugly";
| }
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250057#4250057
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250057
16 years, 7 months
[JBoss jBPM] - [GPD] Duplication of tag and problems with the setting of pr
by sebastian.s
Good morning!
I am not sure if this a bug so it's me again posting. I encountered the following problem. I was creating process definitions with the GPD component and I used an exlusive gateway and via the context menu I set a Handler Class for the gateway. Afterwards I was switching between the diagramm and source view to do some manual changes to the code like adding form-attributes to user tasks. After some switching between diagramm and source code I noticed a second handler tag within a decision.
| <decision g="208,176,48,48" name="hhk_decision">
| <handler class="DecisionHHK" />
| <handler class="DecisionHHK" />
| <transition g="-51,-21" name="to_java1" to="hhk_java1"/>
| <transition g="2,-25" name="to_java2" to="hhk_java2"/>
| </decision>
|
Since I added the jPDL4-schema to the Eclipse catalogue the source code editor complained about this and marked the second line in red.
I encountered this at least 3 times and I always had to remove the second tag manually.
Should I fill an issue in JIRA?
The second problem I encountered is that when I was trying to set properties of process elements in the process definition like task names the letters have been written from right to left. For example when typing "my_task" changed to "ksat_ym".
Should I fill an issue for this as well?
I am using Eclipse 3.5.0 (Java EE) with JRE1.6.0_06 on Windows XP SP3.
Thanks for your attention.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250053#4250053
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250053
16 years, 7 months