Automation chain working with user actions not with event handlers

Almost everything is in the title :

the UpdateProperty part of my automation chain :

...
individu_bx4:nom=@{CurrentUser["lastName"]}
dc:title=@{CurrentUser["lastName"]} @{CurrentUser["firstName"]}

Using a button in the edit form, my document is updated.

Triggering it using the “about to create” event does not change anything

Triggering it using the “document created” event updates all attributes but the title.

Any idea ?

0 votes

1 answers

2726 views

ANSWER

Hi, I can't reproduce the problem on my side. It may be a hot reload issue, can you try to restart your server after the studio update? If it's still does not work, can give more infos like your system and nuxeo version, and the full automation chain? last question (sorry for this one) does the current user actually have a last and first name? Thanks Fred
06/06/2012

Thx for replying

this not a hot reload issue.

The instance is 5.4.2 HF 23 running on CentOS

The current user does have a first and last name : actually, it's working fine using a button in the edit form

the automation chain :

the user_suggestion widget is used to fill the title of the document

Login as Administrator grant permission to @{Document.getProperty("dc:title")}

Login as @{Document.getProperty("dc:title")} Update properties

individu_bx4:company=@{CurrentUser["company"]}
individu_bx4:affiliation=@{CurrentUser["affiliation"]}
individu_bx4:affectation=@{CurrentUser["affectation"]}
individu_bx4:mail=@{CurrentUser["email"]}
individu_bx4:prenom=@{CurrentUser["firstName"]}
individu_bx4:nom=@{CurrentUser["lastName"]}
dc:title=@{CurrentUser["lastName"]} @{CurrentUser["firstName"]}

all fields are correctly updated but the title

06/07/2012

what is the event you use in the event handler? Document Created?
06/08/2012

Yes, "about to create" does not work … although i ve read it should be the other way round
06/08/2012



Hi, I was able to reproduce on my side (5.4.2 and 5.5). First investigations show that the first time the document is saved, something override the title with the original value. A workaround while we are investigating the pb is to add the operation Document > Save before the “login as”.

1 votes



Fine : it's working. Thank you
06/08/2012