-
1. Re: Setting ProcessVariable as a
kamleshkr Dec 4, 2007 5:27 AM (in response to kamleshkr)Please tell me can i use EL in Processdefinition.xml? And if yes, what will be the EL for contextInstance.getVariable("EmailAddress") ?
-
2. Re: Setting ProcessVariable as a
kamleshkr Dec 7, 2007 12:43 AM (in response to kamleshkr)Hi,
In spite of setting the 'to' attribute in the processdefinition.xml, I have found other way out.
I have tried custome mail class, but jbpm does not delegates the call to my custom mail class, rather it calls its own Mail.class only.
I have taken a normal node, and written my ActionHandler for the node. In the ActionHandler class i have written the following code...
-----------------------------------------------------------------------------------
String to = "abc@xyz.com";
String text="Success sending mail from jbpm";
String subject="Test mail from JBPM";
org.jbpm.mail.Mail mail=new org.jbpm.mail.Mail(null,null,to,subject,text);
mail.send();
-----------------------------------------------------------------------------------
And EUREKA, its working....
Now i can set the contextVariable as the 'to' attribute without using any EL.
Please tell me how advisable is this way to send mail? -
3. Re: Setting ProcessVariable as a
sonalkakode Apr 1, 2009 9:44 AM (in response to kamleshkr)I have the same problem.I want to use executionContext.getContextInstance().setVariable("EmailAddress", "abc@xyz.com");
in one of my action class.
In the mail node I want to set the to=#{??????} to that variable.
Can i do it that way?
pls help its urgent.
My problem is I have my own tables and dont want to use identity tables.I have three tables user,roles and approver.Now I have mail nodes which will send mail to user and approver accordingly.I dono whether to use swimlanes or what.
Pls help me out as soon as possible. -
4. Re: Setting ProcessVariable as a
toriton Apr 2, 2009 4:36 AM (in response to kamleshkr)hi, i use an Expression for a node mail , to specify the TO parameter, and i think it works perfectly on subject parameter too or text :) (but i don't tried yet).
This is how it is described in process definition file.
<mail-node name="mailSender" to="#{mail_address}">
It work fine for me.
The value is automatically evaluated from contex , when the workflow approach the node mail.
I hope this help.
T. -
5. Re: Setting ProcessVariable as a
toriton Apr 2, 2009 4:43 AM (in response to kamleshkr)Sorry for double post, but i want reply to Kamleshkr :), about the problem that JBPM not use is custom mail class.
ahve you configured the file jbpm.config?
where you ahve to specify the new mail class using this:
<string name='mail.class.name' value='com.xxx.xxx.MyCustomMailClass' />
if you have done :) ,i don't know how to help more. -
6. Re: Setting ProcessVariable as a
toriton Apr 2, 2009 4:44 AM (in response to kamleshkr)
... sorry ..<string name='mail.class.name' value='FastSign.mail.Mail' />