<!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;">
Message Event (throw and catch problem)
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/krishanps">krishanps</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/643239#643239">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><div><span style="border-collapse: separate; color: #000000; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: 10pt;">Merry X-Mas, hope you all enjoyed also the holidays.</span></div><div><span style="border-collapse: separate; color: #000000; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><br/></span></div><div><span style="border-collapse: separate; color: #000000; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: 10pt;">I have short question, when I use message event to throw and catch it doesn't work, I only get as a output "Sending message: MyValue". <span style="color: #010101;">If I instead uses signal events in the way that I replace both times the line EventMessage.bpmn2 it works properly.<br/></span></span></div><div align="left"><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;"><br/></span></div><div align="left"><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;"> <messageEventDefinition messageRef="_8_Message"/> </span><span style="color: #010101; font-size: 13px;">with the line </span><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;"> <signalEventDefinition signalRef="_8_Message"/></span></div><div align="left"><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;"><br/></span></div><div align="left"><span style="color: #010101; font-size: 13px; font-family: arial,helvetica,sans-serif;">Can you please tell me what could be the problem and how I can fix it?</span></div><div align="left"> </div><div align="left"><span style="color: #010101; font-family: arial,helvetica,sans-serif;">Thank you very much<br/></span></div><div align="left"><span style="color: #010101; font-family: arial,helvetica,sans-serif;"><br/></span></div><div align="left"><span style="color: #010101; font-family: arial,helvetica,sans-serif;">My *.bpmn file:</span></div><div align="left"> </div><div align="left"> </div><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    &lt;!-- Throw a message event <del>&gt;    &lt;intermediateThrowEvent id="_7" name="Script" &gt;      &lt;dataInput id="_7_Input" /&gt;      &lt;dataInputAssociation&gt;            &lt;sourceRef&gt;x&lt;/sourceRef&gt;            &lt;targetRef&gt;_7_Input&lt;/targetRef&gt;      &lt;/dataInputAssociation&gt;      &lt;inputSet&gt;            &lt;dataInputRefs&gt;_7_Input&lt;/dataInputRefs&gt;      &lt;/inputSet&gt;      &lt;messageEventDefinition messageRef="_8_Message"/&gt;    &lt;/intermediateThrowEvent&gt;        &lt;!</del> Catch a message event --&gt;     </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><div align="left"><span style="color: #010101; font-family: arial,helvetica,sans-serif;"><br/></span></div><div align="left"> </div><div align="left"> </div><div align="left"><span style="color: #010101; font-family: arial,helvetica,sans-serif;">My *.java file:</span></div><div align="left"> </div><div align="left"><span style="font-family: arial,helvetica,sans-serif;"><span style="color: #010101;"><br/></span><p>      public static final void main(String[] args) {            try {                  // load up the knowledge base                  KnowledgeBase kbase = readKnowledgeBase();                  StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();                  KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test");                  ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new DoNothingWorkItemHandler());                  ksession.getWorkItemManager().registerWorkItemHandler("Send Task", new SendTaskHandler());                  Map&lt;String, Object&gt; params = new HashMap&lt;String, Object&gt;();                  params.put("x", "MyValue");                  params.put("y", "OtherValue");                               // start a new process instance                  ksession.startProcess("IntermediateCatchEvent", params);                                    logger.close();            } catch (Throwable t) {                  t.printStackTrace();            }      }      private static KnowledgeBase readKnowledgeBase() throws Exception {            KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();            kbuilder.add(ResourceFactory.newClassPathResource("EventMessage.bpmn2"), ResourceType.BPMN2);            return kbuilder.newKnowledgeBase();      }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></span></div><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><div class="mcePaste" id="_mcePaste" style="position: absolute; left: 0px; top: 0px; width: 849px; height: 428px; overflow: hidden; visibility: hidden;"><div align="left"><span style="widows: 2; text-indent: 0px; letter-spacing: normal; font-variant: normal; text-align: -webkit-auto; font-style: normal; font-weight: normal; line-height: normal; border-collapse: separate; orphans: 2; color: #010101; text-transform: none; font-size: 10pt; white-space: normal; font-family: Courier New; word-spacing: 0px;">If I instead replace the both times the line </span></div><div align="left"><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;"><br/></span></div><div align="left"><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;"> <messageEventDefinition messageRef="_8_Message"/></span></div><div align="left"><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;"><br/></span></div><div align="left"><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;">with the line </span><span style="color: #010101; font-family: 'Courier New'; font-size: 13px;"> <signalEventDefinition signalRef="_8_Message"/></span></div></div></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/643239#643239">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>