BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only

Strategies for undefined data structures in BAW end user interfaces

By Grant Taylor posted Mon March 02, 2026 04:09 PM

  

Introduction

Business Automation Workflow introduced the JSONObject business object type in version 24.0.1. This type allows the definition of a complex object that can contain any properties.  The data is structured at runtime, but the structure is not defined upfront by a business object model. JSONObject is often used by external services that contain extensible data models, for example. What does it mean to support JSONObjects in a user task, process launch UI, or any other end-user interface (not including Heritage Human Services)? Normally, we have a defined data structure and the user task displays or collects the data via form fields (text input, checkbox, integer field, etc). With JSONObject, the structure of the data is not defined, so how can an end user handle this data?  Two options will be presented in this blog, and their usage depends on the nature of the application.
 

1: End User Defined

With this style, your end users will determine the structure of the data.  There is a widget in the UI toolkit called JSON text area that is automatically used when a variable of type JSONObject is added to the canvas. As the name suggests, it allows the end user to enter multiple lines of text. Consider a business object defined as:
Note the extInfo property of CustomerInfo is set to JSONObject. Dragging a variable of CustomerInfo type onto the canvas will yield:
The JSON text area shares many configuration options with the base text area.  The main difference is that the JSON text area automatically validates to ensure that the text entered is a proper JSON object string:
This pattern is useful when end users are required to have control over the data, and they are capable of entering JSON strings.
 

2: User Task Author Defined

Although the application does not have a structure defined for the object, the BAW author may know what is expected or required by end users.  With this pattern, the author controls the data entered by end users while the rest of the application can continue to treat the data as a JSONObject.  Continuing the example, the end user data needs to be constrained to values such as:
{
	"yearJoined":2013,
	"referral":{
		"name": "Jane Smith",
		"active":false
		}
}

To author this pattern, private variables are created to represent each piece of data within the extInfo property:

The variables can then be added to the canvas and bound to the regular rich form controls:

To save the values to the JSONObject-typed property, a script node can be added after the coach activity in the diagram:

If content in the property is expected in an input variable to the CSHS, then a similar script can be written to extract the values to the temporary variables:

Note that the above scripts could also have been written in the pre & post scripts of the coach activity, to keep the diagram cleaner.

0 comments
16 views

Permalink