Project

General

Profile

« Previous | Next » 

Revision 58647

Workflow to set the proper date for UI/GUI consumption.

View differences:

modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/dm/update-info-date.xml
1
<RESOURCE_PROFILE>
2
	<HEADER>
3
		<RESOURCE_IDENTIFIER value="b33d8107-35a2-463f-ae80-2ae68fb7dc9d_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl"/>
4
		<RESOURCE_TYPE value="WorkflowDSResourceType"/>
5
		<RESOURCE_KIND value="WorkflowDSResources"/>
6
		<RESOURCE_URI value=""/>
7
		<DATE_OF_CREATION value="2020-05-07T13:19:38+00:00"/>
8
	</HEADER>
9
	<BODY>
10
		<WORKFLOW_NAME>Update info date</WORKFLOW_NAME>
11
		<WORKFLOW_TYPE>Communication</WORKFLOW_TYPE>
12
		<WORKFLOW_PRIORITY>30</WORKFLOW_PRIORITY>
13
		<CONFIGURATION start="manual">
14
			<NODE name="SELECT_CLAIM_DATE" type="Selection" isStart="true">
15
				<DESCRIPTION>Do we update the last claim load date?</DESCRIPTION>
16
				<PARAMETERS>
17
					<PARAM function="validValues(['YES', 'NO'])" managedBy="user" name="selection" required="true" type="string">YES</PARAM>
18
				</PARAMETERS>
19
				<ARCS>
20
					<ARC name="YES" to="UpdateClaimLoadDate"/>
21
					<ARC name="NO" to="SELECT_INFERENCE_DATE"/>
22
				</ARCS>
23
			</NODE>
24
			<NODE name="UpdateClaimLoadDate" type="ExecuteSql">
25
				<DESCRIPTION>update the last claim load date</DESCRIPTION>
26
				<PARAMETERS>
27
					<PARAM required="true" type="boolean" name="sqlInClasspath" managedBy="system">false</PARAM>
28
					<PARAM name="dbProperty" type="string" managedBy="system" required="true">dnet.openaire.db.name</PARAM>
29
					<PARAM name="sql" type="string" managedBy="user" required="true">UPDATE info SET value='YYYY-mm-dd' WHERE key='claim_load_date';</PARAM>
30
				</PARAMETERS>
31
				<ARCS>
32
					<ARC to="SELECT_INFERENCE_DATE"/>
33
				</ARCS>
34
			</NODE>
35
			<NODE name="SELECT_INFERENCE_DATE" type="Selection">
36
			<DESCRIPTION>Do we update the last inference date?</DESCRIPTION>
37
			<PARAMETERS>
38
				<PARAM function="validValues(['YES', 'NO'])" managedBy="user" name="selection" required="true" type="string">YES</PARAM>
39
			</PARAMETERS>
40
			<ARCS>
41
				<ARC name="YES" to="UpdateLastIISDate"/>
42
				<ARC name="NO" to="SELECT_OAF_LOAD_DATE"/>
43
			</ARCS>
44
		</NODE>
45
			<NODE name="UpdateLastIISDate" type="ExecuteSql">
46
				<DESCRIPTION>update the last claim load date</DESCRIPTION>
47
				<PARAMETERS>
48
					<PARAM required="true" type="boolean" name="sqlInClasspath" managedBy="system">false</PARAM>
49
					<PARAM name="dbProperty" type="string" managedBy="system" required="true">dnet.openaire.db.name</PARAM>
50
					<PARAM name="sql" type="string" managedBy="user" required="true">UPDATE info SET value='YYYY-mm-dd' WHERE key='inference_date';</PARAM>
51
				</PARAMETERS>
52
				<ARCS>
53
					<ARC to="SELECT_OAF_LOAD_DATE"/>
54
				</ARCS>
55
			</NODE>
56
			<NODE name="SELECT_OAF_LOAD_DATE" type="Selection">
57
				<DESCRIPTION>Do we update the last OAF load date?</DESCRIPTION>
58
				<PARAMETERS>
59
					<PARAM function="validValues(['YES', 'NO'])" managedBy="user" name="selection" required="true" type="string">YES</PARAM>
60
				</PARAMETERS>
61
				<ARCS>
62
					<ARC name="YES" to="UpdateOAFLoadDate"/>
63
					<ARC name="NO" to="SELECT_ODF_LOAD_DATE"/>
64
				</ARCS>
65
			</NODE>
66
			<NODE name="UpdateOAFLoadDate" type="ExecuteSql">
67
				<DESCRIPTION>update the last OAF load date</DESCRIPTION>
68
				<PARAMETERS>
69
					<PARAM required="true" type="boolean" name="sqlInClasspath" managedBy="system">false</PARAM>
70
					<PARAM name="dbProperty" type="string" managedBy="system" required="true">dnet.openaire.db.name</PARAM>
71
					<PARAM name="sql" type="string" managedBy="user" required="true">UPDATE info SET value='YYYY-mm-dd' WHERE key='oaf_load_date';</PARAM>
72
						</PARAMETERS>
73
				<ARCS>
74
					<ARC to="SELECT_ODF_LOAD_DATE"/>
75
				</ARCS>
76
			</NODE>
77
			<NODE name="SELECT_ODF_LOAD_DATE" type="Selection">
78
				<DESCRIPTION>Do we update the last ODF load date?</DESCRIPTION>
79
				<PARAMETERS>
80
					<PARAM function="validValues(['YES', 'NO'])" managedBy="user" name="selection" required="true" type="string">YES</PARAM>
81
				</PARAMETERS>
82
				<ARCS>
83
					<ARC name="YES" to="UpdateODFLoadDate"/>
84
					<ARC name="NO" to="success"/>
85
				</ARCS>
86
			</NODE>
87
			<NODE name="UpdateODFLoadDate" type="ExecuteSql">
88
				<DESCRIPTION>update the last ODF load date</DESCRIPTION>
89
				<PARAMETERS>
90
					<PARAM required="true" type="boolean" name="sqlInClasspath" managedBy="system">false</PARAM>
91
					<PARAM name="dbProperty" type="string" managedBy="system" required="true">dnet.openaire.db.name</PARAM>
92
					<PARAM name="sql" type="string" managedBy="user" required="true">UPDATE info SET value='YYYY-mm-dd' WHERE key='odf_load_date';</PARAM>
93
				</PARAMETERS>
94
				<ARCS>
95
					<ARC to="success"/>
96
				</ARCS>
97
			</NODE>
98
		</CONFIGURATION>
99
		<STATUS/>
100
	</BODY>
101
</RESOURCE_PROFILE>
102

  
103

  
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/dm/content.publishing.meta.xml
17 17
				<WORKFLOW id="546f8ba1-2ca2-4e29-86ea-c9489ab9b857_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl" name="publish content"/>
18 18
			</WORKFLOW>
19 19
			<WORKFLOW id="8794eb9a-7b05-4d3e-bec7-538d6ef1f855_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl" name="Post on VRE News feed"/>
20
			<WORKFLOW id="b33d8107-35a2-463f-ae80-2ae68fb7dc9d_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl" name="Update info date"/>
20 21
		</CONFIGURATION>
21 22
		<SCHEDULING enabled="false">
22 23
			<CRON>29 5 22 ? * *</CRON>

Also available in: Unified diff