Project

General

Profile

« Previous | Next » 

Revision 52336

Funder wfs now use xslt as TDS rule for transformations

View differences:

modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/repo-hi/Extract_Contexts_from_EntityRegistry_Native.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<RESOURCE_PROFILE>
3
	<HEADER>
4
		<RESOURCE_IDENTIFIER
5
				value="fa0b0a7b-383d-40d5-a3ef-5605b3e62f26_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl"/>
6
		<RESOURCE_TYPE value="WorkflowDSResourceType"/>
7
		<RESOURCE_KIND value="WorkflowDSResources"/>
8
		<RESOURCE_URI value="value3"/>
9
		<DATE_OF_CREATION value="2013-03-03T11:13:51.0Z"/>
10
	</HEADER>
11
	<BODY>
12
		<WORKFLOW_NAME>[DEPRECATED] Aggregate project contexts from EntityRegistry [Ingestion]</WORKFLOW_NAME>
13
		<WORKFLOW_INFO>
14
			<FIELD name="Action">Aggregate contexts</FIELD>
15
			<FIELD name="Consequence IS">Ingestion</FIELD>
16
			<FIELD name="Datasource class">EntityRegistry</FIELD>
17
			<FIELD name="Content">project contexts</FIELD>
18
		</WORKFLOW_INFO>
19
		<WORKFLOW_TYPE>REPO_HI</WORKFLOW_TYPE>
20
		<WORKFLOW_PRIORITY>20</WORKFLOW_PRIORITY>
21
		<CONFIGURATION start="manual">
22
			<NODE name="VerifyDatasource" type="VerifyDatasource" isStart="true">
23
				<DESCRIPTION>Verify if DS is pending</DESCRIPTION>
24
				<PARAMETERS>
25
					<PARAM name="expectedInterfaceTypologyPrefixes" managedBy="system" required="false" type="string">entityregistry::projects</PARAM>
26
					<PARAM name="expectedCompliancePrefixes" managedBy="system" required="false" type="string">native</PARAM>
27
				</PARAMETERS>
28
				<ARCS>
29
					<ARC to="createMetaWf"/>
30
					<ARC to="validateDs" name="validateDs"/>
31
				</ARCS>
32
			</NODE>
33

  
34
			<NODE name="validateDs" type="ValidateDatasource">
35
				<DESCRIPTION>Validate DS</DESCRIPTION>
36
				<PARAMETERS/>
37
				<ARCS>
38
					<ARC to="createMetaWf"/>
39
				</ARCS>
40
			</NODE>
41

  
42
			<NODE name="createMetaWf" type="RegisterMetaWf">
43
				<DESCRIPTION>Create MetaWorkflow</DESCRIPTION>
44
				<PARAMETERS>
45
					<PARAM name="wfName" managedBy="system" required="true" type="string">Aggregate project contexts from EntityRegistry [Ingestion]</PARAM>
46
				</PARAMETERS>
47
				<ARCS>
48
					<ARC to="updateMetaWf"/>
49
				</ARCS>
50
			</NODE>
51

  
52
			<NODE name="updateMetaWf" type="UpdateMetaWf" isJoin="true">
53
				<DESCRIPTION>Create MetaWorkflow</DESCRIPTION>
54
				<PARAMETERS>
55
					<PARAM name="beanName" managedBy="system" required="true" type="string">metaWfContextsEntityReg</PARAM>
56
				</PARAMETERS>
57
				<ARCS>
58
					<ARC to="updateMetaWfStatus"/>
59
				</ARCS>
60
			</NODE>
61

  
62
			<NODE name="updateMetaWfStatus" type="UpdateOpenaireMetaWfStatus">
63
				<DESCRIPTION>Update MetaWorkflow Status</DESCRIPTION>
64
				<PARAMETERS/>
65
				<ARCS>
66
					<ARC to="success"/>
67
				</ARCS>
68
			</NODE>
69
		</CONFIGURATION>
70

  
71
		<STATUS/>
72
	</BODY>
73
</RESOURCE_PROFILE>
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/repo-hi/DEPRECATED_Extract_Contexts_from_EntityRegistry_Native.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<RESOURCE_PROFILE>
3
	<HEADER>
4
		<RESOURCE_IDENTIFIER
5
				value="fa0b0a7b-383d-40d5-a3ef-5605b3e62f26_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl"/>
