Re: Broken conections after ACTIVEMQ restart

2016-09-21 Thread Jaroslaw Cwiklik
If possible can you download AMQ 5.14.0 (latest) and use that broker
instead of the one the uima-as 2.8.1 ships with? There was a nasty bug in
AMQ related to keep-alive protocol not working. I am not sure if this is
the cause but worth trying.

You can download AMQ from here: http://activemq.apache.org/download.html

-Jerry

On Wed, Sep 21, 2016 at 4:52 PM, Jaroslaw Cwiklik  wrote:

> Not sure what is causing this. I need to stage this with UIMA-AS 2.8.1. I
> am currently testing with trunk (latest) code. The most current code does
> have newer broker.
>
> I've started a broker and a sample service:
>
> $UIMA_HOME/bin/deployAsyncService.sh $UIMA_HOME/examples/deploy/as/
> Deploy_MeetingDetectorTAE.xml
>
> After the service started, I stopped the broker, waited a bit, and
> restarted the broker.
>
> With UIMA-AS from trunk I see the following in the log:
>
> 04:21:35.496 - 1: org.apache.uima.adapter.jms.activemq.
> SpringContainerDeployer.doStartListeners: INFO: Controller: Meeting
> Detector TAE Trying to Start Listener on Endpoint: 
> queue://MeetingDetectorTaeQueue
> Selector: Command=2000 OR Command=2002 Broker: tcp://localhost:61616
> 04:21:35.873 - 1: org.apache.uima.adapter.jms.activemq.
> SpringContainerDeployer.doStartListeners: INFO: Controller: Meeting
> Detector TAE Trying to Start Listener on Endpoint: 
> queue://MeetingDetectorTaeQueue
> Selector: Command=2001 Broker: tcp://localhost:61616
> 04:21:45.621 - 22: org.apache.uima.adapter.jms.activemq.
> UimaDefaultMessageListenerContainer.onException: WARNING: Service:
> Meeting Detector TAE Runtime Exception
> 04:21:45.622 - 22: org.apache.uima.adapter.jms.activemq.
> UimaDefaultMessageListenerContainer.onException: WARNING: Jms Listener
> Failed. Endpoint: MeetingDetectorTaeQueue Managed By: tcp://localhost:61616
> Reason: javax.jms.JMSException: java.io.EOFException
> 04:21:45.622 - 22: org.apache.uima.adapter.jms.activemq.
> UimaDefaultMessageListenerContainer.handleListenerSetupFailure: WARNING:
> Uima AS Service:Meeting Detector TAE Listener Unable To Connect To Broker:
> tcp://localhost:61616 Retrying Until Successful ...
> 04:21:45.638 - 27: org.apache.uima.adapter.jms.activemq.
> UimaDefaultMessageListenerContainer.onException: WARNING: Service:
> Meeting Detector TAE Runtime Exception
> 04:21:45.639 - 27: org.apache.uima.adapter.jms.activemq.
> UimaDefaultMessageListenerContainer.onException: WARNING: Jms Listener
> Failed. Endpoint: MeetingDetectorTaeQueue Managed By: tcp://localhost:61616
> Reason: javax.jms.JMSException: java.io.EOFException
> 04:21:45.639 - 27: org.apache.uima.adapter.jms.activemq.
> UimaDefaultMessageListenerContainer.handleListenerSetupFailure: WARNING:
> Uima AS Service:Meeting Detector TAE Listener Unable To Connect To Broker:
> tcp://localhost:61616 Retrying Until Successful ...
> 04:22:07.439 - 22: org.apache.uima.adapter.jms.activemq.
> UimaDefaultMessageListenerContainer.handleListenerSetupFailure: WARNING:
> Uima AS Service:Meeting Detector TAE Listener Recovered Connection to
> Broker: tcp://localhost:61616 - Ready to Process Again
> 04:22:07.454 - 27: org.apache.uima.adapter.jms.activemq.
> UimaDefaultMessageListenerContainer.handleListenerSetupFailure: WARNING:
> Uima AS Service:Meeting Detector TAE Listener Recovered Connection to
> Broker: tcp://localhost:61616 - Ready to Process Again
>
>
> I will repeat the above test with v 2.8.1
>
> -Jerry
>
>
> On Wed, Sep 21, 2016 at 4:34 PM, nelson rivera 
> wrote:
>
>> I'm using UIMA-AS 2.8.1, any idea that what happen?
>>
>> 2016-09-21 16:09 GMT-04:00, Jaroslaw Cwiklik :
>> > Which version of UIMA-AS are you using?
>> >
>> > -Jerry
>> >
>> > On Wed, Sep 21, 2016 at 3:42 PM, nelson rivera <
>> nelsonriver...@gmail.com>
>> > wrote:
>> >
>> >> When start ActiveMQ and deploys an annotator as service, processing is
>> >> executed correctly, but  when the broker is stopped and subsequently
>> >> restarted. UIMA-AS log show the lines below  and after this the api
>> >> client uima-as is not notified in the listener when a cas is
>> >> processed, any more.
>> >> can help me?:
>> >>
>> >> 02:08:25.570 - 14:
>> >> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> >> ainer.onException:
>> >> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
>> >> 02:08:25.570 - 14:
>> >> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> >> ainer.onException:
>> >> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
>> >> Managed By: tcp://localhost:61616 Reason: javax.jms.JMSException:
>> >> java.io.EOFException
>> >> 02:08:25.570 - 14:
>> >> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListe
>> nerContainer.
>> >> handleListenerSetupFailure:
>> >> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
>> >> Unable To Connect To Broker: tcp://localhost:61616 Retrying ...
>> >> QueueFailure: ADVERTENCIA: Jms Listener Failed. Endpoint:
>> >> temp-queue://ID:localhost-H81-M1-33610-1474481197190-1

