[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [jboss-user] [jBPM] - Problem with insertion of process instance
From:       Miljenko Norsic <do-not-reply () jboss ! com>
Date:       2011-09-30 16:13:08
Message-ID: 2-629611-3-90774-1317399169560.jivesbs.jivemailuser () http://community ! jboss ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Miljenko Norsic [http://community.jboss.org/people/mnorsic] created the discussion

"Problem with insertion of process instance into a knowledge session"

To view the discussion, visit: http://community.jboss.org/message/629611#629611

--------------------------------------------------------------
Hi all,

I have a small test process that uses persistency to store process and knowledge \
session data into a database.As part of my process workflow I have a Rule Task that \
pulls WorkflowProcessInstance from a knowledge session, and therefore I have to \
insert process instance into a ksession, as shown on picture:

 http://community.jboss.org/servlet/JiveServlet/showImage/2-629611-17071/sample.png  \
http://community.jboss.org/servlet/JiveServlet/downloadImage/2-629611-17071/450-276/sample.png \



Upon signalEvent(), process continues, calls rule task and runs to completion, and \
there is nothing wrong with that.

The problem is that my rule does not run:

rule "Test WorkflowProcessInstance existence" ruleflow-group "test"
       when
               $p : WorkflowProcessInstance()
       then
               System.out.println("Process instance exists!");
end


It is obvious that I'm missing WorkflowProcessInstance in a knowledge session, and \
therefore I've added it. But now I'm getting the following exception upon calling \
                UserTransaction.commit() method:
java.io.NotSerializableException: \
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl$1  at \
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)  at \
                java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
...


It seems to me it is a bug in jBPM5.1, could someone please check it?
If this is a bug, I can create a Jira issue, but since I'm a jBPM greenhorn, I'd \
rather like to check on forum first because maybe I'm missing something obvious  ;) 

I'm attaching a sample Eclipse project with both persistent and non-persistent \
scenario.

Thanks,
Miljenko
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/629611#629611]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]



[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; \
margin: 0; padding: 20px;">

<div>
	<table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: \
1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tbody>
			<tr>

				<td>

					<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" \
style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: \
6px; -webkit-border-radius: 6px;">  <tbody>
							<tr>
								<td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px \
solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; \
-moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; \
                -webkit-border-top-left-radius: 5px;">
									<h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; \
                margin: 0; display: block !important;">
									<!-- To have a header image/logo replace the name below with your img tag \
                -->
									<!-- Email clients will render the images when the message is read so any \
                image -->
									<!-- must be made available on a public server, so that all recipients can \
                load the image. -->
									<a href="http://community.jboss.org/index.jspa" style="text-decoration: \
none; color: #E1E1E1">JBoss Community</a></h1>  </td>

							</tr>
							<tr>
								<td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; \
color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; \
-moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; \
-webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: \
17px; font-weight: normal;">  Problem with insertion of process instance into a \
knowledge session </h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/mnorsic">Miljenko \
Norsic</a> in <i>jBPM</i> - <a \
href="http://community.jboss.org/message/629611#629611">View the full discussion</a> \
</span> <hr style="margin: 20px 0; border: none; background-color: #dadada; height: \
1px;">

<div class="jive-rendered-content"><p>Hi all,</p><p style="min-height: 8pt; height: \
8pt; padding: 0px;">&#160;</p><p>I have a small test process that uses persistency to \
store process and knowledge session data into a database.As part of my process \
workflow I have a Rule Task that pulls WorkflowProcessInstance from a knowledge \
session, and therefore I have to insert process instance into a ksession, as shown on \
picture:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a \
href="http://community.jboss.org/servlet/JiveServlet/showImage/2-629611-17071/sample.png"><span> \
http://community.jboss.org/servlet/JiveServlet/downloadImage/2-629611-17071/450-276/sample.png \
</span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p \
style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Upon signalEvent(), \
process continues, calls rule task and runs to completion, and there is nothing wrong \
with that.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The \
problem is that my rule does not run:</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">rule \
<font color="red">"Test WorkflowProcessInstance existence"</font> ruleflow-group \
<font color="red">"test"</font> &#160;&#160;&#160; when
&#160;&#160;&#160;&#160;&#160;&#160;&#160; $p : WorkflowProcessInstance()
&#160;&#160;&#160; then
&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(<font \
color="red">"Process instance exists!"</font>); end
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It \
is obvious that I'm missing WorkflowProcessInstance in a knowledge session, and \
therefore I've added it.</p><p>But now I'm getting the following exception upon \
calling UserTransaction.commit() method:</p><pre class="jive-pre"><code \
class="jive-code">java.io.NotSerializableException: \
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl$1  at \
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)  at \
                java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
...
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It \
seems to me it is a bug in jBPM5.1, could someone please check it?</p><p>If this is a \
bug, I can create a Jira issue, but since I'm a jBPM greenhorn, I'd rather like to \
check on forum first because maybe I'm missing something obvious <span> ;) \
</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'm \
attaching a sample Eclipse project with both persistent and non-persistent \
scenario.</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>Thanks,</p><p>Miljenko</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a \
href="http://community.jboss.org/message/629611#629611">going to Community</a></p>  \
<p style="margin: 0;">Start a new discussion in jBPM at <a \
href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
 </div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>



_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic