cancel
Showing results for 
Search instead for 
Did you mean: 

How does rule run in background?

lista
Star Contributor
Star Contributor
Hi,

I'm having the following problem:

There's a rule (set to trigger on Inbound), that takes a document, copies it to another space while adding some aspects.
In process, rule checks whether a certain space hierarchy exists, and if it doesn't, it creates it.

My problem begins when six identical documents sit in the space where the rule is active, identical in every way except the file name and content itself.
The rule will successfully go through for the first five, however, it will thrown an error for the sixth one. At this moment, I have only one document left in the space. When I reapply rule once more for the remaining one document, everything will go OK again.

This leads me to believe that rule functions OK, but that I'm missing something when it comes to rule triggering.

Does anyone have an good links, articles, or any advice?

Thanks!
1 REPLY 1

lista
Star Contributor
Star Contributor
Hi,

we had rule being applied to more then once document at the time.
Since one rule execution would create a space (to satisfy the space hierarchy), one of the remaining rules would not know about this, and would go into error because of this (duplicate child not allowed).

This helped:

<bean id="defaultAsyncThreadPool" class="org.alfresco.util.ThreadPoolExecutorFactoryBean">
        <property name="poolName">
            <value>defaultAsyncAction</value>
        </property>
        <property name="corePoolSize">
            <value>2</value>
        </property>
        <property name="maximumPoolSize">
            <value>10</value>
        </property>
</bean>

http://wiki.alfresco.com/wiki/Actions_and_Rules#Asynchronous_Action_Execution

Cheers,
Ivan.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.