Create Workflow that find assets
hello,
I am new to Collibra workflows and the groovy language so I am having a little trouble creating my workflow.
I am trying to get assets that have been created after a certain time. I have found to classes that could be the solution : OutputModuleApi and FindAssetsRequest.
here is the code i have written so far :
but i keep having errors and cannot find how to solve them.
Can anyone who has experience with groovy and workflows indicate me how i should go about with the classes, functions and so on?
Thank you in advance,
Williams Tom
tomwilliams1
Posted 2 years ago · Edited 1 year ago·Last reply 2 years ago
3 comments
Sean Pyle
·2 years ago · EditedHey Tom, not sure what your use case is, but you may have better luck querying the assets with Knowledge Graph API, using a tool like Postman. This will work if you're just trying to get the data about which assets were created on a certain day.
If you need to tie this to some automation in Collibra, a workflow is your best bet. I would recommend looking at activityStreamApi.getActivities(FindActivitiesRequest.builder()) to find assets that were created during a certain time period.
I'm taking a guess at what you might need, so you'll need to tweak this. I didn't test this, but I'm just trying to point you in the right direction:
You might want to consider taking some of our courses on Workflow Designer on Collibra University to get the fundamentals down if you still find some issues.
Hope this helps!
tomwilliams1
OP2 years agoHello,
Sorry for the late response, i eventually managed to get what i needed by using the instance package.
i used the findassets then filtered on the attribute createdOn all the while comparing the java date package.
thank you for your help
tomwilliams1
OP2 years agojust note there is a new line between OutputModuleApi and assets, thank you