6
		<RESOURCE_TYPE value="WorkflowDSResourceType"/>
7
		<RESOURCE_KIND value="WorkflowDSResources"/>
8
		<RESOURCE_URI value="value3"/>
9
		<DATE_OF_CREATION value="2013-03-03T11:13:51.0Z"/>
10
	</HEADER>
11
	<BODY>
12
		<WORKFLOW_NAME>[DEPRECATED] Aggregate project contexts from EntityRegistry [Ingestion]</WORKFLOW_NAME>
13
		<WORKFLOW_INFO>
14
			<FIELD name="Action">Aggregate contexts</FIELD>
15
			<FIELD name="Consequence IS">Ingestion</FIELD>
16
			<FIELD name="Datasource class">EntityRegistry</FIELD>
17
			<FIELD name="Content">project contexts</FIELD>
18
		</WORKFLOW_INFO>
19
		<WORKFLOW_TYPE>REPO_HI</WORKFLOW_TYPE>
20
		<WORKFLOW_PRIORITY>20</WORKFLOW_PRIORITY>
21
		<CONFIGURATION start="manual">
22
			<NODE name="VerifyDatasource" type="VerifyDatasource" isStart="true">
23
				<DESCRIPTION>Verify if DS is pending</DESCRIPTION>
24
				<PARAMETERS>
25
					<PARAM name="expectedInterfaceTypologyPrefixes" managedBy="system" required="false" type="string">entityregistry::projects</PARAM>
26
					<PARAM name="expectedCompliancePrefixes" managedBy="system" required="false" type="string">native</PARAM>
27
				</PARAMETERS>
28
				<ARCS>
29
					<ARC to="createMetaWf"/>
30
					<ARC to="validateDs" name="validateDs"/>
31
				</ARCS>
32
			</NODE>
33

  
34
			<NODE name="validateDs" type="ValidateDatasource">
35
				<DESCRIPTION>Validate DS</DESCRIPTION>
36
				<PARAMETERS/>
37
				<ARCS>
38
					<ARC to="createMetaWf"/>
39
				</ARCS>
40
			</NODE>
41

  
42
			<NODE name="createMetaWf" type="RegisterMetaWf">
43
				<DESCRIPTION>Create MetaWorkflow</DESCRIPTION>
44
				<PARAMETERS>
45
					<PARAM name="wfName" managedBy="system" required="true" type="string">Aggregate project contexts from EntityRegistry [Ingestion]</PARAM>
46
				</PARAMETERS>
47
				<ARCS>
48
					<ARC to="updateMetaWf"/>
49
				</ARCS>
50
			</NODE>
51

  
52
			<NODE name="updateMetaWf" type="UpdateMetaWf" isJoin="true">
53
				<DESCRIPTION>Create MetaWorkflow</DESCRIPTION>
54
				<PARAMETERS>
55
					<PARAM name="beanName" managedBy="system" required="true" type="string">metaWfContextsEntityReg</PARAM>
56
				</PARAMETERS>
57
				<ARCS>
58
					<ARC to="updateMetaWfStatus"/>
59
				</ARCS>
60
			</NODE>
61

  
62
			<NODE name="updateMetaWfStatus" type="UpdateOpenaireMetaWfStatus">
63
				<DESCRIPTION>Update MetaWorkflow Status</DESCRIPTION>
64
				<PARAMETERS/>
65
				<ARCS>
66
					<ARC to="success"/>
67
				</ARCS>
68
			</NODE>
69
		</CONFIGURATION>
70

  
71
		<STATUS/>
72
	</BODY>
73
</RESOURCE_PROFILE>
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/applicationContext-repohi.xml
97 97
								<list>
98 98
									<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree"
99 99
									      p:name="transform"
100
									      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transform.wf.st">
100
									      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transformWithTDS.wf.st">
101 101
										<property name="children">
102 102
											<list>
103 103
												<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree"
......
131 131
								<list>
132 132
									<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree"
133 133
									      p:name="transform"
134
									      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transform.wf.st">
134
									      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transformWithTDS.wf.st">
135 135
										<property name="children">
136 136
											<list>
137 137
												<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree"
......
179 179
		</property>
180 180
	</bean>
181 181

  
182
	<!-- DEPRECATED -->
183
	<!--
182 184
	<bean id="metaWfContextsEntityReg" class="eu.dnetlib.msro.workflows.metawf.DatasourceMetaWorkflow"
