Skip to content

BXMSDOC-4192-7.18.x: Add note about API calls for process instances in KIE APIs doc. #1618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,38 @@ Example server response (JSON):
----

If you encounter request errors, review the returned error code messages and adjust your request accordingly.

ifdef::PAM,JBPM[]
.REST API requests for process instances
[NOTE]
====
For REST API requests that send complex data objects to the process instance endpoint `/server/containers/{containerId}/processes/{processId}/instances`, ensure that you include either the fully qualified class name (such as `com.myspace.Person`) or the simple class name (such as `Person`) in the request body. The class name is required for the request body to be mapped to the correct business object in {PRODUCT}. If you exclude the class name from the request, {KIE_SERVER} does not unmarshall the object to the expected type.

.Correct request body for process instance
[source,json]
----
{
"id": 4,
"lease": {
"com.myspace.restcall.LeaseModel": {
"annualRent": 109608,
"isAutoApproved": false
}
}
}
----

.Incorrect request body for process instance
[source,json]
----
{
"id": 4,
"lease": {
"annualRent": 109608,
"isAutoApproved": false
}
}
----
====
endif::[]
--
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,38 @@ Example server response (JSON):
----

If you encounter request errors, review the returned error code messages and adjust your request accordingly.

ifdef::PAM,JBPM[]
.REST API requests for process instances
[NOTE]
====
For REST API requests that send complex data objects to the process instance endpoint `/server/containers/{containerId}/processes/{processId}/instances`, ensure that you include either the fully qualified class name (such as `com.myspace.Person`) or the simple class name (such as `Person`) in the request body. The class name is required for the request body to be mapped to the correct business object in {PRODUCT}. If you exclude the class name from the request, {KIE_SERVER} does not unmarshall the object to the expected type.

.Correct request body for process instance
[source,json]
----
{
"id": 4,
"lease": {
"com.myspace.restcall.LeaseModel": {
"annualRent": 109608,
"isAutoApproved": false
}
}
}
----

.Incorrect request body for process instance
[source,json]
----
{
"id": 4,
"lease": {
"annualRent": 109608,
"isAutoApproved": false
}
}
----
====
endif::[]
--