Asset Validation by batch processing (> 30000 assets) - validation rules + validation scripts
Hello,
is there a way to validate (or re-validate) a lot of assets without select them manually in a list and click on validate button ?
I’ve got too much assets to validate them manually.
I would like to do it as batch processing : It should get the list of all assets and launch the validation rules on each (loop).
Any idea ? a workflow ?
Thanks a lot, François
francoisabraham
7 comments
noor
Hi Arthur, Hi Francois,
The validationResult of validate function/method will store/fetch the results of that particular workflow execution, isn’t it?
I have not yet tested the workflow I developed. But, came across the “most recent job” method, and was wondering if there is any trick there to include that Boolean flag as well…
francoisabraham
OPHi, thanks for your answer and your exemple.
I get a null when i try item.id :
item is not null, but item.id (or item.getId() ) get null as result.
What is the correct way to get the instance of the asset ‘item’ ? it is the asset on which we launch the workflow.
Regards.
arthurburkhardt
“Item” is only available when you start a workflow from an asset. If you start a workflow from somewhere else, just lookup the asset ID and use this instead.
francoisabraham
OPok thanks : now it is working.
I’ve got a new issue : got a Out of memory error when my batch size is greater than 1000 assets !! very limiting bug because i need to validate more than 30 000 assets !
WARN o.f.e.i.b.b.ScriptTaskActivityBehavior - Exception while executing scripttask1 : problem evaluating script: javax.script.ScriptException: com.collibra.common.api.exception.ApiException: java.lang.OutOfMemoryError: Metaspace [sessionHash=810ab56c1d370a21e6452871505d9032, ehcache-txid=13444]
i think it is because the EH cache size is too large for my JVM.
Do you think it is possible to ‘flush’ the EH Cache from a Collibra workflow ?
Regards
noor
Happy to see any good samaritans here sharing a sample workflow that calls validation rules on a given asset type and sends out mails to the stewards to act on the checks that failed :)… hahaha
I hope there was an OOTB workflow for this.
arthurburkhardt
Example to use the validationApi as a blocker in a workflow, displaying the failed validation rules as an error message. You can convert quite easily to a mail as you please
noor
Yes, through workflows as far as I know. I am in the process of doing the same. see what the documentation also says -