-
1. Re: Variables in MailAction
kukeltje Jul 4, 2007 5:22 AM (in response to syngolis)Correct, the toString() of ProcessInstance is not implemented.
http://docs.jboss.com/jbpm/v3/userguide/mail.html
just use #{variableName} -
2. Re: Variables in MailAction
syngolis Jul 4, 2007 5:55 AM (in response to syngolis)Ok. Then i have to use a workaround, e.g. an expression to set the variables content...
Thanks! -
3. Re: Variables in MailAction
kukeltje Jul 4, 2007 5:57 AM (in response to syngolis)uhhmm... how is that a 'workaround'?
-
4. Re: Variables in MailAction
syngolis Jul 4, 2007 6:18 AM (in response to syngolis)if i am not able to access attributes like processInstanceId or TaskId from within #{variable} I have to set it before the mail is sent, e.g.:
<event type="node-enter"> <script> <expression> TokenId = executionContext.getToken().getId(); </expression> <variable name='TokenId' access='write' mapped-name='TokenId' /> </script> </event>
After that I can use #{TokenId} in mail-text. That was the meaning of workaround. (Workaround for my problem) -
5. Re: Variables in MailAction
kukeltje Jul 4, 2007 6:52 AM (in response to syngolis)That is not what I meant and what you asked.
#{processInstance.id}, #{token.id} etc... should also work... or maybe #{task.token.id} just learn EL a little... and look at the jBPM api -
6. Re: Variables in MailAction
syngolis Jul 4, 2007 7:17 AM (in response to syngolis)This was my ambition...Sorry for my unclearly posted question....
#{processInstance.id} and #{token.id} are working!
I already tried to access the attributes in that way you did it, but with no effect... I tested with TaskInstance and there seems to be the problem...
#{taskInstance.id} or #{task.id} does not work!<mail name="M_MailAction" actors=";" to="#{receipient}" template="jbpm.mail.templates.xml"> <subject>Subject: Mail action - mail</subject> <text>Text: #{taskInstance.id}</text> </mail>
Result:Text:
-
7. Re: Variables in MailAction
kukeltje Jul 4, 2007 7:35 AM (in response to syngolis)no wonder they do not work in this case. You are not in a task node. This does work if you e.g. send a reminder mail in a tasknode. The taskInstance and task are just not set in this case.
-
8. Re: Variables in MailAction
syngolis Jul 4, 2007 7:46 AM (in response to syngolis)...oh my... %-)
Thank you for your support! -
9. Re: Variables in MailAction
kukeltje Jul 4, 2007 8:29 AM (in response to syngolis)isn't FOSS great... you pay infinitely more for less support with Bea etc...
-
10. Re: Variables in MailAction
syngolis Jul 4, 2007 9:00 AM (in response to syngolis)I suppose this comment doesn't relate to my problems with the timer-implementation under weblogic, mentioned in the other topic...0:-)
-
11. Re: Variables in MailAction
kukeltje Jul 4, 2007 9:25 AM (in response to syngolis)Hahahaha....No, since I do not have a WLS license nor refuse to install a (free?) developer version.