183 185
	      p:destroyWorkflowTemplate="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/repoBye.wf.st"
184 186
	      scope="prototype">
......
188 190
			      p:template="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/findContextsFromMDStore.wf.st"/>
189 191
		</property>
190 192
	</bean>
193
	-->
191 194

  
192 195
	<bean id="metaWfHostedByMapJournal" class="eu.dnetlib.msro.workflows.metawf.DatasourceMetaWorkflow"
193 196
	      p:destroyWorkflowTemplate="classpath:/eu/dnetlib/msro/openaireplus/workflows/repo-hi/fillhostedByDoaj/repoBye.wf.st"
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transformWithTDS.wf.st
1
<NODE name="SET_INFO" isStart="true" type="SetProviderInfo">
2
	<DESCRIPTION>Set information about current provider</DESCRIPTION>
3
	<PARAMETERS>
4
		<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM>
5
		<PARAM required="true" type="string" name="providerName" managedBy="system">$params.("dataprovider:name")$</PARAM>
6
		<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM>
7
	</PARAMETERS>
8
	<ARCS>
9
		<ARC to="selectIncrementalTransformation"/>
10
    	<ARC to="obtainParams" />
11
    </ARCS>
12
    </NODE>
13

  
14
<NODE name="selectIncrementalTransformation" type="IncrementalTransformation">
15
    	<DESCRIPTION>Decide REFRESH/INCREMENTAL transformation</DESCRIPTION>
16
    	<PARAMETERS>
17
    		<PARAM required="true" type="string" name="operationType" managedBy="user" function="validValues(['REFRESH','INCREMENTAL'])"></PARAM>
18
    	</PARAMETERS>
19
    	<ARCS>
20
    		<ARC to="fetchOriginals"/>
21
    	</ARCS>
22
    </NODE>
23

  
24
<NODE name="fetchOriginals" type="FetchMDStoreRecords">
25
	<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
26
	<PARAMETERS>
27
		<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("orig_id")$</PARAM>
28
		<PARAM required="true" type="string" name="mdFormat" managedBy="system">$params.("orig_format")$</PARAM>
29
		<PARAM required="true" type="string" name="eprParam" managedBy="system">orig_epr</PARAM>
30
	</PARAMETERS>
31
	<ARCS>
32
		<ARC to="setFunderAcronym"/>
33
	</ARCS>
34
</NODE>
35

  
36
<NODE name="obtainParams" type="ObtainOpenaireDataSourceParams">
37
	<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
38
	<PARAMETERS>
39
		<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM>
40
	</PARAMETERS>
41
	<ARCS>
42
		<ARC to="setFunderAcronym"/>
43
	</ARCS>
44
</NODE>
45

  
46
<NODE name="setFunderAcronym" type="SetEnvParameter" isJoin="true">
47
	<DESCRIPTION>Set funder acronym to use in transformation</DESCRIPTION>
48
	<PARAMETERS>
49
		<PARAM required="true" type="string" name="parameterName" managedBy="system">funderAcronym</PARAM>
50
		<PARAM required="false" type="string" name="parameterValue" managedBy="user"></PARAM>
51
	</PARAMETERS>
52
	<ARCS>
53
		<ARC to="generateRows"/>
54
	</ARCS>
55
</NODE>
56

  
57
<NODE name="transform" type="Transform">
58
	<DESCRIPTION>Transform original records in DB rows</DESCRIPTION>
59
	<PARAMETERS>
60
		<PARAM required="true" type="string" name="ruleId" managedBy="user" category="TRANSFORMATION_RULE_ID" function="listProfiles('TransformationRuleDSResourceType', '//TITLE')"></PARAM>
61
		<PARAM required="true" type="string" name="inputEprParam" managedBy="system">orig_epr</PARAM>
62
		<PARAM required="true" type="string" name="outputEprParam" managedBy="system">packed_row_epr</PARAM>
63
	</PARAMETERS>
64
	<ARCS>
65
		<ARC to="cleanRows"/>
66
	</ARCS>
67
</NODE>
68

  
69
<NODE name="cleanRows" type="Clean">
70
	<DESCRIPTION>Clean DB rows values according to defined vocabularies</DESCRIPTION>
71
	<PARAMETERS>
72
		<PARAM required="true" type="string" name="ruleId" managedBy="user" category="CLEANER_RULE_ID" function="listProfiles('CleanerDSResourceType', '//CLEANER_NAME')"></PARAM>
