Index: modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/repo-hi/Extract_Contexts_from_EntityRegistry_Native.xml
===================================================================
--- modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/repo-hi/Extract_Contexts_from_EntityRegistry_Native.xml	(revision 52335)
+++ modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/repo-hi/Extract_Contexts_from_EntityRegistry_Native.xml	(nonexistent)
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<RESOURCE_PROFILE>
-	<HEADER>
-		<RESOURCE_IDENTIFIER
-				value="fa0b0a7b-383d-40d5-a3ef-5605b3e62f26_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl"/>
-		<RESOURCE_TYPE value="WorkflowDSResourceType"/>
-		<RESOURCE_KIND value="WorkflowDSResources"/>
-		<RESOURCE_URI value="value3"/>
-		<DATE_OF_CREATION value="2013-03-03T11:13:51.0Z"/>
-	</HEADER>
-	<BODY>
-		<WORKFLOW_NAME>[DEPRECATED] Aggregate project contexts from EntityRegistry [Ingestion]</WORKFLOW_NAME>
-		<WORKFLOW_INFO>
-			<FIELD name="Action">Aggregate contexts</FIELD>
-			<FIELD name="Consequence IS">Ingestion</FIELD>
-			<FIELD name="Datasource class">EntityRegistry</FIELD>
-			<FIELD name="Content">project contexts</FIELD>
-		</WORKFLOW_INFO>
-		<WORKFLOW_TYPE>REPO_HI</WORKFLOW_TYPE>
-		<WORKFLOW_PRIORITY>20</WORKFLOW_PRIORITY>
-		<CONFIGURATION start="manual">
-			<NODE name="VerifyDatasource" type="VerifyDatasource" isStart="true">
-				<DESCRIPTION>Verify if DS is pending</DESCRIPTION>
-				<PARAMETERS>
-					<PARAM name="expectedInterfaceTypologyPrefixes" managedBy="system" required="false" type="string">entityregistry::projects</PARAM>
-					<PARAM name="expectedCompliancePrefixes" managedBy="system" required="false" type="string">native</PARAM>
-				</PARAMETERS>
-				<ARCS>
-					<ARC to="createMetaWf"/>
-					<ARC to="validateDs" name="validateDs"/>
-				</ARCS>
-			</NODE>
-
-			<NODE name="validateDs" type="ValidateDatasource">
-				<DESCRIPTION>Validate DS</DESCRIPTION>
-				<PARAMETERS/>
-				<ARCS>
-					<ARC to="createMetaWf"/>
-				</ARCS>
-			</NODE>
-
-			<NODE name="createMetaWf" type="RegisterMetaWf">
-				<DESCRIPTION>Create MetaWorkflow</DESCRIPTION>
-				<PARAMETERS>
-					<PARAM name="wfName" managedBy="system" required="true" type="string">Aggregate project contexts from EntityRegistry [Ingestion]</PARAM>
-				</PARAMETERS>
-				<ARCS>
-					<ARC to="updateMetaWf"/>
-				</ARCS>
-			</NODE>
-
-			<NODE name="updateMetaWf" type="UpdateMetaWf" isJoin="true">
-				<DESCRIPTION>Create MetaWorkflow</DESCRIPTION>
-				<PARAMETERS>
-					<PARAM name="beanName" managedBy="system" required="true" type="string">metaWfContextsEntityReg</PARAM>
-				</PARAMETERS>
-				<ARCS>
-					<ARC to="updateMetaWfStatus"/>
-				</ARCS>
-			</NODE>
-
-			<NODE name="updateMetaWfStatus" type="UpdateOpenaireMetaWfStatus">
-				<DESCRIPTION>Update MetaWorkflow Status</DESCRIPTION>
-				<PARAMETERS/>
-				<ARCS>
-					<ARC to="success"/>
-				</ARCS>
-			</NODE>
-		</CONFIGURATION>
-
-		<STATUS/>
-	</BODY>
-</RESOURCE_PROFILE>
Index: modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/repo-hi/DEPRECATED_Extract_Contexts_from_EntityRegistry_Native.xml
===================================================================
--- modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/repo-hi/DEPRECATED_Extract_Contexts_from_EntityRegistry_Native.xml	(nonexistent)
+++ modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/repo-hi/DEPRECATED_Extract_Contexts_from_EntityRegistry_Native.xml	(revision 52336)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RESOURCE_PROFILE>
+	<HEADER>
+		<RESOURCE_IDENTIFIER
+				value="fa0b0a7b-383d-40d5-a3ef-5605b3e62f26_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl"/>
+		<RESOURCE_TYPE value="WorkflowDSResourceType"/>
+		<RESOURCE_KIND value="WorkflowDSResources"/>
+		<RESOURCE_URI value="value3"/>
+		<DATE_OF_CREATION value="2013-03-03T11:13:51.0Z"/>
+	</HEADER>
+	<BODY>
+		<WORKFLOW_NAME>[DEPRECATED] Aggregate project contexts from EntityRegistry [Ingestion]</WORKFLOW_NAME>
+		<WORKFLOW_INFO>
+			<FIELD name="Action">Aggregate contexts</FIELD>
+			<FIELD name="Consequence IS">Ingestion</FIELD>
+			<FIELD name="Datasource class">EntityRegistry</FIELD>
+			<FIELD name="Content">project contexts</FIELD>
+		</WORKFLOW_INFO>
+		<WORKFLOW_TYPE>REPO_HI</WORKFLOW_TYPE>
+		<WORKFLOW_PRIORITY>20</WORKFLOW_PRIORITY>
+		<CONFIGURATION start="manual">
+			<NODE name="VerifyDatasource" type="VerifyDatasource" isStart="true">
+				<DESCRIPTION>Verify if DS is pending</DESCRIPTION>
+				<PARAMETERS>
+					<PARAM name="expectedInterfaceTypologyPrefixes" managedBy="system" required="false" type="string">entityregistry::projects</PARAM>
+					<PARAM name="expectedCompliancePrefixes" managedBy="system" required="false" type="string">native</PARAM>
+				</PARAMETERS>
+				<ARCS>
+					<ARC to="createMetaWf"/>
+					<ARC to="validateDs" name="validateDs"/>
+				</ARCS>
+			</NODE>
+
+			<NODE name="validateDs" type="ValidateDatasource">
+				<DESCRIPTION>Validate DS</DESCRIPTION>
+				<PARAMETERS/>
+				<ARCS>
+					<ARC to="createMetaWf"/>
+				</ARCS>
+			</NODE>
+
+			<NODE name="createMetaWf" type="RegisterMetaWf">
+				<DESCRIPTION>Create MetaWorkflow</DESCRIPTION>
+				<PARAMETERS>
+					<PARAM name="wfName" managedBy="system" required="true" type="string">Aggregate project contexts from EntityRegistry [Ingestion]</PARAM>
+				</PARAMETERS>
+				<ARCS>
+					<ARC to="updateMetaWf"/>
+				</ARCS>
+			</NODE>
+
+			<NODE name="updateMetaWf" type="UpdateMetaWf" isJoin="true">
+				<DESCRIPTION>Create MetaWorkflow</DESCRIPTION>
+				<PARAMETERS>
+					<PARAM name="beanName" managedBy="system" required="true" type="string">metaWfContextsEntityReg</PARAM>
+				</PARAMETERS>
+				<ARCS>
+					<ARC to="updateMetaWfStatus"/>
+				</ARCS>
+			</NODE>
+
+			<NODE name="updateMetaWfStatus" type="UpdateOpenaireMetaWfStatus">
+				<DESCRIPTION>Update MetaWorkflow Status</DESCRIPTION>
+				<PARAMETERS/>
+				<ARCS>
+					<ARC to="success"/>
+				</ARCS>
+			</NODE>
+		</CONFIGURATION>
+
+		<STATUS/>
+	</BODY>
+</RESOURCE_PROFILE>
Index: modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/applicationContext-repohi.xml
===================================================================
--- modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/applicationContext-repohi.xml	(revision 52335)
+++ modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/applicationContext-repohi.xml	(revision 52336)
@@ -97,7 +97,7 @@
 								<list>
 									<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree"
 									      p:name="transform"