Re: Broken conections after ACTIVEMQ restart

2016-09-21 Thread Jaroslaw Cwiklik
Not sure what is causing this. I need to stage this with UIMA-AS 2.8.1. I
am currently testing with trunk (latest) code. The most current code does
have newer broker.

I've started a broker and a sample service:

$UIMA_HOME/bin/deployAsyncService.sh
$UIMA_HOME/examples/deploy/as/Deploy_MeetingDetectorTAE.xml

After the service started, I stopped the broker, waited a bit, and
restarted the broker.

With UIMA-AS from trunk I see the following in the log:

04:21:35.496 - 1:
org.apache.uima.adapter.jms.activemq.SpringContainerDeployer.doStartListeners:
INFO: Controller: Meeting Detector TAE Trying to Start Listener on
Endpoint: queue://MeetingDetectorTaeQueue Selector: Command=2000 OR
Command=2002 Broker: tcp://localhost:61616
04:21:35.873 - 1:
org.apache.uima.adapter.jms.activemq.SpringContainerDeployer.doStartListeners:
INFO: Controller: Meeting Detector TAE Trying to Start Listener on
Endpoint: queue://MeetingDetectorTaeQueue Selector: Command=2001 Broker:
tcp://localhost:61616
04:21:45.621 - 22:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
WARNING: Service: Meeting Detector TAE Runtime Exception
04:21:45.622 - 22:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
WARNING: Jms Listener Failed. Endpoint: MeetingDetectorTaeQueue Managed By:
tcp://localhost:61616 Reason: javax.jms.JMSException: java.io.EOFException
04:21:45.622 - 22:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.handleListenerSetupFailure:
WARNING: Uima AS Service:Meeting Detector TAE Listener Unable To Connect To
Broker: tcp://localhost:61616 Retrying Until Successful ...
04:21:45.638 - 27:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
WARNING: Service: Meeting Detector TAE Runtime Exception
04:21:45.639 - 27:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
WARNING: Jms Listener Failed. Endpoint: MeetingDetectorTaeQueue Managed By:
tcp://localhost:61616 Reason: javax.jms.JMSException: java.io.EOFException
04:21:45.639 - 27:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.handleListenerSetupFailure:
WARNING: Uima AS Service:Meeting Detector TAE Listener Unable To Connect To
Broker: tcp://localhost:61616 Retrying Until Successful ...
04:22:07.439 - 22:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.handleListenerSetupFailure:
WARNING: Uima AS Service:Meeting Detector TAE Listener Recovered Connection
to Broker: tcp://localhost:61616 - Ready to Process Again
04:22:07.454 - 27:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.handleListenerSetupFailure:
WARNING: Uima AS Service:Meeting Detector TAE Listener Recovered Connection
to Broker: tcp://localhost:61616 - Ready to Process Again


