MVEL error in Workflow transition

Hi Everyone,

I begin in Nuxeo workflow use and I probably have a issue in my transition condition, but I don't understand where (I'm a noob also in MVEL)

In a task, I have 2 transitions, and each calls an automation chain (Tchange only the state of the circle of life).

In the first, I call a Automation Chain when a document propertie content is not empty. My condition test is : @{Document.getProperty(“CAN_courrierEntrant:DestinataireATraiter”) <>empty}

The second condition is the contrary,
@{Document.getProperty(“CAN_courrierEntrant:DestinataireATraiter”) ==empty}

I think I have a syntax error in my condition but I don't see where.

Do you have an idea ?

Thank you !!

0 votes

1 answers

155 views

ANSWER



If you want to use a conditional in a chain you can do something like:

Document > Document.FollowLifeCycleTransition:

@{
Document.lifeCycle == 'stateA' ? 'to_transition_nameA' : 
Document.lifeCycle == 'stateB' ? 'to_transition_nameB' :
Document.lifeCycle == 'stateC' ? 'to_transition_nameC'
}

Please provide screenshots / code snippets if you require more advice

0 votes