-									      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transform.wf.st">
+									      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transformWithTDS.wf.st">
 										<property name="children">
 											<list>
 												<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree"
@@ -131,7 +131,7 @@
 								<list>
 									<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree"
 									      p:name="transform"
-									      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transform.wf.st">
+									      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transformWithTDS.wf.st">
 										<property name="children">
 											<list>
 												<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree"
@@ -179,6 +179,8 @@
 		</property>
 	</bean>
 
+	<!-- DEPRECATED -->
+	<!--
 	<bean id="metaWfContextsEntityReg" class="eu.dnetlib.msro.workflows.metawf.DatasourceMetaWorkflow"
 	      p:destroyWorkflowTemplate="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/repoBye.wf.st"
 	      scope="prototype">
@@ -188,6 +190,7 @@
 			      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/findContextsFromMDStore.wf.st"/>
 		</property>
 	</bean>
+	-->
 
 	<bean id="metaWfHostedByMapJournal" class="eu.dnetlib.msro.workflows.metawf.DatasourceMetaWorkflow"
 	      p:destroyWorkflowTemplate="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/fillhostedByDoaj/repoBye.wf.st"
Index: modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transformWithTDS.wf.st
===================================================================
--- modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transformWithTDS.wf.st	(nonexistent)
+++ modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transformWithTDS.wf.st	(revision 52336)
@@ -0,0 +1,106 @@
+<NODE name="SET_INFO" isStart="true" type="SetProviderInfo">
+	<DESCRIPTION>Set information about current provider</DESCRIPTION>
+	<PARAMETERS>
+		<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM>
+		<PARAM required="true" type="string" name="providerName" managedBy="system">$params.("dataprovider:name")$</PARAM>
+		<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM>
+	</PARAMETERS>
+	<ARCS>
+		<ARC to="selectIncrementalTransformation"/>
+    	<ARC to="obtainParams" />
+    </ARCS>
+    </NODE>
+
+<NODE name="selectIncrementalTransformation" type="IncrementalTransformation">
+    	<DESCRIPTION>Decide REFRESH/INCREMENTAL transformation</DESCRIPTION>
+    	<PARAMETERS>
+    		<PARAM required="true" type="string" name="operationType" managedBy="user" function="validValues(['REFRESH','INCREMENTAL'])"></PARAM>
+    	</PARAMETERS>
+    	<ARCS>
+    		<ARC to="fetchOriginals"/>
+    	</ARCS>
+    </NODE>
+
+<NODE name="fetchOriginals" type="FetchMDStoreRecords">
+	<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
+	<PARAMETERS>
+		<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("orig_id")$</PARAM>
+		<PARAM required="true" type="string" name="mdFormat" managedBy="system">$params.("orig_format")$</PARAM>
+		<PARAM required="true" type="string" name="eprParam" managedBy="system">orig_epr</PARAM>
+	</PARAMETERS>
+	<ARCS>
+		<ARC to="setFunderAcronym"/>
+	</ARCS>
+</NODE>
+
+<NODE name="obtainParams" type="ObtainOpenaireDataSourceParams">
+	<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
+	<PARAMETERS>
+		<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM>
+	</PARAMETERS>
+	<ARCS>
+		<ARC to="setFunderAcronym"/>
+	</ARCS>
+</NODE>
+
+<NODE name="setFunderAcronym" type="SetEnvParameter" isJoin="true">
+	<DESCRIPTION>Set funder acronym to use in transformation</DESCRIPTION>
+	<PARAMETERS>
+		<PARAM required="true" type="string" name="parameterName" managedBy="system">funderAcronym</PARAM>
+		<PARAM required="false" type="string" name="parameterValue" managedBy="user"></PARAM>
+	</PARAMETERS>
+	<ARCS>
+		<ARC to="generateRows"/>
+	</ARCS>
+</NODE>
+
+<NODE name="transform" type="Transform">
+	<DESCRIPTION>Transform original records in DB rows</DESCRIPTION>
+	<PARAMETERS>
+		<PARAM required="true" type="string" name="ruleId" managedBy="user" category="TRANSFORMATION_RULE_ID" function="listProfiles('TransformationRuleDSResourceType', '//TITLE')"></PARAM>
+		<PARAM required="true" type="string" name="inputEprParam" managedBy="system">orig_epr</PARAM>
+		<PARAM required="true" type="string" name="outputEprParam" managedBy="system">packed_row_epr</PARAM>
+	</PARAMETERS>
+	<ARCS>
+		<ARC to="cleanRows"/>
+	</ARCS>
+</NODE>
+
+<NODE name="cleanRows" type="Clean">
+	<DESCRIPTION>Clean DB rows values according to defined vocabularies</DESCRIPTION>
+	<PARAMETERS>
+		<PARAM required="true" type="string" name="ruleId" managedBy="user" category="CLEANER_RULE_ID" function="listProfiles('CleanerDSResourceType', '//CLEANER_NAME')"></PARAM>
+		<PARAM required="true" type="string" name="inputEprParam" managedBy="system">packed_row_epr</PARAM>
+		<PARAM required="true" type="string" name="outputEprParam" managedBy="system">cleaned_row_epr</PARAM>
+	</PARAMETERS>
+	<ARCS>
+		<ARC to="storeRowRecords"/>
+	</ARCS>
+</NODE>
+
+<NODE name="storeRowRecords" type="StoreMDStoreRecords">
+	<DESCRIPTION>Store mdtore records</DESCRIPTION>
+	<PARAMETERS>
+		<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("row_id")$</PARAM>
+		<PARAM required="true" type="string" name="storingType" managedBy="system">REFRESH</PARAM>
+		<PARAM required="true" type="string" name="eprParam" managedBy="system">filtered_row_epr</PARAM>
+	</PARAMETERS>
+	<ARCS>
+		<ARC to="UPDATE_INFO"/>
+	</ARCS>
+</NODE>
+
+ <NODE name="UPDATE_INFO" type="MDStoreToApiExtraField">
+	<DESCRIPTION>Update datasouce API extra fields</DESCRIPTION>
+	<PARAMETERS>
+		<PARAM required="true" type="string" name="mdId" managedBy="system">$params.("row_id")$</PARAM>
+		<PARAM required="true" type="string" name="datasourceId" managedBy="system">$params.("dataprovider:id")$</PARAM>
+		<PARAM required="true" type="string" name="datasourceInterface" managedBy="system">$params.("dataprovider:interface")$</PARAM>
+		<PARAM required="true" type="string" name="extraFieldForTotal" managedBy="system">last_aggregation_total</PARAM>
+		<PARAM required="true" type="string" name="extraFieldForDate" managedBy="system">last_aggregation_date</PARAM>
+		<PARAM required="true" type="string" name="extraFieldForMdId" managedBy="system">last_aggregation_mdId</PARAM>
+	</PARAMETERS>
+	<ARCS>
+		<ARC to="success"/>
+	</ARCS>
+</NODE>
Index: modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transform.wf.st
===================================================================
--- modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transform.wf.st	(revision 52335)
+++ modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transform.wf.st	(revision 52336)
@@ -6,15 +6,13 @@
 		<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM>
 	</PARAMETERS>
 	<ARCS>