73
		<PARAM required="true" type="string" name="inputEprParam" managedBy="system">packed_row_epr</PARAM>
74
		<PARAM required="true" type="string" name="outputEprParam" managedBy="system">cleaned_row_epr</PARAM>
75
	</PARAMETERS>
76
	<ARCS>
77
		<ARC to="storeRowRecords"/>
78
	</ARCS>
79
</NODE>
80

  
81
<NODE name="storeRowRecords" type="StoreMDStoreRecords">
82
	<DESCRIPTION>Store mdtore records</DESCRIPTION>
83
	<PARAMETERS>
84
		<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("row_id")$</PARAM>
85
		<PARAM required="true" type="string" name="storingType" managedBy="system">REFRESH</PARAM>
86
		<PARAM required="true" type="string" name="eprParam" managedBy="system">filtered_row_epr</PARAM>
87
	</PARAMETERS>
88
	<ARCS>
89
		<ARC to="UPDATE_INFO"/>
90
	</ARCS>
91
</NODE>
92

  
93
 <NODE name="UPDATE_INFO" type="MDStoreToApiExtraField">
94
	<DESCRIPTION>Update datasouce API extra fields</DESCRIPTION>
95
	<PARAMETERS>
96
		<PARAM required="true" type="string" name="mdId" managedBy="system">$params.("row_id")$</PARAM>
97
		<PARAM required="true" type="string" name="datasourceId" managedBy="system">$params.("dataprovider:id")$</PARAM>
98
		<PARAM required="true" type="string" name="datasourceInterface" managedBy="system">$params.("dataprovider:interface")$</PARAM>
99
		<PARAM required="true" type="string" name="extraFieldForTotal" managedBy="system">last_aggregation_total</PARAM>
100
		<PARAM required="true" type="string" name="extraFieldForDate" managedBy="system">last_aggregation_date</PARAM>
101
		<PARAM required="true" type="string" name="extraFieldForMdId" managedBy="system">last_aggregation_mdId</PARAM>
102
	</PARAMETERS>
103
	<ARCS>
104
		<ARC to="success"/>
105
	</ARCS>
106
</NODE>
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg/transform.wf.st
6 6
		<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM>
7 7
	</PARAMETERS>
8 8
	<ARCS>
9
		<ARC to="selectIncrementalTransformation"/>
10 9
    	<ARC to="obtainParams" />
11 10
    </ARCS>
12 11
    </NODE>
13

  
14
    <NODE name="selectIncrementalTransformation" type="IncrementalTransformation">
15
    	<DESCRIPTION>Decide REFRESH/INCREMENTAL transformation</DESCRIPTION>
12
 <NODE name="obtainParams" type="ObtainOpenaireDataSourceParams">
13
    	<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
16 14
    	<PARAMETERS>
17
    		<PARAM required="true" type="string" name="operationType" managedBy="user" function="validValues(['REFRESH','INCREMENTAL'])"></PARAM>
15
    		<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM>
18 16
    	</PARAMETERS>
19 17
    	<ARCS>
20 18
    		<ARC to="fetchOriginals"/>
......
29 27
		<PARAM required="true" type="string" name="eprParam" managedBy="system">orig_epr</PARAM>
30 28
	</PARAMETERS>
31 29
	<ARCS>
32
		<ARC to="setFunderAcronym"/>
33
	</ARCS>
34
</NODE>
35

  
36
<NODE name="obtainParams" type="ObtainOpenaireDataSourceParams">
37
	<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
38
	<PARAMETERS>
39
		<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM>
40
	</PARAMETERS>
41
	<ARCS>
42
		<ARC to="setFunderAcronym"/>
43
	</ARCS>
44
</NODE>
45

  
46
<NODE name="setFunderAcronym" type="SetEnvParameter" isJoin="true">
47
	<DESCRIPTION>Set funder acronym to use in transformation</DESCRIPTION>
48
	<PARAMETERS>
49
		<PARAM required="true" type="string" name="parameterName" managedBy="system">funderAcronym</PARAM>
50
		<PARAM required="false" type="string" name="parameterValue" managedBy="user"></PARAM>
51
	</PARAMETERS>
52
	<ARCS>
53 30
		<ARC to="generateRows"/>
54 31
	</ARCS>
55 32
</NODE>

Also available in: Unified diff