cancel
Showing results for 
Search instead for 
Did you mean: 

Rules and custom multiple property

alberto_jimenez
Champ in-the-making
Champ in-the-making
Hi.

I am having some problems with a rule that sends a mail if a multiple custom property contains one value.

Here is my custom property configuration asociated with an aspect:

<aspect name="xyz:minicia">
   <title>Mini compañía</title>
   <properties>
      <property name="xyz:minicia">
         <title>Mini compañías</title>
         <type>d:text</type>
         <multiple>true</multiple>
         <index enabled="true">
            <atomic>true</atomic>
            <stored>false</stored>
            <tokenised>both</tokenised>
         </index>
      </property>
   </properties>
</aspect>

My rule configuration:

   When: Items are created or enter this folder + Items are updated + Items are deleted
   If all criteria are met:
      xyz:minicia contains Prueba
   Perform Action: Send mail

The problem is that when a third application tries to upload a new file to the folder, an exception is always thrown:

2014-02-24 09:53:30,772  ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-8] Exception from executeScript - redirecting to status template error: java.util.ArrayList cannot be cast to java.lang.String
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
   at org.alfresco.repo.action.evaluator.compare.TextPropertyValueComparator.compare(TextPropertyValueComparator.java:84)
   at org.alfresco.repo.action.evaluator.ComparePropertyValueEvaluator.evaluateImpl(ComparePropertyValueEvaluator.java:262)
   at org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase.evaluate(ActionConditionEvaluatorAbstractBase.java:91)
   at org.alfresco.repo.action.ActionServiceImpl.evaluateSimpleCondition(ActionServiceImpl.java:549)

2014-02-24 09:53:45,501  ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-10] Exception from executeScript - redirecting to status template error: java.util.ArrayList cannot be cast to java.lang.String
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
   at org.alfresco.repo.action.evaluator.compare.TextPropertyValueComparator.compare(TextPropertyValueComparator.java:84)
   at org.alfresco.repo.action.evaluator.ComparePropertyValueEvaluator.evaluateImpl(ComparePropertyValueEvaluator.java:262)
   at org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase.evaluate(ActionConditionEvaluatorAbstractBase.java:91)
   at org.alfresco.repo.action.ActionServiceImpl.evaluateSimpleCondition(ActionServiceImpl.java:549)



If I change the criteria to met all files, it works fine. Similar rules for custom properties that are not multiple, also works fine.   
   
Any idea?

Thanks in advance.
Alberto J.
3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
This is a bug. I can reproduce it on 4.2.e Community Edition. Please search issues.alfresco.com to see if it has already been reported, and, if not, create a bug for it, then post a link to it here so the rest of us can find it and follow it.

Thanks ahead of time.

Jeff

alberto_jimenez
Champ in-the-making
Champ in-the-making
Hello.

I have reported this bug in Alfresco Jira:

https://issues.alfresco.com/jira/browse/ALF-20863

Thanks!

Alberto J.

jpotts
World-Class Innovator
World-Class Innovator
Thanks for doing that. I've added my confirmation of the bug as well as the exception. I've also voted for the issue.

Jeff