Revision 32177
Added by Alessia Bardi about 10 years ago
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/stats/ValidateShadowStatsJobNode.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes.stats; |
|
2 |
|
|
3 |
import com.googlecode.sarasvati.NodeToken; |
|
4 |
|
|
5 |
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob; |
|
6 |
import eu.dnetlib.msro.workflows.nodes.BlackboardJobNode; |
|
7 |
|
|
8 |
/** |
|
9 |
* Ask the StatsManagerService to perform the content validation between the stats db and the preproduction index (using the prepublic |
|
10 |
* search service) and creates a report, which is serialized in the blackboard job parameters. |
|
11 |
* |
|
12 |
* @author alessia |
|
13 |
* |
|
14 |
*/ |
|
15 |
public class ValidateShadowStatsJobNode extends BlackboardJobNode { |
|
16 |
|
|
17 |
private String xqueryForServiceIdParam; |
|
18 |
|
|
19 |
@Override |
|
20 |
protected String getXqueryForServiceId(final NodeToken token) { |
|
21 |
return token.getEnv().getAttribute(getXqueryForServiceIdParam()); |
|
22 |
} |
|
23 |
|
|
24 |
@Override |
|
25 |
protected void prepareJob(final BlackboardJob job, final NodeToken token) throws Exception { |
|
26 |
job.setAction(StatsManagerServiceBBAction.VALIDATE_SHADOW_STATS.action()); |
|
27 |
} |
|
28 |
|
|
29 |
public String getXqueryForServiceIdParam() { |
|
30 |
return xqueryForServiceIdParam; |
|
31 |
} |
|
32 |
|
|
33 |
public void setXqueryForServiceIdParam(final String xqueryForServiceIdParam) { |
|
34 |
this.xqueryForServiceIdParam = xqueryForServiceIdParam; |
|
35 |
} |
|
36 |
|
|
37 |
} |
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/stats/FindStatsServiceJobNode.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes.stats; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import org.apache.commons.logging.Log; |
|
6 |
import org.apache.commons.logging.LogFactory; |
|
7 |
import org.springframework.beans.factory.annotation.Autowired; |
|
8 |
import org.springframework.beans.factory.annotation.Value; |
|
9 |
|
|
10 |
import com.googlecode.sarasvati.NodeToken; |
|
11 |
|
|
12 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; |
|
13 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; |
|
14 |
import eu.dnetlib.enabling.tools.ServiceLocator; |
|
15 |
import eu.dnetlib.msro.rmi.MSROException; |
|
16 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
|
17 |
|
|
18 |
public class FindStatsServiceJobNode extends SimpleJobNode { |
|
19 |
|
|
20 |
/** |
|
21 |
* logger. |
|
22 |
*/ |
|
23 |
private static final Log log = LogFactory.getLog(FindStatsServiceJobNode.class); // NOPMD by marko on 11/24/08 5:02 PM |
|
24 |
|
|
25 |
/** |
|
26 |
* ISLookupService locator. |
|
27 |
*/ |
|
28 |
@Autowired |
|
29 |
private ServiceLocator<ISLookUpService> lookupLocator; |
|
30 |
|
|
31 |
@Value(value = "${dnet.openaire.service.stats.lookup.xquery}") |
|
32 |
private String xquery; |
|
33 |
|
|
34 |
private String xqueryForServiceIdParam; |
|
35 |
|
|
36 |
/** |
|
37 |
* {@inheritDoc} |
|
38 |
* |
|
39 |
* @throws ISLookUpException |
|
40 |
* @throws MSROException |
|
41 |
* |
|
42 |
* @see com.googlecode.sarasvati.mem.MemNode#execute(com.googlecode.sarasvati.Engine, com.googlecode.sarasvati.NodeToken) |
|
43 |
*/ |
|
44 |
@Override |
|
45 |
public String execute(final NodeToken token) throws ISLookUpException, MSROException { |
|
46 |
|
|
47 |
log.info("lookup for stats service: " + getXquery()); |
|
48 |
|
|
49 |
List<String> statsServiceIds = lookupLocator.getService().quickSearchProfile(getXquery()); |
|
50 |
|
|
51 |
if (statsServiceIds.size() > 1) throw new MSROException("too many stats services: " + statsServiceIds); |
|
52 |
|
|
53 |
if (statsServiceIds.isEmpty()) return "notFound"; |
|
54 |
else { |
|
55 |
token.getEnv().setAttribute(getXqueryForServiceIdParam(), getXquery()); |
|
56 |
return "found"; |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
public String getXquery() { |
|
61 |
return xquery; |
|
62 |
} |
|
63 |
|
|
64 |
public void setXquery(final String xquery) { |
|
65 |
this.xquery = xquery; |
|
66 |
} |
|
67 |
|
|
68 |
public String getXqueryForServiceIdParam() { |
|
69 |
return xqueryForServiceIdParam; |
|
70 |
} |
|
71 |
|
|
72 |
public void setXqueryForServiceIdParam(final String xqueryForServiceIdParam) { |
|
73 |
this.xqueryForServiceIdParam = xqueryForServiceIdParam; |
|
74 |
} |
|
75 |
|
|
76 |
} |
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/stats/RefreshShadowCacheJobNode.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes.stats; |
|
2 |
|
|
3 |
import com.googlecode.sarasvati.NodeToken; |
|
4 |
|
|
5 |
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob; |
|
6 |
import eu.dnetlib.msro.workflows.nodes.BlackboardJobNode; |
|
7 |
|
|
8 |
/** |
|
9 |
* Ask the StatsManagerService to refresh the shadow portal cache according to the content of the shadow stats db. |
|
10 |
* |
|
11 |
* @author alessia |
|
12 |
* |
|
13 |
*/ |
|
14 |
public class RefreshShadowCacheJobNode extends BlackboardJobNode { |
|
15 |
|
|
16 |
private String xqueryForServiceIdParam; |
|
17 |
|
|
18 |
@Override |
|
19 |
protected String getXqueryForServiceId(final NodeToken token) { |
|
20 |
return token.getEnv().getAttribute(getXqueryForServiceIdParam()); |
|
21 |
} |
|
22 |
|
|
23 |
@Override |
|
24 |
protected void prepareJob(final BlackboardJob job, final NodeToken token) throws Exception { |
|
25 |
job.setAction(StatsManagerServiceBBAction.REFRESH_SHADOW_CACHE.action()); |
|
26 |
} |
|
27 |
|
|
28 |
public String getXqueryForServiceIdParam() { |
|
29 |
return xqueryForServiceIdParam; |
|
30 |
} |
|
31 |
|
|
32 |
public void setXqueryForServiceIdParam(final String xqueryForServiceIdParam) { |
|
33 |
this.xqueryForServiceIdParam = xqueryForServiceIdParam; |
|
34 |
} |
|
35 |
|
|
36 |
} |
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/stats/PromoteShadowStatsJobNode.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes.stats; |
|
2 |
|
|
3 |
import com.googlecode.sarasvati.NodeToken; |
|
4 |
|
|
5 |
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob; |
|
6 |
import eu.dnetlib.msro.workflows.nodes.BlackboardJobNode; |
|
7 |
|
|
8 |
/** |
|
9 |
* Ask the StatsManagerService to refresh the shadow portal cache according to the content of the shadow stats db. |
|
10 |
* |
|
11 |
* @author alessia |
|
12 |
* |
|
13 |
*/ |
|
14 |
public class PromoteShadowStatsJobNode extends BlackboardJobNode { |
|
15 |
|
|
16 |
private String xqueryForServiceIdParam; |
|
17 |
|
|
18 |
@Override |
|
19 |
protected String getXqueryForServiceId(final NodeToken token) { |
|
20 |
return token.getEnv().getAttribute(getXqueryForServiceIdParam()); |
|
21 |
} |
|
22 |
|
|
23 |
@Override |
|
24 |
protected void prepareJob(final BlackboardJob job, final NodeToken token) throws Exception { |
|
25 |
job.setAction(StatsManagerServiceBBAction.PROMOTE_SHADOW_STATS.action()); |
|
26 |
} |
|
27 |
|
|
28 |
public String getXqueryForServiceIdParam() { |
|
29 |
return xqueryForServiceIdParam; |
|
30 |
} |
|
31 |
|
|
32 |
public void setXqueryForServiceIdParam(final String xqueryForServiceIdParam) { |
|
33 |
this.xqueryForServiceIdParam = xqueryForServiceIdParam; |
|
34 |
} |
|
35 |
|
|
36 |
} |
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/stats/StatsManagerServiceBBAction.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes.stats; |
|
2 |
|
|
3 |
public enum StatsManagerServiceBBAction { |
|
4 |
PROMOTE_SHADOW_STATS { |
|
5 |
|
|
6 |
@Override |
|
7 |
public String action() { |
|
8 |
return "promoteShadow"; |
|
9 |
} |
|
10 |
}, |
|
11 |
REFRESH_SHADOW_CACHE { |
|
12 |
|
|
13 |
@Override |
|
14 |
public String action() { |
|
15 |
return "refreshCache"; |
|
16 |
} |
|
17 |
}, |
|
18 |
VALIDATE_SHADOW_STATS { |
|
19 |
|
|
20 |
@Override |
|
21 |
public String action() { |
|
22 |
return "validate"; |
|
23 |
} |
|
24 |
}; |
|
25 |
|
|
26 |
public abstract String action(); |
|
27 |
} |
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/dm/content.publishing.meta.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<RESOURCE_PROFILE> |
|
3 |
<HEADER> |
|
4 |
<RESOURCE_IDENTIFIER value="57bbdded-019e-4163-ae70-dd9f495f3f0b_TWV0YVdvcmtmbG93RFNSZXNvdXJjZXMvTWV0YVdvcmtmbG93RFNSZXNvdXJjZVR5cGU=" /> |
|
5 |
<RESOURCE_TYPE value="MetaWorkflowDSResourceType" /> |
|
6 |
<RESOURCE_KIND value="MetaWorkflowDSResources" /> |
|
7 |
<RESOURCE_URI value="" /> |
|
8 |
<DATE_OF_CREATION value="2006-05-04T18:13:51.0Z" /> |
|
9 |
</HEADER> |
|
10 |
<BODY> |
|
11 |
<METAWORKFLOW_NAME family="OpenAIRE Provision">OpenAIRE Content Publishing</METAWORKFLOW_NAME> |
|
12 |
<METAWORKFLOW_DESCRIPTION></METAWORKFLOW_DESCRIPTION> |
|
13 |
<METAWORKFLOW_SECTION>InfoSpace Provision</METAWORKFLOW_SECTION> |
|
14 |
<ADMIN_EMAIL /> |
|
15 |
<CONFIGURATION status="EXECUTABLE"> |
|
16 |
<WORKFLOW id="546f8ba1-2ca2-4e29-86ea-c9489ab9b857_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl" name="publish content"> |
|
17 |
</WORKFLOW> |
|
18 |
</CONFIGURATION> |
|
19 |
<SCHEDULING enabled="false"> |
|
20 |
<CRON>29 5 22 ? * *</CRON> |
|
21 |
<MININTERVAL>10080</MININTERVAL> |
|
22 |
</SCHEDULING> |
|
23 |
</BODY> |
|
24 |
</RESOURCE_PROFILE> |
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/dm/dm.provision.xml | ||
---|---|---|
281 | 281 |
<DESCRIPTION/> |
282 | 282 |
<PARAMETERS/> |
283 | 283 |
<ARCS> |
284 |
<ARC to="findSearchService"/>
|
|
284 |
<ARC to="validateShadowStats"/>
|
|
285 | 285 |
</ARCS> |
286 | 286 |
</NODE> |
287 |
<NODE name="findSearchService" type="FindSearchService"> |
|
288 |
<DESCRIPTION>find search service</DESCRIPTION> |
|
289 |
<PARAMETERS> |
|
290 |
<PARAM name="xquery" type="string" managedBy="user" required="false">/RESOURCE_PROFILE[.//RESOURCE_TYPE/@value='SearchServiceResourceType' and .//RESOURCE_KIND/@value='ServiceResources']/HEADER/RESOURCE_IDENTIFIER/@value/string()</PARAM> |
|
291 |
<PARAM name="xqueryForServiceIdParam" type="string" managedBy="system" required="true">xqueryForSearchService</PARAM> |
|
292 |
</PARAMETERS> |
|
293 |
<ARCS> |
|
294 |
<ARC name="found" to="switch"/> |
|
295 |
<ARC name="notFound" to="waitSearchService"/> |
|
296 |
</ARCS> |
|
297 |
</NODE> |
|
298 |
<NODE name="switch" type="SwitchIndex"> |
|
299 |
<DESCRIPTION>switch index</DESCRIPTION> |
|
300 |
<PARAMETERS> |
|
301 |
<PARAM name="xqueryForServiceIdParam" type="string" managedBy="system" required="true">xqueryForSearchService</PARAM> |
|
302 |
<PARAM name="inputIndexIdParam" type="string" managedBy="system" required="true">index_id</PARAM> |
|
303 |
<PARAM name="outputIndexIdParam" type="string" managedBy="system" required="true">IndexId</PARAM> |
|
304 |
</PARAMETERS> |
|
305 |
<ARCS> |
|
306 |
<ARC to="waitSearchService"/> |
|
307 |
</ARCS> |
|
308 |
</NODE> |
|
309 |
<NODE name="waitSearchService"> |
|
310 |
<DESCRIPTION>Wait for the findSearchService to fail or the switch to success</DESCRIPTION> |
|
311 |
<PARAMETERS/> |
|
287 |
<NODE name="validateShadowStats" type="ValidateShadowStats"> |
|
288 |
<DESCRIPTION>generates validation report stats/index</DESCRIPTION> |
|
289 |
<PARAMETERS> |
|
290 |
<!-- <PARAM name="" type="string" managedBy="user" required="true"></PARAM> --> |
|
291 |
</PARAMETERS> |
|
312 | 292 |
<ARCS> |
293 |
<ARC to="refreshShadowCache" /> |
|
294 |
</ARCS> |
|
295 |
</NODE> |
|
296 |
<NODE name="refreshShadowCache" type="RefreshShadowCache"> |
|
297 |
<DESCRIPTION>Updates the shadow cache according to the shadow stats db.</DESCRIPTION> |
|
298 |
<PARAMETERS> |
|
299 |
<PARAM name="xqueryForServiceIdParam" type="string" managedBy="system" required="true">xqueryForStatsManagerService</PARAM> |
|
300 |
</PARAMETERS> |
|
301 |
<ARCS> |
|
313 | 302 |
<ARC to="waitAll" /> |
314 | 303 |
</ARCS> |
315 | 304 |
</NODE> |
316 |
|
|
305 |
|
|
317 | 306 |
<!-- OAI STORE UPDATE --> |
318 | 307 |
<NODE name="setOAIFormat" type="SetFormatInfo"> |
319 | 308 |
<DESCRIPTION>set format, layout, interpretation for OAI publisher</DESCRIPTION> |
... | ... | |
422 | 411 |
<PARAM name="configuredOnly" type="boolean" managedBy="user" required="true">false</PARAM> |
423 | 412 |
</PARAMETERS> |
424 | 413 |
<ARCS> |
425 |
<ARC to="SetOAIDB"/>
|
|
414 |
<ARC to="waitAll"/>
|
|
426 | 415 |
</ARCS> |
427 | 416 |
</NODE> |
428 | 417 |
<NODE name="ConfigSets" type="RefreshSetsFromConfig"> |
... | ... | |
431 | 420 |
<PARAM name="dbNameParam" required="true" type="string" managedBy="system">oai_dbName</PARAM> |
432 | 421 |
</PARAMETERS> |
433 | 422 |
<ARCS> |
434 |
<ARC to="SetOAIDB"/> |
|
435 |
</ARCS> |
|
436 |
</NODE> |
|
437 |
<NODE name="SetOAIDB" type="SetCurrentOAIDB" isJoin="true"> |
|
438 |
<DESCRIPTION>Update the currentdb in the OAI configuration profile to the value in oai_dbName</DESCRIPTION> |
|
439 |
<PARAMETERS> |
|
440 |
<PARAM name="oaiDBNameParam" required="true" type="string" managedBy="system">oai_dbName</PARAM> |
|
441 |
</PARAMETERS> |
|
442 |
<ARCS> |
|
443 | 423 |
<ARC to="waitAll"/> |
444 | 424 |
</ARCS> |
445 | 425 |
</NODE> |
446 |
|
|
426 |
|
|
447 | 427 |
<!-- WAIT FOR ALL THE WF BRANCHES TO COMPLETE --> |
448 | 428 |
<NODE name="waitAll" isJoin="true"> |
449 | 429 |
<DESCRIPTION>wait for all the branches to complete</DESCRIPTION> |
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/dm/content.publishing.xml | ||
---|---|---|
1 |
<RESOURCE_PROFILE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER value="546f8ba1-2ca2-4e29-86ea-c9489ab9b857_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl" /> |
|
4 |
<RESOURCE_TYPE value="WorkflowDSResourceType" /> |
|
5 |
<RESOURCE_KIND value="WorkflowDSResources" /> |
|
6 |
<RESOURCE_URI value="" /> |
|
7 |
<DATE_OF_CREATION value="2006-05-04T18:13:51.0Z" /> |
|
8 |
</HEADER> |
|
9 |
<BODY> |
|
10 |
<WORKFLOW_NAME>Content Publishing</WORKFLOW_NAME> |
|
11 |
<WORKFLOW_TYPE>Content Publishing</WORKFLOW_TYPE> |
|
12 |
<WORKFLOW_PRIORITY>30</WORKFLOW_PRIORITY> |
|
13 |
<CONFIGURATION start="manual"> |
|
14 |
<NODE name="START_SWITCH" isStart="true"> |
|
15 |
<DESCRIPTION>Start content Publishing</DESCRIPTION> |
|
16 |
<PARAMETERS/> |
|
17 |
<ARCS> |
|
18 |
<ARC to="findStatsService" /> |
|
19 |
<ARC to="findIndex" /> |
|
20 |
<ARC to="setOAIDB" /> |
|
21 |
</ARCS> |
|
22 |
</NODE> |
|
23 |
<NODE name="findStatsService" type="FindStatsService"> |
|
24 |
<DESCRIPTION>find stats service</DESCRIPTION> |
|
25 |
<PARAMETERS> |
|
26 |
<PARAM name="xquery" type="string" managedBy="user" required="false">/RESOURCE_PROFILE[.//RESOURCE_TYPE/@value='StatsManagerServiceResourceType' and .//RESOURCE_KIND/@value='ServiceResources']/HEADER/RESOURCE_IDENTIFIER/@value/string()</PARAM> |
|
27 |
<PARAM name="xqueryForServiceIdParam" type="string" managedBy="system" required="true">xqueryForStatsManagerService</PARAM> |
|
28 |
</PARAMETERS> |
|
29 |
<ARCS> |
|
30 |
<ARC name="found" to="SELECT_PROMOTE_STATS" /> |
|
31 |
<ARC name="notFound" to="waitForStats" /> |
|
32 |
</ARCS> |
|
33 |
</NODE> |
|
34 |
<NODE name="SELECT_PROMOTE_STATS" type="Selection"> |
|
35 |
<DESCRIPTION>Do we promote the shadow stats to public today?</DESCRIPTION> |
|
36 |
<PARAMETERS> |
|
37 |
<PARAM function="validValues(['YES', 'NO'])" managedBy="user" name="selection" required="true" type="string">YES</PARAM> |
|
38 |
</PARAMETERS> |
|
39 |
<ARCS> |
|
40 |
<ARC name="YES" to="PROMOTE_STATS" /> |
|
41 |
<ARC name="NO" to="waitForStats" /> |
|
42 |
</ARCS> |
|
43 |
</NODE> |
|
44 |
<NODE name="PROMOTE_STATS" type="PromoteShadowStats"> |
|
45 |
<DESCRIPTION>Copy shadow Joomla cache and stats db to public schema</DESCRIPTION> |
|
46 |
<PARAMETERS> |
|
47 |
<PARAM name="xqueryForServiceIdParam" type="string" managedBy="system" required="true">xqueryForStatsManagerService</PARAM> |
|
48 |
</PARAMETERS> |
|
49 |
<ARCS> |
|
50 |
<ARC to="waitForStats" /> |
|
51 |
</ARCS> |
|
52 |
</NODE> |
|
53 |
|
|
54 |
<NODE name="findIndex" type="FindIndex" isStart="true"> |
|
55 |
<DESCRIPTION /> |
|
56 |
<PARAMETERS> |
|
57 |
<PARAM name="mdFormat" type="string" managedBy="user" required="true">DMF</PARAM> |
|
58 |
<PARAM name="layout" type="string" managedBy="system" required="true">index</PARAM> |
|
59 |
<PARAM name="interpretation" type="string" managedBy="system" required="true">openaire</PARAM> |
|
60 |
</PARAMETERS> |
|
61 |
<ARCS> |
|
62 |
<ARC name="found" to="findSearchService" /> |
|
63 |
<ARC name="notFound" to="waitForSearch" /> |
|
64 |
</ARCS> |
|
65 |
</NODE> |
|
66 |
<NODE name="findSearchService" type="FindSearchService"> |
|
67 |
<DESCRIPTION>find search service</DESCRIPTION> |
|
68 |
<PARAMETERS> |
|
69 |
<PARAM name="xquery" type="string" managedBy="user" required="false">/RESOURCE_PROFILE[.//RESOURCE_TYPE/@value='SearchServiceResourceType' and .//RESOURCE_KIND/@value='ServiceResources']/HEADER/RESOURCE_IDENTIFIER/@value/string()</PARAM> |
|
70 |
<PARAM name="xqueryForServiceIdParam" type="string" managedBy="system" required="true">xqueryForSearchService</PARAM> |
|
71 |
</PARAMETERS> |
|
72 |
<ARCS> |
|
73 |
<ARC name="found" to="SELECT_SWITCH_INDEX" /> |
|
74 |
<ARC name="notFound" to="waitForSearch" /> |
|
75 |
</ARCS> |
|
76 |
</NODE> |
|
77 |
<NODE name="SELECT_SWITCH_INDEX" type="Selection"> |
|
78 |
<DESCRIPTION>Do we switch the index read by the Search Service today?</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="switchIndex" /> |
|
84 |
<ARC name="NO" to="waitForSearch" /> |
|
85 |
</ARCS> |
|
86 |
</NODE> |
|
87 |
<NODE name="switchIndex" type="SwitchIndex"> |
|
88 |
<DESCRIPTION>switch index</DESCRIPTION> |
|
89 |
<PARAMETERS> |
|
90 |
<PARAM name="xqueryForServiceIdParam" type="string" managedBy="system" required="true">xqueryForSearchService</PARAM> |
|
91 |
<PARAM name="inputIndexIdParam" type="string" managedBy="system" required="true">index_id</PARAM> |
|
92 |
<PARAM name="outputIndexIdParam" type="string" managedBy="system" required="true">IndexId</PARAM> |
|
93 |
</PARAMETERS> |
|
94 |
<ARCS> |
|
95 |
<ARC to="waitForSearch" /> |
|
96 |
</ARCS> |
|
97 |
</NODE> |
|
98 |
<NODE name="setOAIDB" type="SetCurrentOAIDB"> |
|
99 |
<DESCRIPTION>Update the currentdb in the OAI configuration profile</DESCRIPTION> |
|
100 |
<PARAMETERS> |
|
101 |
<PARAM name="oaiDBName" type="string" managedBy="user" required="true">oaistore</PARAM> |
|
102 |
</PARAMETERS> |
|
103 |
<ARCS> |
|
104 |
<ARC to="waitAll" /> |
|
105 |
</ARCS> |
|
106 |
</NODE> |
|
107 |
|
|
108 |
<NODE name="waitForSearch"> |
|
109 |
<DESCRIPTION>Wait for the search branch to fail or to success</DESCRIPTION> |
|
110 |
<PARAMETERS/> |
|
111 |
<ARCS> |
|
112 |
<ARC to="waitAll" /> |
|
113 |
</ARCS> |
|
114 |
</NODE> |
|
115 |
|
|
116 |
<NODE name="waitForStats"> |
|
117 |
<DESCRIPTION>Wait for the stats branch to fail or success</DESCRIPTION> |
|
118 |
<PARAMETERS/> |
|
119 |
<ARCS> |
|
120 |
<ARC to="waitAll" /> |
|
121 |
</ARCS> |
|
122 |
</NODE> |
|
123 |
|
|
124 |
<!-- WAIT FOR ALL THE WF BRANCHES TO COMPLETE --> |
|
125 |
<NODE name="waitAll" isJoin="true"> |
|
126 |
<DESCRIPTION>wait for all the branches to complete</DESCRIPTION> |
|
127 |
<PARAMETERS/> |
|
128 |
<ARCS> |
|
129 |
<ARC to="success"/> |
|
130 |
</ARCS> |
|
131 |
</NODE> |
|
132 |
</CONFIGURATION> |
|
133 |
<STATUS> |
|
134 |
</STATUS> |
|
135 |
</BODY> |
|
136 |
</RESOURCE_PROFILE> |
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/applicationContext-msro-openaireplus.properties | ||
---|---|---|
21 | 21 |
dnet.openaire.model.relclasses.xquery = distinct-values(for $x in /RESOURCE_PROFILE[./HEADER/RESOURCE_TYPE/@value='OntologyDSResourceType']//TERM return concat($x/@code/string(), ":", $x//RELATION[./@type = 'inverseOf']/@code/string())) |
22 | 22 |
|
23 | 23 |
dnet.openaire.service.search.lookup.xquery = /RESOURCE_PROFILE[.//RESOURCE_TYPE/@value='SearchServiceResourceType' and .//RESOURCE_KIND/@value='ServiceResources']/HEADER/RESOURCE_IDENTIFIER/@value/string() |
24 |
dnet.openaire.service.stats.lookup.xquery = /RESOURCE_PROFILE[.//RESOURCE_TYPE/@value='StatsManagerServiceResourceType' and .//RESOURCE_KIND/@value='ServiceResources']/HEADER/RESOURCE_IDENTIFIER/@value/string() |
|
24 | 25 |
|
26 |
|
|
25 | 27 |
oaf.schema.location = http://www.openaire.eu/schema/0.2/oaf-0.2.xsd |
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/applicationContext-msro-openaire-nodes.xml | ||
---|---|---|
222 | 222 |
p:datasourceManagerLocator-ref="openaireDatasourceManagerServiceLocator" |
223 | 223 |
scope="prototype" /> |
224 | 224 |
|
225 |
|
|
226 | 225 |
<bean id="wfNodeSplitDatasetRecord" class="eu.dnetlib.msro.openaireplus.workflows.nodes.datacite.SplitDatasetRecord" |
227 |
p:resultSetClientFactory-ref="resultSetClientFactory" |
|
228 |
/> |
|
226 |
p:resultSetClientFactory-ref="resultSetClientFactory"/> |
|
229 | 227 |
|
228 |
<!-- Stats --> |
|
229 |
<bean id="wfNodeFindStatsService" |
|
230 |
class="eu.dnetlib.msro.openaireplus.workflows.nodes.stats.FindStatsServiceJobNode" |
|
231 |
scope="prototype" /> |
|
232 |
|
|
233 |
<bean id="wfNodePromoteShadowStats" |
|
234 |
class="eu.dnetlib.msro.openaireplus.workflows.nodes.stats.PromoteShadowStatsJobNode" |
|
235 |
scope="prototype" /> |
|
236 |
|
|
237 |
<bean id="wfNodeRefreshShadowCache" |
|
238 |
class="eu.dnetlib.msro.openaireplus.workflows.nodes.stats.RefreshShadowCacheJobNode" |
|
239 |
scope="prototype" /> |
|
240 |
|
|
241 |
<bean id="wfNodeValidateShadowStats" |
|
242 |
class="eu.dnetlib.msro.openaireplus.workflows.nodes.stats.ValidateShadowStatsJobNode" |
|
243 |
scope="prototype" /> |
|
244 |
|
|
245 |
|
|
230 | 246 |
</beans> |
modules/dnet-openaireplus-workflows/trunk/pom.xml | ||
---|---|---|
10 | 10 |
<groupId>eu.dnetlib</groupId> |
11 | 11 |
<artifactId>dnet-openaireplus-workflows</artifactId> |
12 | 12 |
<packaging>jar</packaging> |
13 |
<version>1.1.9-SNAPSHOT</version>
|
|
13 |
<version>1.2.0-SNAPSHOT</version>
|
|
14 | 14 |
<scm> |
15 | 15 |
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-openaireplus-workflows/trunk</developerConnection> |
16 | 16 |
</scm> |
Also available in: Unified diff
Added content publishing workflow to automatize the switch of the index and stats shown by the openaire+ portal.