-		<ARC to="selectIncrementalTransformation"/>
     	<ARC to="obtainParams" />
     </ARCS>
     </NODE>
-
-    <NODE name="selectIncrementalTransformation" type="IncrementalTransformation">
-    	<DESCRIPTION>Decide REFRESH/INCREMENTAL transformation</DESCRIPTION>
+ <NODE name="obtainParams" type="ObtainOpenaireDataSourceParams">
+    	<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
     	<PARAMETERS>
-    		<PARAM required="true" type="string" name="operationType" managedBy="user" function="validValues(['REFRESH','INCREMENTAL'])"></PARAM>
+    		<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM>
     	</PARAMETERS>
     	<ARCS>
     		<ARC to="fetchOriginals"/>
@@ -29,27 +27,6 @@
 		<PARAM required="true" type="string" name="eprParam" managedBy="system">orig_epr</PARAM>
 	</PARAMETERS>
 	<ARCS>
-		<ARC to="setFunderAcronym"/>
-	</ARCS>
-</NODE>
-
-<NODE name="obtainParams" type="ObtainOpenaireDataSourceParams">
-	<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
-	<PARAMETERS>
-		<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM>
-	</PARAMETERS>
-	<ARCS>
-		<ARC to="setFunderAcronym"/>
-	</ARCS>
-</NODE>
-
-<NODE name="setFunderAcronym" type="SetEnvParameter" isJoin="true">
-	<DESCRIPTION>Set funder acronym to use in transformation</DESCRIPTION>
-	<PARAMETERS>
-		<PARAM required="true" type="string" name="parameterName" managedBy="system">funderAcronym</PARAM>
-		<PARAM required="false" type="string" name="parameterValue" managedBy="user"></PARAM>
-	</PARAMETERS>
-	<ARCS>
 		<ARC to="generateRows"/>
 	</ARCS>
 </NODE>