I will repeat the above test with v 2.8.1

-Jerry


On Wed, Sep 21, 2016 at 4:34 PM, nelson rivera 
wrote:

> I'm using UIMA-AS 2.8.1, any idea that what happen?
>
> 2016-09-21 16:09 GMT-04:00, Jaroslaw Cwiklik :
> > Which version of UIMA-AS are you using?
> >
> > -Jerry
> >
> > On Wed, Sep 21, 2016 at 3:42 PM, nelson rivera  >
> > wrote:
> >
> >> When start ActiveMQ and deploys an annotator as service, processing is
> >> executed correctly, but  when the broker is stopped and subsequently
> >> restarted. UIMA-AS log show the lines below  and after this the api
> >> client uima-as is not notified in the listener when a cas is
> >> processed, any more.
> >> can help me?:
> >>
> >> 02:08:25.570 - 14:
> >> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> >> ainer.onException:
> >> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
> >> 02:08:25.570 - 14:
> >> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> >> ainer.onException:
> >> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
> >> Managed By: tcp://localhost:61616 Reason: javax.jms.JMSException:
> >> java.io.EOFException
> >> 02:08:25.570 - 14:
> >> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.
> >> handleListenerSetupFailure:
> >> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
> >> Unable To Connect To Broker: tcp://localhost:61616 Retrying ...
> >> QueueFailure: ADVERTENCIA: Jms Listener Failed. Endpoint:
> >> temp-queue://ID:localhost-H81-M1-33610-1474481197190-1:1:1 Managed By:
> >> tcp://localhost:61616 Reason: javax.jms.JMSException:
> >> java.io.EOFException
> >> 02:09:02.222 - 14:
> >> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.
> >> handleListenerSetupFailure:
> >> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
> >> Established Connection to Broker: tcp://localhost:61616
> >>
> >> 02:09:02.317 - 14:
> >> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> >> ainer.onException:
> >> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
> >> 02:0

Re: Broken conections after ACTIVEMQ restart

2016-09-21 Thread nelson rivera
I'm using UIMA-AS 2.8.1, any idea that what happen?

2016-09-21 16:09 GMT-04:00, Jaroslaw Cwiklik :
> Which version of UIMA-AS are you using?
>
> -Jerry
>
> On Wed, Sep 21, 2016 at 3:42 PM, nelson rivera 
> wrote:
>
>> When start ActiveMQ and deploys an annotator as service, processing is
>> executed correctly, but  when the broker is stopped and subsequently
>> restarted. UIMA-AS log show the lines below  and after this the api
>> client uima-as is not notified in the listener when a cas is
>> processed, any more.
>> can help me?:
>>
>> 02:08:25.570 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
>> 02:08:25.570 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
>> Managed By: tcp://localhost:61616 Reason: javax.jms.JMSException:
>> java.io.EOFException
>> 02:08:25.570 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.
>> handleListenerSetupFailure:
>> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
>> Unable To Connect To Broker: tcp://localhost:61616 Retrying ...
>> QueueFailure: ADVERTENCIA: Jms Listener Failed. Endpoint:
>> temp-queue://ID:localhost-H81-M1-33610-1474481197190-1:1:1 Managed By:
>> tcp://localhost:61616 Reason: javax.jms.JMSException:
>> java.io.EOFException
>> 02:09:02.222 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.
>> handleListenerSetupFailure:
>> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
>> Established Connection to Broker: tcp://localhost:61616
>>
>> 02:09:02.317 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
>> 02:09:02.317 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
>> Managed By: tcp://localhost:61616 Reason:
>> org.apache.activemq.ConnectionClosedException: The connection is
>> already closed02:09:02.356 - 15:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
>> 02:09:02.357 - 15:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
>> Managed By: tcp://localhost:61616 Reason:
>> javax.jms.IllegalStateException: The Consumer is closed.
>>
>


Re: Broken conections after ACTIVEMQ restart

2016-09-21 Thread Jaroslaw Cwiklik
Which version of UIMA-AS are you using?

-Jerry

