Project

General

Profile

1
for \$mdId in 
2
	distinct-values(
3
		for \$x in collection('/db/DRIVER/MetaWorkflowDSResources/MetaWorkflowDSResourceType')[.//DATAPROVIDER/@id='$dsId$' and .//DATAPROVIDER/@interface='$apiId$']//WORKFLOW
4
		let \$f := concat('/db/DRIVER/WorkflowDSResources/WorkflowDSResourceType/', substring-before(\$x/@id/string(), '_'))
5
		return doc(\$f)[.//PARAM[@name="extraFieldForTotal" and text() = 'last_aggregation_total']]//NODE[@type='StoreMDStoreRecords']//PARAM[@category="MDSTORE_ID"]/text()
6
	)
7
	let \$fmd := concat('/db/DRIVER/MDStoreDSResources/MDStoreDSResourceType/', substring-before(\$mdId, '_'))
8
	return doc(\$fmd)
9
	
(3-3/3)