-
Notifications
You must be signed in to change notification settings - Fork 181
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
BXMSDOC-4192-master: Add note about API calls for process instances in KIE APIs doc. #1606
Conversation
8004b28
to
651ef5f
Compare
.REST API requests for process instances | ||
[NOTE] | ||
==== | ||
For REST API requests to the process instance endpoint `/server/containers/{containerId}/processes/{processId}/instances`, ensure that you include the fully qualified class name 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} silently creates a null process variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both FQCN and simple name of the class would work e.g. com.myspace.Person and Person
about the null variable, isn't that it will be a map instead of expected type instead of null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mswiderski, how about this then:
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.
I have no clue about the KIE server behavior if the name is excluded. That's just what Michael said in RHPAM-1917.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add when sending complex data object to the message as it is only needed when data are of not simple types. About the null process variable maybe it would be better to state it won't be unmarshalled to expected type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mswiderski, I see. I've revised the note in my previous comment accordingly ^^. How about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Thanks @mswiderski. Also, as part of this, can you likewise update the Body parameter description in the Swagger source for this endpoint to mention the same? This way it's in both Swagger itself and in the s2m rendering when users look up the endpoints. Like this: Body | Optional map of process variables. Requires fully qualified class name or simple class name. [Update] @mswiderski, thoughts on this? Seems like a good idea, imo. |
Can one of the admins verify this PR? Comment with 'ok to test' to start the build. |
df4344e
to
a4040c4
Compare
a4040c4
to
3312957
Compare
See JIRA for details.