[JBoss jBPM] - Re: condition expression string is restricted to 255 chars (
by jkronegg
We got the same problem while migrating from JBPM 3.0 to 3.2.
Transition conditions where previously (in 3.0) stored in the JBPM_DECISIONCONDITIONS table which had 4000 characters. As JPBM 3.2 is backward compatible, it looks into the old JBPM_DECISIONCONDITIONS to execute the condition.
The problem comes when we want to upload a new process definition with a transition with long condition, such as:
<transition name="toBeClosedOrSent" to="ToBeClosed">
| <condition>
| <![CDATA[#{ (executionContext.getContextInstance().getVariable("oldStatut").get(0).intValue()==2 &&
| executionContext.getContextInstance().getVariable("dosType").get(0).intValue()==3) ||
| executionContext.getContextInstance().getVariable("oldStatut").get(0).intValue()==3 }]]>
| </condition>
| </transition>
The transition condition is now stored into the JBPM_TRANSITION.CONDITION_ column which has 255 characters.
The quick workaround we found is to change the column width:
ALTER TABLE JBPM.JBPM_TRANSITION MODIFY (CONDITION_ VARCHAR2(4000) )
On the long term, we plan to move to Drools for such long and complex expression conditions.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150298#4150298
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150298
18 years, 1 month
[JBoss jBPM] - jbpmContext.close() save process instance automaticly
by joy_wind
I noticed that in jbpm 3.2.2, a call on jbpmContext.close() will save process instance automaticly even I dont call jbpmContext.save(processInstance) explicitly. Why ?
How can I close the jbpmContext but not save the processInstance ?
The following is my test code.
... ...
|
| JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try {
|
| GraphSession graphSession = jbpmContext.getGraphSession();
| System.out.println("test: finding process def: " + processName);
| ProcessDefinition processDefinition = graphSession
| .findLatestProcessDefinition(processName);
| System.out.println("test: found process def: " + processName
| + " . create a new instance ...");
| ProcessInstance processInstance = new ProcessInstance(
| processDefinition);
| System.out.println("new instance created: " + processName
| + " . signal to run ...");
| processInstance.signal();
| System.out.println("done signal: " + processName
| + " . save process instance ....");
| // Token token = processInstance.getRootToken();
| // token.signal();
| jbpmContext.save(processInstance);
| System.out.println("save instance OK !");
| } finally {
| jbpmContext.close();
| }
|
| ... ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150297#4150297
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150297
18 years, 1 month
[JBoss Messaging] - Re: Sending 512 kb of message Failing....
by john_jbm
My code snippet i like this
StringBuilder message = new StringBuilder();
for (int i = 0; i < 32768; i++) {
message.append("aaaaaaaaaaaaaaaa");
}
// 32768*16 == 512 kb
TextMessage mesg = null;
try {
if (session != null) {
mesg = session.createTextMessage(message);
} else {
throw new DataTransportException("Session object not found");
}
if (producer != null) {
try {
producer.send(mesg, DeliveryMode.PERSISTENT, 9, 0);
} catch (Exception e) {
System.out.println(e.getMessage());
throw new DataTransportException("Not able to send message");
}
}
System.out.println("Sending message :: " + message);
} catch (Exception e) {
System.out.println("Error In Sending Message :: " + message
+ " The error is :: " + e.getMessage());
throw new DataTransportException("Message Not Send");
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150264#4150264
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150264
18 years, 1 month