[
https://issues.jboss.org/browse/WFCORE-2786?page=com.atlassian.jira.plugi...
]
Filippe Spolti edited comment on WFCORE-2786 at 5/11/17 5:01 PM:
-----------------------------------------------------------------
Edited as Brian's suggestions on the PR.
was (Author: filippe.spolti):
I did a little modification and got this result:
{code:title=Request}
{
"address": [],
"json.pretty": 1,
"operation": "composite",
"rename-steps": "true",
"steps": [
{
"name": "server-state",
"operation": "read-attribute"
},
{
"address": {
"deployment": "*"
},
"name": "deployment-status",
"operation": "read-attribute"
},
{
"address": {
"core-service": "management"
},
"name": "read-boot-errors",
"operation": "read-boot-errors"
}
]
}
{code}
{code:title=response}
{
"outcome": "success",
"result": {
"deployment-status": {
"outcome": "success",
"result": []
},
"read-boot-errors": {
"outcome": "success",
"result": []
},
"server-state": {
"outcome": "success",
"result": "running"
}
}
}
{code}
In this case the user can add a parameter in the request "rename-steps" to true,
if false or its absence the step-N will be used.
Also, user must define the operation name, like:
{code}
{
"address": {
"deployment": "*"
},
"name": "deployment-info",
"operation": "read-attribute"
}
{code}
If no name is set, step-N will be used.
Improve the composition operation output
----------------------------------------
Key: WFCORE-2786
URL:
https://issues.jboss.org/browse/WFCORE-2786
Project: WildFly Core
Issue Type: Enhancement
Components: Domain Management
Reporter: Filippe Spolti
When you perform a composite operations with many commands the output will be enumerated
in steps, like: step-1, step-2, ..., step-N.
I am not sure, but looks like the step-X correspond to the order of the commands sent in
the request payload, example:
{code:title=Payload}
{
"address": [],
"json.pretty": 1,
"operation": "composite",
"steps": [
{
"name": "server-state",
"operation": "read-attribute"
},
{
"address": {
"deployment": "*"
},
"name": "status",
"operation": "read-attribute"
}
]
}
{code}
{code:title=Response}
{
"outcome": "success",
"result": {
"step-1": {
"outcome": "success",
"result": "running"
},
"step-2": {
"outcome": "success",
"result": []
}
}
}
{code}
If you have something the dynamically builds the composite payload, it is very hard to
identify the output corresponding to each command in the payload.
It will be great if we can add a extra field in the response or change the steps name to
its operation name, for example:
{code}
{
"outcome": "success",
"result": {
"step-1": {
"operation-name": "server-state",
"outcome": "success",
"result": "running"
},
"step-2": {
"operation-name": "deployment-info",
"outcome": "success",
"result": []
}
}
}
{code}
Or
{code}
{
"outcome": "success",
"result": {
"server-state": {
"outcome": "success",
"result": "running"
},
"deployment-info": {
"outcome": "success",
"result": []
}
}
}
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)