cancel
Showing results for 
Search instead for 
Did you mean: 

how to use content properties in worflow?

gtriani
Champ in-the-making
Champ in-the-making
I created an advanced workflow to obtain a signature control.
I want to use an handler that point to a java class that implemented DecisionHandler interface:
In a decision node, I want to read a property from the document associated with the WF and with it recover a control value in a mysql db.
how I can I read into the workflow document propertY?
I make an example:
I attach my workflow to "x" document and from a decision node I want to use "x.code" to recover a value from a predefined table in db. I use its value to make a choice in WF.

Thanks for reply
5 REPLIES 5

sasi_kumar
Champ in-the-making
Champ in-the-making
Hi,
you can set variable by using  "executionContext.setVariable("wfl_validateStatus", propertyvalue);"
and assign your document property value to propertyvalue variable.
after performing this you can use "wfl_validateStatus" variable in decision node.
I hope this will helpful for you
Regards,
Sasi

gtriani
Champ in-the-making
Champ in-the-making
Hi, thanks for your reply! Smiley Wink
I have another little doubt using DecisionHandler!
I use in a Java class, that implements the decide methods, my variable from contextIstance to take a decision… I have to return a String!
This one has to be the transition name?
example:
I have this transition
<transition to="firmaElettronica" name="fatturaElettronica">

I have to return from tha handler the String "fatturaElettronica" ? Is this sufficient or I have to do something else?
Thanks

sasi_kumar
Champ in-the-making
Champ in-the-making
Hi,
You can define  conditions in decision node based on your property value.
based on the condition the transition will be called.

Regards,
Sasi.

gtriani
Champ in-the-making
Champ in-the-making
I have to use an handler beacause I need to read a variable in a Mysql DB using Hibernate. I don't think that it's possibile with AlfrescoJavaScript.

Do you know where I can found information on Handler use?
Thanks

sasi_kumar
Champ in-the-making
Champ in-the-making
You can create your own action class which extends JBPMSpringActionHandler

Regards,
sasi