<!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 about define domain specific processes with enum parameter
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/francesco.pietrobelli">Francesco Pietrobelli</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/601207#601207">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>i'm trying to implement a domain specific task using following work definition</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>import org.drools.process.core.datatype.impl.type.EnumDataType;</p><p>[</p><p>&#160; [</p><p>&#160;&#160;&#160; "name" : "patientDataHandler",</p><p>&#160;&#160;&#160; "displayName" : "Patient data",</p><p>&#160;&#160;&#160; "parameters" : [</p><p>&#160;&#160;&#160;&#160;&#160; "Operation" : new EnumDataType("careMgmt.domainSpecificTask.PatientDataOperations"),</p><p>&#160;&#160;&#160; ],</p><p>&#160;&#160;&#160; //"icon" : "icons/notification.gif"</p><p>&#160; ]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>but when i try to modify Operation's parameter in the properties of a patientDataHandler service task in the eclipse bpmn editor i have following error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>java.lang.IllegalArgumentException: Could not find data type careMgmt.domainSpecificTask.PatientDataOperations</p><p>at org.drools.process.core.datatype.impl.type.EnumDataType.getValueMap(EnumDataType.java:105)</p><p>at org.drools.process.core.datatype.impl.type.EnumDataType.readValue(EnumDataType.java:70)</p><p>at org.drools.eclipse.flow.ruleflow.core.WorkItemWrapper.setPropertyValue(WorkItemWrapper.java:172)</p><p>at org.eclipse.gef.ui.properties.SetValueCommand.execute(SetValueCommand.java:60)</p><p>at org.eclipse.gef.commands.CompoundCommand.execute(CompoundCommand.java:111)</p><p>at org.eclipse.gef.commands.CompoundCommand.execute(CompoundCommand.java:111)</p><p>at org.eclipse.gef.commands.CommandStack.execute(CommandStack.java:197)</p><p>at org.eclipse.gef.ui.properties.UndoablePropertySheetEntry.valueChanged(UndoablePropertySheetEntry.java:147)</p><p>at org.eclipse.gef.ui.properties.UndoablePropertySheetEntry.valueChanged(UndoablePropertySheetEntry.java:124)</p><p>at org.eclipse.ui.views.properties.PropertySheetEntry.setValue(PropertySheetEntry.java:723)</p><p>at org.eclipse.ui.views.properties.PropertySheetEntry.applyEditorValue(PropertySheetEntry.java:146)</p><p>at org.eclipse.ui.views.properties.PropertySheetEntry$1.applyEditorValue(PropertySheetEntry.java:103)</p><p>at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:333)</p><p>at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)</p><p>at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)</p><p>at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)</p><p>at org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:331)</p><p>at org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelection(TextCellEditor.java:293)</p><p>at org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSelected(TextCellEditor.java:148)</p><p>at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:119)</p><p>at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)</p><p>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)</p><p>at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3552)</p><p>at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3171)</p><p>at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)</p><p>at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)</p><p>at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)</p><p>at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)</p><p>at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)</p><p>at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)</p><p>at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)</p><p>at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)</p><p>at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)</p><p>at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)</p><p>at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)</p><p>at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)</p><p>at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)</p><p>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</p><p>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</p><p>at java.lang.reflect.Method.invoke(Method.java:616)</p><p>at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)</p><p>at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)</p><p>at org.eclipse.equinox.launcher.Main.run(Main.java:1407)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>i don't know because the editor can't find PatientDataOperations, in any project files i can use it.</p><p>does anyone know how to define a work item that accept as parameter a enum?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>i have put in META-INF directory drools.rulebase.conf and patientDataHandler.conf which i attached.</p><p>i attach also the file that define enum</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks,</p><p>Francesco</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/601207#601207">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>