Worklight - Remove several documents in the JSONStore database - ibm-mobilefirst

I am developping a mobile application using Worklight and I want to remove several documents in the JSONStore database using a query.
I tried to do the following :
WL.JSONStore.get('collection').remove([{MYID: "1111"}, {MYID: "2222"}],{push: false})
.then(function(){
//Handle success
})
.fail(function(errorObject){
//Handle failure
});
Unfortunatelly, I got the error :
BAD_PARAMETER_EXPECTED_DOCUMENT_OR_ARRAY_OF_DOCUMENTS
It's weird because in the Worklight JSONStore remove function documentation, it's written :
#param doc {Document or Array of Documents or Query or _id}.
Or maybe do I have to retrieve the documents and then remove them ?
I think about doing a loop over the documents too, but I would prefer to use a "cleaner" solution because I want to know when all the documents have been successfully removed.
Thanks for your help !

That is a known bug, it has been fixed in the latest version.
Take a look at the following relevant links:
PI10959: JSONSTORE FAILS TO REMOVE ALL DOCS IN THE DOC ARRAY WHEN A DOC ARRAY IS PASSED
IBM Worklight JSONStore | Remove Document from Collection and erase it from memory

Related

how to get authenticated user data in firestore android

I have a Firestore database see the image below. I want to retrieve the doctor's info. All of these documents under "doctors" collection are from authenticated users and I have saved the documents with their IDs.
I am using this code to get the documents but it returns 0. I think the problem is authentication. Kindly help me to solve this issue.
val query = fireStoreDbRef.collection(Constants.COLLECTION_DOCTORS)
query.get().addOnSuccessListener {
Log.d("TAG", "getAllDoctors: "+it.size())
}
Security Rules I am using
It's possible to see in your screenshot that the documentIds are in italic, this indicates that the documents you were trying to access were deleted. If you were to add a new document the code you currently have for fetching documents is suppose to work normally.
As per the reason why those documents were deleted, the most probable is that they were deleted by someone else operating this Firestore, unfortunately there are no native log solutions for Firestore for you to audit that. In fact, it is recommended that you build a logging solution for your Firestore with the use of Cloud Functions, if you fell it is necessary, here is an example in a community answer for how to do that.
If this is not the case I would advise you to keep an eye out for this behaviour, and if it should happen again I would recommend you to open a Bug Report on Google's Issue Tracker so that this can be troubleshooted by Google's Engineering team

Has anyone come across issue[]?

issue[] in UiPath.
So I downloaded an extension / package from UiPath GO! named as "Jira Integrating Software". This Packages comes with several APIs to access Jira tickets.
I was working with one of these APIs called "Search by JQL". JQL is Jira Query Language comes in handy for Advance searching. The output type of this "Search by JQL" activity is issues[].
Now when I am Iterating this array it gives me an output of "UiPath.JiraSoftware.Models.Issue"
You should use a For Each activity iterating the ResultArray Array you got from the Search JQL.
The following is just pseudo code! But it should work like this. Maybe the name of the property is not IssueId. That was not completely told in the document. But this you can when you inspect it by using the debug mode:
You should also have a look on the official Jira UiPath page. This resource contains all of the concepts you will need.

Dropbox getTemporaryLinks API errors description

I received an email from Dropbox states from middle of october get temporary links api will returns an email_not_verified error in case user not verified her email address, so far so good.
I'm able to get the response body from the doc https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link
Since I'm using dropbox java sdk and I'm used to code test first, I was trying to simulate the scenario, but having the json inside the http response, I've an error parsing the json inside dbx library. So I tried changing the status code and, having 409 I got com.dropbox.core.v2.files.GetTemporaryLinkErrorException: Exception in 2/files/get_temporary_link: "other"
but it is not enough, since I need to manage the scenario.. Can someone help me understanding what I can check in the code but first of all, what is the response I've to simulate in my unit test?
Thanks in advance
The other error case indicates that it's an error that the SDK you're using does not recognize. The GetTemporaryLinkError.email_not_verified error is relatively new, so you'll need to make sure you're using a recent enough version of the SDK to be able to identify it. For the GetTemporaryLinkError.email_not_verified error, that is v3.1.0 or later of the Dropbox Java SDK. (It's best to just get the latest anyway, which is currently v3.1.1.)
If you're are using an updated version of the SDK, it's also possible you're just not setting valid JSON for the GetTemporaryLinkError.email_not_verified error case when you're trying to simulate this. You can find the valid JSON for this error case in the /2/files/get_temporary_link documentation. Make sure you copy that as shown there if you're trying to simulate this.
Lastly, to actually catch that error with the Dropbox Java SDK, you'll want to catch GetTemporaryLinkErrorException thrown by getTemporaryLink. To check for the specific case, check the GetTemporaryLinkErrorException.errorValue. The GetTemporaryLinkError.isEmailNotVerified will return true for the unverified email case.

Apple News Preview -- can't load articles

I am attempting to use News Preview to check out my apple news articles, but I keep getting the error "This document couldn't be opened. For details, see the error console...". The error console seems to be completely blank.
I have tried this with article json directly from my server and also json downloaded from iCloud's news publisher. The articles in question display fine on my test news channels in the Apple News app.
Has anyone had this issue before?
Edit: I have the latest version of XCode installed. The same result occurs when I try to load articles downloaded from Apple's documentation.
For the next person that runs into this, my problem was that my https local URLs (links and images) weren't using a valid certificate. Replacing them with http fixed the issue.
Typically this happens when the json is malformed or if incorrectly using an ANF property.

Which Rally API is used for creating defect now?

I tried all sample and getting error - It is no longer necessary to append ".js" to WSAPI resources. Please Help with example.
That is just a warning- it's not actually preventing anything from working. Can you give us some more info on how you're accessing the api? Are you writing an app? Are you using one of the REST toolkits? Are there other errors in your response?
That warning just means you can drop the .js from all of the ref urls. The proper defect creation endpoint in wsapi version 2 is this:
/slm/webservice/v2.0/defect/create