Hi, I'm working with Visual Investigator 10.6, building Internal Entities and workfows. I need to bring data from a previous object of the same Entity.
Example: user is working on Case 100 (id=100). I need my workflow to provide user with data taken from Case 99.
Is there any Rest API that can help me with this? Any orientation will be very welcomed.
Hi Gabriel Lores,
You should be able to issue a GET document request to DataHub in order to retrieve the details about a previous case. This can also be done as a REST Service task via Workflow.
Do you know the ID of the previous case? If it is always sequential, it should be possible to issue a script task to parse the current ID of the case and subtract one.
Cheers,
Paulius.
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Thanks Paulus.
I thought it more or less in the way you suggested.
I experienced with this kind of GET request to datahub (in a Rest Service Task): //10.1.1.98/svi-datahub/documents/Solicitante?id=9 (where Solicitante is my Entity and 9 is the last object). But I couldn't find the way to make it work.
I could make it work when I used this kind of GET request: https://10.1.1.98/svi-datahub/links?_relationshipName=Solicitante&_fromEntityTypeName=Test2&_entityT...
However I need the first kind of request to solve my problem.
One more thing: what happens if my Entity does not have a sequential ID but a GUID kind of ID?
Thank you again for your help!!!
Gabriel
Hi Gabriel,
You almost got it right! It should have been //10.1.1.98/svi-datahub/documents/Solicitante/9 instead of ?id=9.
Assuming your entity is indexed for search and is not using sequential IDs, you could issue a search and sort the results by created time field. Let me know if you need more details on this approach.
Cheers,
Paulius.
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Thank you, Paulus.
Definitely, I will need more detail about the approach you suggest for not sequential ID. In this case, I will be using a not sequential ID for the Entity in general, and my problem is that within that Entity, users want a sequential ID for a report they want to print in PDF. So, they expect VI to bring the next ID number for that report. So, I have to search for the last Entity's object, look for the last number used for that report (recorded in the Entity) and add up 1. It is like to have a new ID within the Entity for this report.
Thank you again and best regards,
Gabriel
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Chartis names SAS a leader in both Model Risk Governance and Model Validation