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.Personcontains methods:get/setName,get/setAge) - Add third party model jar as dependency to
Business Process Project - Add Process Variable
personof typecustom.Person - Modify default start form to take input of
NameandAge - Bind Form
DataInputSettoperson - Bind Form
DataOutputSettoperson - Update
Form data originto use idp(Input Idp_inOutput idp_out) - Update
Data Assignmentson start form AssignmentType: DataInput person is mapped top_inAssignmentType: 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.