How to bind form data to a java object in jBPM?
Issue
-
How to bind form data to a java object in
jBPM
? -
I have performed below steps:
- Create new
business process
- Import external jar with model object into
BPM Artifact Repository
(custom.Person
contains methods:get/setName
,get/setAge
) - Add third party model jar as dependency to
Business Process Project
- Add Process Variable
person
of typecustom.Person
- Modify default start form to take input of
Name
andAge
- Bind Form
DataInputSet
toperson
- Bind Form
DataOutputSet
toperson
- Update
Form data origin
to use idp
(Input Idp_in
Output idp_out
) - Update
Data Assignments
on start form AssignmentType
: DataInput person is mapped top_in
AssignmentType
: DataOutput person is mapped top_out
- Create script task to execute java code
- Create new
System.out.println("Person: " + person);
- Resulting output
Person: null
Environment
- Red Hat JBoss BPM Suite 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.