On Wed, Sep 21, 2016 at 3:42 PM, nelson rivera 
wrote:

> When start ActiveMQ and deploys an annotator as service, processing is
> executed correctly, but  when the broker is stopped and subsequently
> restarted. UIMA-AS log show the lines below  and after this the api
> client uima-as is not notified in the listener when a cas is
> processed, any more.
> can help me?:
>
> 02:08:25.570 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
> 02:08:25.570 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
> Managed By: tcp://localhost:61616 Reason: javax.jms.JMSException:
> java.io.EOFException
> 02:08:25.570 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.
> handleListenerSetupFailure:
> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
> Unable To Connect To Broker: tcp://localhost:61616 Retrying ...
> QueueFailure: ADVERTENCIA: Jms Listener Failed. Endpoint:
> temp-queue://ID:localhost-H81-M1-33610-1474481197190-1:1:1 Managed By:
> tcp://localhost:61616 Reason: javax.jms.JMSException:
> java.io.EOFException
> 02:09:02.222 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.
> handleListenerSetupFailure:
> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
> Established Connection to Broker: tcp://localhost:61616
>
> 02:09:02.317 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
> 02:09:02.317 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
> Managed By: tcp://localhost:61616 Reason:
> org.apache.activemq.ConnectionClosedException: The connection is
> already closed02:09:02.356 - 15:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
> 02:09:02.357 - 15:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
> Managed By: tcp://localhost:61616 Reason:
> javax.jms.IllegalStateException: The Consumer is closed.
>


Broken conections after ACTIVEMQ restart

2016-09-21 Thread nelson rivera
When start ActiveMQ and deploys an annotator as service, processing is
executed correctly, but  when the broker is stopped and subsequently
restarted. UIMA-AS log show the lines below  and after this the api
client uima-as is not notified in the listener when a cas is
processed, any more.
can help me?:

02:08:25.570 - 14:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
02:08:25.570 - 14:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
Managed By: tcp://localhost:61616 Reason: javax.jms.JMSException:
java.io.EOFException
02:08:25.570 - 14:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.handleListenerSetupFailure:
ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
Unable To Connect To Broker: tcp://localhost:61616 Retrying ...
QueueFailure: ADVERTENCIA: Jms Listener Failed. Endpoint:
temp-queue://ID:localhost-H81-M1-33610-1474481197190-1:1:1 Managed By:
tcp://localhost:61616 Reason: javax.jms.JMSException:
java.io.EOFException
02:09:02.222 - 14:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.handleListenerSetupFailure:
ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
Established Connection to Broker: tcp://localhost:61616

02:09:02.317 - 14:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
02:09:02.317 - 14:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
Managed By: tcp://localhost:61616 Reason:
org.apache.activemq.ConnectionClosedException: The connection is
already closed02:09:02.356 - 15:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
02:09:02.357 - 15:
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.onException:
ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
Managed By: tcp://localhost:61616 Reason:
javax.jms.IllegalStateException: The Consumer is closed.


Re: trying to understand an example in the Ruta manual

2016-09-21 Thread Peter Klügl
Hi,


Am 20.09.2016 um 21:51 schrieb Bonnie MacKellar:
> Hi,
>
> Just getting back to this since I was off at a conference. Thanks again for
> the details. This is realy helpful. I beleive that Ruta 2.5 is not yet out,
> right?

Yes, 2.5.0 is not yet release, but it will be soon, hopefully.

>
> As convenient as this rule seems
> "(?i).*(must be (?:receiving|undergoing|using) (.*) for) (.*)" ->
> R3Dot1CurrentPurposeConstraint ("group1" = 2, "group2" = 3);
>
> I do need to be able to distinguish between group1 and group2 in a Java
> program that walks through the features. If they are both plain
> Annotations, I am assuming I would not be able to do that, so the first
> setup is probably still best.   Thanks for all your help

Just wanted to mention that you can distinguish between both since they
are in different features.

Best,

Peter

