cancel
Showing results for 
Search instead for 
Did you mean: 

Business rule executed twice with inbound docs

soriaedu79
Champ in-the-making
Champ in-the-making
Hello everyone,

I want to add a behaviour to a space for making a pdf transformation and sending an email of this pdf. The actions should be executed for Incoming and Updating docs.

The scheme is:

Rule 1)  if doc!=*.pdf -> transform to pdf and copy in the same folder. Applicable to INBOUND docs
Rule 2)  if doc=*.pdf -> send an email with the doc. Applicable to INBOUND pdf docs.
Rule 3)  if doc!=*.pdf -> transform to pdf and copy in the same folder. Applicable to UPDATE docs
Rule 4)  if doc=*.pdf -> send an email with the doc. Applicable to UPDATE docs

The update part works fine but I have problems with incoming docs.

For example, when I copy a .txt file, it does the transformation and after that, Alfresco sends twice the pdf file (one as Incoming and one for updating).

If I erase rules 3 and 4, it works fine for Incoming docs but I lose the behaviour I want for Updating files.

Any help?

Thank you so much in advance.
6 REPLIES 6

jottley
Confirmed Champ
Confirmed Champ
Are there any other rules on the space?

Jared

soriaedu79
Champ in-the-making
Champ in-the-making
No Jared, there aren't.

Thank you.

cybermakoki
Champ in-the-making
Champ in-the-making
Hi,

I have updated Alfresco to version 3.3.2 and I'm having the same problem.

In spaces with a script in a rule, the script is executing twice

jottley
Confirmed Champ
Confirmed Champ
I opened a bug ticket for this. https://issues.alfresco.com/jira/browse/ALF-4846  Looks like a fixes was checked in…not sure when it will make it out to community head/Enterprise just yet

cybermakoki
Champ in-the-making
Champ in-the-making
But that's not the same problem I'm having…

I have only an inbound rule with the following actions:

- Add aspect to item
- Extract metadata
- execute script "script.js"

And the script is executing twice…

jottley
Confirmed Champ
Confirmed Champ
The problem you are having is that you have an inbound rule and and update rule.  The bug in Alfresco is that update rules are firing when an inbound action is occurring.

So when you are adding content to Alfresco, both the inbound and the update rule are firing.  Thus it appears that the rule is executed twice.