[jBPM] - Process Instance Variable within WorkItemHandler
by Amin MC
Amin MC [http://community.jboss.org/people/aminmc] created the discussion
"Process Instance Variable within WorkItemHandler"
To view the discussion, visit: http://community.jboss.org/message/602066#602066
--------------------------------------------------------------
Hi
I have a custom work item handler and I would like to load the value of a process instance variable while executing the work item handler. Basically I have a service method which does the following:
public String getValue(Long processId, String variableName) {
session.getProcessInstance(..);
instance.getVariable(variableName);
//do something with the value...but not modify
}
When i call this service method within the execute method of the work item handler I get a nullpointerexception and the stacktrace indicates that the processinstancebytearray value of ProcessInstanceInfo is null. I guess this is because the process has not reached a safe point to persist. Is there another way to get the value of a variable defined in the process within the execution of the work item handler?
This is the final part of a POC I am currently working on demonstrating the use of JBPM 5 so any help on this would be extremely grateful.
Cheers
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602066#602066]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[Beginner's Corner] - Spring
by zzpprk
zzpprk [http://community.jboss.org/people/zzpprk] created the discussion
"Spring"
To view the discussion, visit: http://community.jboss.org/message/609215#609215
--------------------------------------------------------------
Hello again
Spring is giving me a headache! This is not strictly JBoss but one of you guys might know.
I am currently working on a WEB service and the deployment WAR has a spring-ws-servlet.xml file. I am also working on a regular WEB application and that has a spring-servlet.xml file. What is the difference between those two files? Can they contain the same things?
I wish to add an MBeam to my WEB service so I can dynamically change the log4j logging level. I have found at http://www.unicon.net/node/614 that I can add the following lines to a config file but it does not say which one!
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="defaultDomain" value="SRS Exstream"/>
<property name="registerWithFactory" value="true"/>
<property name="locateExistingServerIfPossible" value="true"/>
</bean>
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="beans">
<map>
<entry key="bean:name=Log4jLevelChanger" value-ref="Log4jLevelChanger"/>
</map>
</property>
</bean>
<bean id="Log4jLevelChanger" class="com.hp.exstream.project.gmac.util.Log4jLevelChanger">
<property name="name" value="Log4jLevelChanger"/>
</bean>
I tried adding the above to my spring-ws-servlet.xml file but this has not worked because my MBean does not show-up in jConsole.
Any ideas how to get this to work?
Regards
Patrick
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/609215#609215]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[JBoss Tools] - BIRT reports, oda driver throws NullPointerException
by klosskruemel
klosskruemel [http://community.jboss.org/people/klosskruemel] created the discussion
"BIRT reports, oda driver throws NullPointerException"
To view the discussion, visit: http://community.jboss.org/message/609171#609171
--------------------------------------------------------------
Hello JBoss Community,
I integrated BIRT into a portal application using the Report Engine API 2.6.2. The portal application uses Hibernate, Seam 2.2, GateIn, the JBoss Portletbridge among others.
All works fine with the customers.rptdesign you can find in the BIRT tutorials. But using the Hibernate Datasource for our own reports I had a lot of trouble along way. The Eclipse preview is fine, but not the report I create within the application.
This is the error I get:
06.06.2011 14:44:29 org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
SCHWERWIEGEND: An error happened while running the report. Cause:
java.lang.NullPointerException
at org.jboss.tools.birt.oda.impl.ConsoleConfigurationOdaFactory.getSessionFactory(ConsoleConfigurationOdaFactory.java:54)
at org.jboss.tools.birt.oda.impl.ConsoleConfigurationOdaFactory.<init>(ConsoleConfigurationOdaFactory.java:34)
at org.jboss.tools.birt.oda.impl.HibernateConnection.open(HibernateConnection.java:47)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)
at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:212)
at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:208)
at org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:406)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:316)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
The last line in this code of the oda driver causes the NullPointerException:
public SessionFactory getSessionFactory(Properties properties) throws OdaException {
String configurationName = properties.getProperty(CONFIGURATION);
ConsoleConfiguration[] configurations = KnownConfigurations.getInstance().getConfigurations();
for (int i = 0; i < configurations.length; i++) {
if (configurations[i].getName().equals(configurationName)) {
consoleConfiguration=configurations[i];
break;
}
}
if (!isOpen()) {
try {
sessionFactory = consoleConfiguration.getSessionFactory();
The consoleConfiguration seems to be null. But why?
I have to add that I worked through this tutorial:
But i could not "run the Seam Generate Entities action" like said there. I got the message "Hibernate console configuration is empty" instead. So I just created a new Hibernate console configuration using this http://pastebin.com/BHvrCvGu seam-hibernate.cfg.xml and this http://pastebin.com/cXeBxH5X hibernate.properties file.
What can I do to bring my reports to work?
Regards
kloss
| %1,3% |
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/609171#609171]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months