> Bonnie MacKellar
>
> On Thu, Sep 15, 2016 at 7:32 AM, Peter Klügl 
> wrote:
>
>> Hi,
>>
>>
>> Am 14.09.2016 um 22:58 schrieb Bonnie MacKellar:
>>> OK, thanks.  I played around a little bit today with my own rules
>>>
>>> DECLARE Group1;
>>> DECLARE Group2;
>>> DECLARE R3Dot1CurrentPurposeConstraint(Annotation group1, Annotation
>>> group2);
>>>
>>> BLOCK(eachEC) EC{}{
>>> "(?i).*(must be (?:receiving|undergoing|using) (.*) for) (.*)" ->
>>> R3Dot1CurrentPurposeConstraint,2=Group1, 3=Group2;
>>> "(?i).*(ongoing (.*(?:therapy|treatment).*) for) (.*)" ->
>>> R3Dot1CurrentPurposeConstraint;
>>> }
>>>
>>> I want to end up with the text marked by Group1 to be the value for the
>>> group1 feature in R3Dot1CurrentPurposeConstraint (and likewise group2),
>> but
>>> I couldn't find a way to do it in my rules above, so I added this
>>>
>>> R3Dot1CurrentPurposeConstraint {->
>>> R3Dot1CurrentPurposeConstraint.group1=Group1,
>>> R3Dot1CurrentPurposeConstraint.group2=Group2};
>>>
>>> It appears to work on a small test case. Does that seem correct to you?
>> Is
>>> there a better way to do this, preferably right in the rules with the
>>> regular expressions?
>> Yes, this looks correct to me and it should do what you want, if there
>> is only exactly one annotation of each type (Group1 and Group2) within
>> the current R3Dot1CurrentPurposeConstraint annotation, or if only the
>> first one matters. And if the is no sequential dependency between Group1
>> and Group2, e.g., Group1 must occur before Group2. This should be the
>> case in your example.
>> I personally prefer labels more and more, especially because they become
>> even more powerful in ruta 2.5.0. Which is the best way to assign
>> features depends on the specific situation. The examples in my last mail
>> have all their advantages.
>>
>> I personally would write the rule this way (but this will work only in
>> 2.5.0):
>> c:R3Dot1CurrentPurposeConstraint{-> c.group1 = Group1, c.group2 = Group2};
>>
>> Here, the annotation R3Dot1CurrentPurposeConstraint in the action part
>> does not need to be resolved by the given type, but the annotation that
>> was matched by the type of the rule element is directly used. If there
>> are two R3Dot1CurrentPurposeConstraint annotations with the same
>> offsets, your rule would cause problems.
>>
>>
>> You can also assign the features directly in a simple regex rule, but
>> regex rules do not on given annotations at all but only on text. So if
>> you replace your rule with:
>>
>> "(?i).*(must be (?:receiving|undergoing|using) (.*) for) (.*)" ->
>> R3Dot1CurrentPurposeConstraint ("group1" = 2, "group2" = 3),
>> 2=Group1, 3=Group2;
>>
>> the two features of the created R3Dot1CurrentPurposeConstraint
>> annotation will be filled with annotations. However, these annotations
>> are of type Annotation and not Group1 and Group2. If you do not care
>> about the actual type of the annotation, e.g., because you won't use
>> additional features. You can simple write
>>
>> "(?i).*(must be (?:receiving|undergoing|using) (.*) for) (.*)" ->
>> R3Dot1CurrentPurposeConstraint ("group1" = 2, "group2" = 3);
>>
>> else you need an additional rule based on annotations like above.
>>
>>> Also, why did you declare your features as Annotation rather than
>> Employee
>>> and Employer?
>>> DECLARE EmplRelation (Annotation employee, Annotation employer);
>>>
>>> I imitated this, but to me  it would seem better to use
>>> DECLARE EmplRelation (Employee employee, Employer employer);
>>> I am sure there is a good reason for this, but I don't see it!
>> Nope, there was no good reason :-)
>>
>> It just did not matter for the example.
>>
>> When I explain these examples, I normally also explain the situation
>> when there are no Employer and Employee annotations but only Person
>> annotations. Then, only a subset of the rules will work, e.g., GATHER,
>> annotation variables, labels. In this case, I would not need to modify
>> the declare statement.
>>
>> Best,
>>
>> Peter
>>
>>
>>
>>> Thanks, this cleared up some amount of confusion
>>>
>>> Bonnie MacKellar
>>>
>>> On Wed, Sep 14, 2016 at 5:58