[jboss-jira] [JBoss JIRA] (JBRULES-3637) The "from" CE does not manage @events correctly

Mark Proctor (JIRA) jira-events at lists.jboss.org
Fri Oct 12 17:09:03 EDT 2012


    [ https://issues.jboss.org/browse/JBRULES-3637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726080#comment-12726080 ] 

Mark Proctor commented on JBRULES-3637:
---------------------------------------

There is a workaround for this, re-resolve the fact back form the WM.
{code}
rule "Check"
when
$e2 : MyEvent( id == 2 )
$b1 : MyBean( id == 99, $ev : event )
$t : MyEvent() from $ev
MyEvent( this == $t, this before $e2 )
{code}
                
> The "from" CE does not manage @events correctly
> -----------------------------------------------
>
>                 Key: JBRULES-3637
>                 URL: https://issues.jboss.org/browse/JBRULES-3637
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core (fusion)
>    Affects Versions: 5.4.0.Final
>            Reporter: Davide Sottara
>            Assignee: Edson Tirelli
>            Priority: Critical
>             Fix For: 5.5.0.CR1
>
>
> If an event type (i.e. an instance of a class marked with @role(event)) is returned by a "from" node, it is not wrapped by an EventFactHandle as expected, so e.g. any attempt to use temporal operators will fail. 
> See the test case below for an example
> The problem is in FromNode.java around line 200, where the new handles are created without passing an ObjectTypeConfiguration, leading to the default creation of a DefaultFactHandle.
> I wonder if it's possible to simply retrieve the ObjectTypeConf:
> workingMemory.getObjectTypeConfigurationRegistry().getObjectTypeConf( context.getEntryPoint(), object )
> and pass it to the handle factory method. 
> I tested it and it works for the test case below, but there may be other
> side-effects I'm not seeing.
> ---------------------------------------------------------------------------
> May be related (but not the same as) #JBRULES-2423

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list