[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, 10 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, 10 months
[Installation, Configuration & DEPLOYMENT] - Log4j Error
by tmcdeploy
Hi,
I'm trying to deploy a WAR file with it's own log4j.properties and log4j.jar. I have tried using the jboss-web.xml in the WEB-INF directory as shown below:
<?xml version="1.0" encoding="UTF-8" ?>
| <!DOCTYPE jboss-web PUBLIC
| "-//JBoss//DTD Web Application 4.2//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
| <jboss-web>
| <class-loading java2ClassLoadingCompliance="false">
| <loader-repository>
| rfims:loader=rfims.war
| <loader-repository-config>
| java2ParentDelegation=false
| </loader-repository-config>
| </loader-repository>
| </class-loading>
| </jboss-web>
But I keep getting the following error:
15:55:50,865 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.appender.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
| 15:55:50,865 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
| 15:55:50,865 ERROR [STDERR] log4j:ERROR [org.jboss.mx.loading.UnifiedClassLoader3@85097d{ url=file:/D:/jboss-4.2.2.GA/jboss-4.2.2.GA/server/default/tmp/deploy/tmp30919rfims-exp.war/ ,addedOrder=43}] whereas object of type
| 15:55:50,865 ERROR [STDERR] log4j:ERROR "org.jboss.logging.appender.FileAppender" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@ab95e6].
| 15:55:50,865 ERROR [STDERR] log4j:ERROR Could not instantiate appender named "FILE".
Can anyone help? Thanks.
BTW using jboss-4.2.2.GA
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250052#4250052
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250052
16 years, 10 months
[JBoss Portal] - Re: JBoss portal performance: (Portal)templatePortal.copy(da
by vivek_saini07
This is a performance issue with JBP. This particular method gets called when dashboard gets created first time for user.
If we have 20K users for JBP, 20k select queries gets fired every time a new dashboard gets created. So it appears complete show stopper. Even second level caching does not help in this scenario.
Following is the way to recreate the scenario.
1) check out code from SVN (JBoss_Portal_Branch_2_7).
2) put the SOP's around this method in CustomizationManagerService.
| if (dashboardPortal == null)
| {
| Portal templatePortal = (Portal)portalObjectContainer.getObject(TEMPLATE_ID);
|
| // Copy the template portal
| System.out.println("templatePortal.copy(dashboardContext, userId, false); =======>start");
| dashboardPortal = (Portal)templatePortal.copy(dashboardContext, userId, false);
| System.out.println("templatePortal.copy(dashboardContext, userId, false); =======>end");
| copy(templatePortal, dashboardContext.getChild(userId));
|
| }
|
3) compile & deploy and run it. Create some 8-10 users from admin-portlet.
4) restart the server then login with new users and access the dashboard.
you will notice so many select queries within those SOP's. N0umber of these select statements are equal to number of dashboard already created in JBP. Following is the output with 3 users.
|
| templatePortal.copy(dashboardContext, userId, false); =======>start
| 10:32:03,547 INFO [STDOUT] Hibernate: select displaynam0_.INSTANCE_PK as INSTANCE1_0_, displaynam0_.TEXT as TEXT0_, displaynam0_.LOCALE as LOCALE0_ from JBP_PORTAL_OBJECT_DNAMES displaynam0_ where displaynam0_.INSTANCE_PK=?
| 10:32:03,548 INFO [STDOUT] Hibernate: select children0_.PARENT_KEY as PARENT4_1_, children0_.PK as PK1_, children0_.NAME as NAME1_, children0_.PK as PK9_0_, children0_."PATH" as PATH2_9_0_, children0_.NAME as NAME9_0_, children0_.PARENT_KEY as PARENT4_9_0_ from JBP_OBJECT_NODE children0_ where children0_.PARENT_KEY=?
| 10:32:03,550 INFO [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
| 10:32:03,557 INFO [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
| 10:32:03,564 INFO [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
| 10:32:03,571 INFO [STDOUT] Hibernate: insert into JBP_OBJECT_NODE (PK, "PATH", NAME, PARENT_KEY) values (null, ?, ?, ?)
| 10:32:03,572 INFO [STDOUT] Hibernate: call identity()
| 10:32:03,576 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_OBJECT (LISTENER, PK) values (?, ?)
| 10:32:03,576 INFO [STDOUT] Hibernate: insert into JBP_PORTAL (PK) values (?)
| 10:32:03,577 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_MODE (PK, name) values (?, ?)
| 10:32:03,577 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_MODE (PK, name) values (?, ?)
| 10:32:03,577 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_MODE (PK, name) values (?, ?)
| 10:32:03,577 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_MODE (PK, name) values (?, ?)
| 10:32:03,577 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_MODE (PK, name) values (?, ?)
| 10:32:03,578 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_WINDOW_STATE (PK, name) values (?, ?)
| 10:32:03,578 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_WINDOW_STATE (PK, name) values (?, ?)
| 10:32:03,584 INFO [STDOUT] Hibernate: insert into JBP_PORTAL_WINDOW_STATE (PK, name) values (?, ?)
| 10:32:03,584 INFO [STDOUT] templatePortal.copy(dashboardContext, userId, false); =======>end
|
So following query gets fired multiple times.
| select
| portalobje0_.PK as PK10_0_,
| portalobje0_.LISTENER as LISTENER10_0_,
| portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_,
| case when portalobje0_1_.PK is not null then 1
| when portalobje0_2_.PK is not null then 2
| when portalobje0_3_.PK is not null then 3
| when portalobje0_4_.PK is not null then 4
| when portalobje0_.PK is not null then 0
| end as clazz_0_,
| declaredpr1_.OBJECT_KEY as OBJECT1_2_,
| declaredpr1_.jbp_VALUE as jbp2_2_,
| declaredpr1_.NAME as NAME2_,
| modes2_.PK as PK3_,
| modes2_.name as name3_,
| windowstat3_.PK as PK4_,
| windowstat3_.name as name4_
| from JBP_PORTAL_OBJECT portalobje0_
| left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK
| left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK
| left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK
| left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK
| left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY
| left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK
| left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK
|
| where portalobje0_.PK=?
Any idea/help/thought towards resolving it would be greatly appreciated.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250051#4250051
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250051
16 years, 10 months