<!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;">
    How the java task is instantaited and also how about its associated java classes.
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/FelixKJose">Felix Jose</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/551223#551223">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 am using JBPM with Spring.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My process definition contains Java tasks as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>process name="ddrRequest" xmlns="</strong><a class="jive-link-external-small" href="http://jbpm.org/4.3/jpdl"><strong>http://jbpm.org/4.3/jpdl</strong></a><strong>"&gt;<br/> &lt;start g="612,-10,48,48"&gt;<br/>&#160; &lt;transition g="-68,-6" name="analystResearch"<br/>&#160;&#160; to="analystResearch" /&gt;<br/> &lt;/start&gt;<br/>&lt;java&#160; class="com.collabera.poc.jbpm.custom.ReviewerResearchImpl" method="printHelloWorld" var="request"<br/>&#160; name="analystResearch" g="198,171,80,40"&gt;<br/> &lt;arg&gt;&lt;object expr="#{request}"/&gt;&lt;/arg&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;transition g="-68,-18" name="startDecisionHandler" to="startDecisionHandler"/&gt;<br/>&#160;&#160;&#160; &lt;/java&gt; &lt;decision g="431,94,48,48" name="startDecisionHandler"&gt;<br/>&#160; &lt;handler /&gt;<br/>&#160; &lt;transition g="991,122:-112,-18" name="to Waiting Assignment"<br/>&#160;&#160; to="Waiting Assignment" /&gt;&#160;&#160; <br/>&#160; &lt;transition g="-104,-18" name="to Being Researched" to="Being Researched" /&gt;<br/> &lt;/decision&gt;</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong> </strong>&#160;</p><p>And the java task class(com.collabera.poc.jbpm.custom.ReviewerResearchImpl) is as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>public class ReviewerResearchImpl {<br/> /**<br/>&#160; * <br/>&#160; */<br/> private static final long serialVersionUID = 1L;<br/> <br/> private RequestService requestService;<br/> <br/> public RequestService getRequestService() {<br/>&#160; return requestService;<br/> }</strong></p><p><strong> public void setRequestService(RequestService requestService) {<br/>&#160; this.requestService = requestService;<br/> }</strong></p><p><br/><strong> public ReviewerResearchImpl() {<br/> </strong></p><p><strong> }<br/> <br/> public DdrRequest printHelloWorld(Request request) {<br/>&#160; System.out.println("Region=========="+request.getRegion());<br/>&#160; request.setRegion("CHINA");<br/>&#160; //Database update<br/>&#160; requestService.saveRequest(ddrRequest)<br/>&#160; <br/>&#160; return request;</strong></p><p><strong> }<br/> </strong></p><p><strong> <br/>}</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My doubt is I am using spring also So when instantiating the&#160; <strong>com.collabera.poc.jbpm.custom.ReviewerResearchImpl</strong> class from the jbpm&#160; whether its property RequestService requestService also gets instatiated because in spring config file I have the following snippet:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>&lt;bean id="reviewerResearch" class="com.collabera.poc.jbpm.custom.ReviewerResearchImpl"&gt;<br/>&#160; <br/>&#160; &lt;property name="requestService"&gt;<br/>&#160;&#160; &lt;ref bean="requestService" /&gt;<br/>&#160; &lt;/property&gt;<br/>&lt;/bean&gt;<br/>&lt;bean id="requestService"/&gt;</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If not how can i make use of Spring to instantiate the jbpm java task class (for Eg: com.collabera.poc.jbpm.custom.ReviewerResearchImpl) and its associated classes (for eg:RequestService requestService).?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Please let me know about this as soon as possible. I have stucked in this point. PLease help......</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thank You and Regards,</p><p>Felix K Jose </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/551223#551223">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>