Invoking OPA from Visual Builder is very similar to invoking OPA from OIC3, see my post here on how to do the latter.
Here is the process I will invoke for Visual Builder -
Request payload is as follows -
So to the steps for Visual Builder invoking OPA -
Step 1 - Create an IDCS app for OPA
This is described in the post mentioned above. This will give you your client id and secret.
Step 2 - Get the required url for invoking process
The format is as follows -
So, for me - application name is OrderApprovals and process name is OrderProcess.
Step 3 - Create an App in Visual BuilderFirst thing I do is add a Business Object with the same fields as the request -
Note the pre-seeded fields - createdBy etc.
Step 4 - Define Service Connection in Visual Builder
Step 5 - Build a simple app
Step 6 - Test it
I check in Process Workspace -