<!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="https://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;">
Re: Example of simple process of executing a service task in JBPM Console.
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/sumerus">Sumeru Saha</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/820913#820913">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 David - thanks for your reply. I've got this problem resolved of creating Domain specific service handlers. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>@Alvinuw - I'm not sure if you're also trying the same stuff as i was doing but below are the steps i did for getting a domain specific handler working in jBPM 5.4 & jBoss BRMS 5.3</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>1. Modify the Work definition in Guvnor</p><p>2. Upload the icon image for your new Domain specific service (for my case CallJava) into Guvnor</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>** After these 2 steps done successfully, the new Service Task icon will start appearing in your component pallete of the designer under the section Service Task</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>3. Put the jar containing custom work item handler class into jbpm-gwt-console-server.war (for jbpm 5.4) or jbpm-business-central-server.war (for jboss brms) -> WEB-INF/lib</p><p>4. Modify and <span style="background-color: #ffffff; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">added an entry in the </span><strong style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">(...)-server.war/WEB-INF/classes/META-INF/CustomWorkItemHandlers.conf </strong><span style="background-color: #ffffff; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">(like below)</span></p><p style="background-color: #ffffff; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"> [</p><p style="background-color: #ffffff; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">  "Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(), // this was existing from before</p><p style="background-color: #ffffff; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">  "CallJava": new com.sample.service.ExtendedServiceTaskHandler(ksession),</p><p style="background-color: #ffffff; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">]</p><p>5. If the drools.session.conf file is present in <span style="background-color: #ffffff; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"> </span><strong style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">(...)-server.war/WEB-INF/classes/META-INF/, </strong><strong style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">make sure it has the below line. (In BRMS, these 2 files drools.sssion.conf & CustomWorkItemhandler.conf  are not there initially, you need to create them in brms. jBPM 5.4 already had these files)</strong></p><p><strong style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><br/></strong></p><p><strong style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">drools.workItemHandlers = CustomWorkItemHandlers.conf<br/></strong></p><p>6. Include the service task in your BPMN2 flow and do proper Parameter Mapping (Data Input Assignments) to pass in Process Variables. Make sure whatever values you want to pass into the handler's "execute" method, they're already set into kcontext by executing the kcontext.setVariable("someProcessVar", someProcessVar)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Hope these help.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks</p><p>Sumeru</p><p>---</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/820913#820913">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://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>