Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Adding failureReason to Operation update #51

Closed
f11h opened this issue Nov 2, 2017 · 6 comments
Closed

Adding failureReason to Operation update #51

f11h opened this issue Nov 2, 2017 · 6 comments

Comments

@f11h
Copy link
Contributor

f11h commented Nov 2, 2017

Updating an Operation just PUT's the new status to CoT.
It would be great to be able to set a "failureReason" wich is displayed in operation audit.

@rokkbert
Copy link
Contributor

rokkbert commented Nov 2, 2017

This request seems to make a lot of sense. The SDK doesn't currently support that because here http://cumulocity.com/guides/reference/device-control/ it says for failureReason "No" in the column PUT/POST. So the question is... how is that reason supposed to reach the CoT? Maybe that is just a mistake in the documentation? We need to try it, I guess.

@f11h
Copy link
Contributor Author

f11h commented Nov 2, 2017

Have a look into Cumulocity's Postman API. There the "Fail operation" request has an failureReason attribute and it will be displayed in CoT Devicemanagement.

image

image

@rokkbert
Copy link
Contributor

rokkbert commented Nov 3, 2017

Ah, cool. We didn't try that. But if that's how it works then I would consider that a very likely feature for the next release of the SDK.

@f11h
Copy link
Contributor Author

f11h commented Nov 3, 2017

It looks like there is a generaly redesign of this part of the SDK required.
Do you know the CoT log file request feature?
Requesting log files from a device is done with an operation, too. The device uploads the log file as as binary and adds a link to the binary in operations details when it sets it to "SUCCESSFUL". I guess at the moment this is even not possible with SDK.

I've attached a screenshot of an operation with an associated binary object.
image

@rokkbert
Copy link
Contributor

rokkbert commented Nov 7, 2017

No, it's not possible. But that is only because all the extra fields are ignored from the operation. We can upgrade it to only strip the fields that are known to be invalid in the update, and just pass on all unknown fields, like failure reasons, results or log file links. That would not require any major redesigning. Can't promise when this will happen though.

jogehl added a commit to jogehl/cot-java-rest-sdk that referenced this issue Mar 9, 2018
jogehl added a commit to jogehl/cot-java-rest-sdk that referenced this issue Mar 9, 2018
jogehl added a commit to jogehl/cot-java-rest-sdk that referenced this issue Mar 9, 2018
Andyck added a commit that referenced this issue Mar 27, 2018
@Andyck
Copy link
Collaborator

Andyck commented Mar 28, 2018

This issue is fixed and released in version 1.0.4

@Andyck Andyck closed this as completed Mar 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants