Activiti value passing
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2012 03:31 AM
Hi friends,
I am new of activiti. i want to pass my form property value to service task
this is my form :
<extensionElements>
<activiti:formProperty id="customerName" name="customerName" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
<activiti:formProperty id="amount" name="amount" type="long" required="true" readable="true" writable="true"></activiti:formProperty>
</extensionElements>
now how can i pass value customerName and ammount in service class parameter
I am new of activiti. i want to pass my form property value to service task
this is my form :
<extensionElements>
<activiti:formProperty id="customerName" name="customerName" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
<activiti:formProperty id="amount" name="amount" type="long" required="true" readable="true" writable="true"></activiti:formProperty>
</extensionElements>
now how can i pass value customerName and ammount in service class parameter
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2012 04:10 AM
Form properties are stored as process variables. Just read them using .getVariable("blah") in your service task.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2012 04:16 AM
hi,
I want to pass this value to my bean class. and i dont have DelegateExecution in my bean class. so i must have to pass value as parameter.
I can not use .getVariable("blah") there.
I want to pass this value to my bean class. and i dont have DelegateExecution in my bean class. so i must have to pass value as parameter.
I can not use .getVariable("blah") there.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2012 04:56 AM
then use expressions and put in in as a parameter
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2012 05:02 AM
Ya i am putting this as parameter like
<serviceTask
id="createLoanRequest"
name="Create loan request" activiti:expression="${loanRequestBean.newLoanRequest(customerName,amount)}"
activiti:resultVariableName="loanRequest">
</serviceTask>
But it is showing me null pointer exception
Caused by: java.lang.NullPointerException
at org.activiti.spring.test.jpa.LoanRequestBean.newLoanRequest(LoanRequestBean.java:39)
<serviceTask
id="createLoanRequest"
name="Create loan request" activiti:expression="${loanRequestBean.newLoanRequest(customerName,amount)}"
activiti:resultVariableName="loanRequest">
</serviceTask>
But it is showing me null pointer exception
Caused by: java.lang.NullPointerException
at org.activiti.spring.test.jpa.LoanRequestBean.newLoanRequest(LoanRequestBean.java:39)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2012 04:04 AM
LoanRequestBean.java:39 –> what is on line 39? Without code I can't really guess?
I would think you want to pass the variables, right? Are those two variables actually added to the process instance first?
I would think you want to pass the variables, right? Are those two variables actually added to the process instance first?
