[JBoss JIRA] Created: (JBPM-2577) QuerySyntaxException in HistoryService
by Jörg Prim (JIRA)
QuerySyntaxException in HistoryService
--------------------------------------
Key: JBPM-2577
URL: https://jira.jboss.org/jira/browse/JBPM-2577
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.1
Environment: JBoss 4.2.3, HSQLDB, jBPM 4.1
Reporter: Jörg Prim
HistoryDetailQuery uses internal dbid for processInstanceId(java.lang.String processInstanceId) hsql queries.
If you use the (String) processInstanceId it results in a org.hibernate.hql.ast.QuerySyntaxException: unexpected token: .1 near line 1, column 130 [select hd
from org.jbpm.pvm.internal.history.model.HistoryDetailImpl as hd where hd.historyActivityInstance.d
bid = StateWorkflow.1 ]
Detail see forum.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[JBoss JIRA] Created: (JBPM-2576) Extending HistorySession - add public getters in HistoryEvents
by Torsten R (JIRA)
Extending HistorySession - add public getters in HistoryEvents
--------------------------------------------------------------
Key: JBPM-2576
URL: https://jira.jboss.org/jira/browse/JBPM-2576
Project: jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Torsten R
Fix For: jBPM 4.x
To deliver status and event information live to another system another HistorySession could be used. To be able to plug a new HistorySession into jBPM the event classes should have getter methods to give access to the event specific data.
If possible, I can take care of these changes.... Testing should be simple for me, as I need these methods :-)
Event: ActivityEnd, DecisionEnd
Public getter for: transitionName
Event: TaskActivityStart, TaskAssign, TaskCreated, TaskDelete, TaskUpdated
Public getter for: task
Event: TaskAssign
Public getter for: assignee
Event: TaskComplete
Public getter for: outcome
Event: TaskDelete
Public getter for: reason
Event: VariableCreate, VariableUpdate
Public getter for: variable
In addition the Binding for HistorySessionChain is missing:
public class HistorySessionChainBinding extends WireDescriptorBinding {
private static final String HISTORY_SESSION_CHAIN_TAG = "history-session-chain";
public HistorySessionChainBinding() {
super(HISTORY_SESSION_CHAIN_TAG);
}
public Object parse(Element element, Parse parse, Parser parser) {
ObjectDescriptor objectDescriptor = new ObjectDescriptor(HistorySessionChain.class);
ListBinding listBinding = new ListBinding();
ListDescriptor listDescriptor = (ListDescriptor) listBinding.parse(element, parse, parser);
objectDescriptor.addInjection("delegates", listDescriptor);
return objectDescriptor;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[JBoss JIRA] Created: (JBPM-1914) Problem in retrieving variables of Serializable objects
by Mauro Molinari (JIRA)
Problem in retrieving variables of Serializable objects
-------------------------------------------------------
Key: JBPM-1914
URL: https://jira.jboss.org/jira/browse/JBPM-1914
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Core Engine
Affects Versions: jBPM 3.3.0 GA
Reporter: Mauro Molinari
Priority: Critical
I have encountered a serious problem working with variables whose value is a serializable object.
The problem is that sometimes (not always!) an error like the following is given when retrieving a variable:
java.lang.ClassCastException: org.jbpm.bytes.ByteArray$$EnhancerByCGLIB$$cc67d06e
The code is like:
MySerializableClass obj = (MySerializableClass) contextInstance.getVariable("myVariable");
(of course, "myVariable" is a variable that I previously have set with a MySerializableClass object)
Apart from the CGLIB awful problem with proxies, even if I extract the value from the proxy with the following:
public static Object getCGLIBProxiedObject(final Object proxy)
{
if(proxy instanceof HibernateProxy)
{
final LazyInitializer initializer =
((HibernateProxy) proxy).getHibernateLazyInitializer();
return initializer.getImplementation();
}
return proxy;
}
the problem is that the variable value is retrieved as a org.jbpm.bytes.ByteArray instead of a MyClass instance!
I did some debugging and discovered that:
- in org.jbpm.context.exe.VariableContainer.getVariable(String), when org.jbpm.context.exe.VariableContainer.hasVariableLocally(String) is called, Hibernate lazily retrieves a org.jbpm.context.exe.variableinstance.ByteArrayInstance instance from the database and creates it using its empty constructor
- unfortunately, when a org.jbpm.context.exe.VariableInstance (extended by ByteArrayInstance) is constructed using its constructor, its converter instance variable remains null
- the VariableInstance converter instance variable is set to something only when a VariableInstance is created using org.jbpm.context.exe.JbpmType.newVariableInstance(), but this is not the case when a VariableInstance is lazily loaded by Hibernate; in fact, in my case, org.jbpm.context.exe.JbpmType.newVariableInstance() is never called and the converter field of my ByteArrayInstance instance is always null!
- this causes org.jbpm.context.exe.VariableInstance.getValue() to return the value given by org.jbpm.context.exe.variableinstance.ByteArrayInstance.getObject() without applying the necessary conversion (deserialization)
Please note that my variable values are stored in jBPM database in JBPM_VARIABLEINSTANCE table with the CONVERTER column correctly populated with "R".
I think this is a critical problem. By now, the only workaround I have found is to always apply the following utility method when retrieving variable values, before returning them to the client code:
public static Object extractVariableValue(final Object rawValue)
{
Object result = CardinisJbpmUtilities.getCGLIBProxiedObject(rawValue);
if(result instanceof ByteArray)
try
{
result =
new ObjectInputStream(new ByteArrayInputStream(((ByteArray) result)
.getBytes())).readObject();
}
catch(final Exception e)
{
throw new RuntimeException(e);
}
return result;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[JBoss JIRA] Created: (JBPM-2345) javax/el/ExpressionFactory Linkage error
by Tom Vleminckx (JIRA)
javax/el/ExpressionFactory Linkage error
-----------------------------------------
Key: JBPM-2345
URL: https://jira.jboss.org/jira/browse/JBPM-2345
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: Leopard 10.5,Tomcat6, Spring 2.5
Reporter: Tom Vleminckx
I'm having the following error when trying to integrate JBPM4 with spring. This is a runtime error when trying to deploy to tomcat.
-----------------
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.LinkageError: loader constraint violation: when resolving interfacemethod "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExressionFactory;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, com/sun/faces/config/ConfgureListener, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicatonContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1570)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:403)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:518)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1473)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:250)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
...
-------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[JBoss JIRA] Created: (JBPM-2151) no environment to get org.jbpm.session.RepositorySession
by Heiko Braun (JIRA)
no environment to get org.jbpm.session.RepositorySession
--------------------------------------------------------
Key: JBPM-2151
URL: https://jira.jboss.org/jira/browse/JBPM-2151
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Console
Reporter: Heiko Braun
Assignee: Heiko Braun
Fix For: jBPM 4.0.0.Beta1
Caused by: org.jbpm.JbpmException: no environment to get org.jbpm.session.RepositorySession
at org.jbpm.env.Environment.getFromCurrent(Environment.java:195)
at org.jbpm.env.Environment.getFromCurrent(Environment.java:188)
at org.jbpm.pvm.internal.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:1026)
at org.jbpm.pvm.internal.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:79)
at org.jbpm.integration.console.ModelAdaptor.adoptExecution(ModelAdaptor.java:66)
at org.jbpm.integration.console.ProcessManagementImpl.adoptTopLevelExecutions(ProcessManagementImpl.java:123)
at org.jbpm.integration.console.ProcessManagementImpl.getProcessInstances(ProcessManagementImpl.java:104)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[JBoss JIRA] Created: (JBPM-2529) jBPM-Spring Integration doesn't work for EvenListener-s
by Christian Bonami (JIRA)
jBPM-Spring Integration doesn't work for EvenListener-s
-------------------------------------------------------
Key: JBPM-2529
URL: https://jira.jboss.org/jira/browse/JBPM-2529
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.1
Environment: jBPM 4.1, Java 6, JOTM, Spring 2.5.6, OSX Snow Leopard
Reporter: Christian Bonami
Fix For: jBPM 4.x
jBPM-Spring integration works for <custom /> activities (ActivityBehaviour, ExternalActivityBehaviour).
But registration of EventListener-implementations with Spring doesn't work yet. Take a look:
<?xml version="1.0" encoding="UTF-8"?>
<process name="test" xmlns="http://jbpm.org/4.0/jpdl">
<start g="38,16,48,48" name="start">
<transition g="-25,-18" name="to a" to="a" />
</start>
<state g="16,96,92,52" name="a">
<on event="start">
<event-listener expr="${simpleListener}" />
</on>
<transition g="-46,-18" name="to service" to="service" />
</state>
<custom name="service" g="16,180,92,52" expr="${executeServiceAndWaitState}">
<transition name="to end" to="end" g="-39,-18" />
</custom>
<end g="38,264,48,48" name="end" />
</process>
and
@Component("simpleListener")
public class SimpleListener implements EventListener{
private static final long serialVersionUID = -3904780616247094815L;
@Override
public void notify(EventListenerExecution execution) throws Exception {
System.out.println(">>>>SimpleListener caught event - execution="+execution.getId());
}
}
@Component("executeServiceAndWaitState")
public class ExecuteServiceAndWaitState implements ExternalActivityBehaviour {
private static final long serialVersionUID = 5989768864384356423L;
@Autowired
private EchoService echoService;
@Override
public void execute(ActivityExecution execution) throws Exception {
System.out.println(this.echoService.echo("ExecuteServiceAndWait.execute(..)"));
execution.waitForSignal();
}
@Override
public void signal(ActivityExecution execution, String signalName,
Map<String, ?> parameters) throws Exception {
System.out.println(this.echoService.echo("ExecuteServiceAndWait.signal(..)"));
}
}
When I omit the event definition from the jPDL and execute it, everything works as expected.
However, when I leave it in, I get a NullPointerException:
9/8/09 6:56:09 PM (F) Jdk14Log.debug : executing activity(start)
9/8/09 6:56:09 PM (I) Jdk14Log.info : exception while executing command org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd@2d34ab9b
java.lang.NullPointerException
at org.jbpm.pvm.internal.model.op.ExecuteEventListener.perform(ExecuteEventListener.java:81)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:637)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:597)
at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:201)
at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:65)
at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:38)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:66)
at org.rjv.ambi.kas.process.FindExecutionTest.testFindExecutionById(FindExecutionTest.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Merk op: ik gebruik de JOTM jtaTransactionmanager, ipv die van Hibernate zelf, maar ik denk dat dat er niet veel toe doet, want dan zou het voor de executeServiceAndWaitState ook niet lukken.
Het is de volgende lijn die faalt:
...
public void perform(ExecutionImpl execution) {
EventImpl event = execution.getEvent();
ObservableElementImpl observableElement = event.getObservableElement();
int eventListenerIndex = execution.getEventListenerIndex();
List<EventListenerReference> eventListenerReferences = event.getListenerReferences();
if ( (eventListenerReferences!=null)
&& (!eventListenerReferences.isEmpty())
) {
EventListenerReference eventListenerReference = eventListenerReferences.get(eventListenerIndex);
ObservableElement eventSource = execution.getEventSource();
if ((eventSource == observableElement) || (eventListenerReference.isPropagationEnabled())) {
EventListener eventListener = eventListenerReference.get();
log.trace("executing " + eventListener + " for " + event);
try {
// TODO can/should this invocation be unified with the exception handler invocation of the event notification method?
eventListener.notify(execution);
} catch (Exception e) {
log.trace("exception during action: " + e);
execution.handleException((ObservableElementImpl) observableElement, event, eventListenerReference, e, "couldn't run action " + eventListener);
}
}
// increment the event listener index
eventListenerIndex++;
execution.setEventListenerIndex(eventListenerIndex);
}
...
There's a null-eventListener. I checked this with Andries Inze and he also thinks this is a bug.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[JBoss JIRA] Created: (JBPM-2492) GetOutcomes returns an additional Outcome than what is already specified than the
by Shekhar Vemuri (JIRA)
GetOutcomes returns an additional Outcome than what is already specified than the
----------------------------------------------------------------------------------
Key: JBPM-2492
URL: https://jira.jboss.org/jira/browse/JBPM-2492
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.0.CR1
Reporter: Shekhar Vemuri
Fix For: jBPM 4.1
Description is below:
It was decided in a discussion in the forum(referenced in this issue) that we would not add the additional transition to the list of transitions that are available as part of completing a task.
Problem:
Is there a particular reason for why GetOutComes does this?
Code:
Set<String> outcomes = new HashSet<String>();
outcomes.add(Task.STATE_COMPLETED);
.. logic to add other transitions specified in the activity.
When the TaskService.getOutComes(long taskDbId) is called with a task id it returns completed as an entry in the list of Transitions that will eventually be shown to the user.
But this particular transition is not even being modeled in the process_definition.
There are other places in the code, where in if a transition/outcome name is not specified then the transition is assumed to the 'completed' and special handling is done,
Code:
if (Task.STATE_COMPLETED.equals(signalName)) {
if (outgoingTransitions.size()==1) {
transition = outgoingTransitions.get(0);
} else {
transition = activity.getDefaultOutgoingTransition();
}
}
The above snippet is from TaskActivity.
What is the reasoning behind adding this to the transitions that can be taken out of a Task node?
_________________
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[JBoss JIRA] Created: (JBPM-2538) Make a TaskQuery resuable
by Joram Barrez (JIRA)
Make a TaskQuery resuable
-------------------------
Key: JBPM-2538
URL: https://jira.jboss.org/jira/browse/JBPM-2538
Project: jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.1
Reporter: Joram Barrez
Priority: Minor
Fix For: jBPM 4.3
Queries can't be reused:
TaskQuery openTasksQuery = taskService.createTaskQuery().state(Task.STATE_OPEN);
List<Task> openTasks = openTasksQuery.list();
openTasks = openTasksQuery.list();
The first time list() is called, the HQL query that is produced is fine:
select task from org.jbpm.pvm.internal.task.TaskImpl as task where task.state = 'open'
The second time however, the query is wrong:
select task from org.jbpm.pvm.internal.task.TaskImpl as task and task.state = 'open'
This due to the fact that in AbstractQuery, a boolean is remembered for the where clause:
rotected void appendWhereClause(String whereClause, StringBuilder hql) {
if (isWhereAdded) {
hql.append(" and ");
} else {
isWhereAdded = true;
hql.append("where ");
}
hql.append(whereClause);
}
In the second call, the 'isWhereAdded' boolean is set to true (due to the first call), which leads to not using the where clause and resulting in a wrong query.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months