How to bind form data to a java object in jBPM?

Solution Unverified - Updated -

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 type custom.Person
    • Modify default start form to take input of Name and Age
    • Bind Form DataInputSet to person
    • Bind Form DataOutputSet to person
    • Update Form data origin to use id p (Input Id p_in Output id p_out)
    • Update Data Assignments on start form
    • AssignmentType: DataInput person is mapped to p_in
    • AssignmentType: DataOutput person is mapped to p_out
    • Create script task to execute java code
    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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content