[jBPM Users] - Re: how to get all tokens from processinstance
by saraswati.santanu
LoggingInstance is not persisted. So you cannot really get the history data from it after the transaction is over. For that you need LoggingSession. If you are saving the logs then you can get the information using LoggingSession.
| //create a LoggingSession. getSession() here returns a Hibernate session
| LoggingSession logginSession = new LoggingSession(getSession());
|
| //this map contains Token vs List of logs
| Map logs = logginSession.findLogsByProcessInstance(processInstance.getId());
|
| //Iterate and do whaterver you need to
| Set<Entry> entries = logs.entrySet();
| for (Entry entry : entries) {
| List<ProcessLog> processLogs = (List<ProcessLog>)entry.getValue();
| for (ProcessLog log:processLogs) {
| System.out.println("Log type : " + log.getClass().getSimpleName());
| }
| }
|
So far I remember, along with the code above, you need to call
| jbpmContext.save(processInstance);
|
everytime after you do the signalling/task execution. This call saves the logs in db.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264558#4264558
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264558
16 years, 5 months
[Installation, Configuration & Deployment] - JBOSS 4.3 EAP NOT PICKING UP TNSNAMES.ORA
by scubie999
Hi All
I have installed a Solaris Intel Server with JBOSS 4.3 EAP and Oracle 10.2.0.1 client (64 bit).
I can do a tnsping and sqlplus to the database with no problem, however, when I start JBOSS it gives me an error:
10:22:38,335 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified
)
If I change the oci connect descriptor to include the full description from the tnsnames.ora file, the system starts up. If I use the thin connection it also works.
I have also checked permissions of the $ORACLE_HOME/network/admin, the user has rights to it.
i.e.:
This does not work:
<connection-url>jdbc:oracle:oci:@ORCL</connection-url>
despite sqlplus user/pass@ORCL working, so does tnsping ORCL.
This does work:
<connection-url>jdbc:oracle:oci:@(description=(address=(host=hostname)(protocol=tcp)(port=1521))(connect_data=(sid=ORCL)))</connection-url>
Any advice will be appreciated.
Thank you
Carlo
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264546#4264546
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264546
16 years, 5 months