-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvalidate-ldes.xml
50 lines (48 loc) · 2.09 KB
/
validate-ldes.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="UTF-8" ?>
<scriptlet id="validate-ldes" xmlns="http://www.gitb.com/tdl/v1/">
<params>
<var name="ldesUrl" type="string"/>
<var name="shaclShape" type="string"/>
<var name="delayDuration" type="number">
<value>60000</value>
</var>
<var name="addresses" type="map" />
</params>
<steps stopOnError="true">
<process output="startupReport" desc="Start Replication" id="startReplicatingProcess"
handler="$addresses{processing}">
<operation>startReplicating</operation>
<input name="ldes-url">$ldesUrl</input>
</process>
<log>"Waiting for the LDES Client status to be available"</log>
<process desc="Wait until client is available" handler="DelayProcessor">
<operation>delay</operation>
<input>5000</input>
</process>
<log>"Start checking LDES Client status"</log>
<assign to="replicationOutput"/>
<repuntil desc="Check if replication has ended">
<do>
<process desc="Wait" handler="DelayProcessor">
<operation>delay</operation>
<input>$delayDuration</input>
</process>
<process output="replicationOutput" handler="$addresses{processing}">
<operation>haltWhenReplicated</operation>
</process>
<log level="DEBUG">$replicationOutput{STATUS}</log>
</do>
<cond>$replicationOutput{STATUS} = 'REPLICATING'</cond>
</repuntil>
<log>"Starting shacl validation"</log>
<verify output="validatorOutput" id="shaclValidationStep" desc="validate against shacl"
handler="$addresses{validation}">
<input name="shacl-shape">$shaclShape</input>
</verify>
<log>"shacl verification finished"</log>
<process desc="Delete pipeline" handler="$addresses{processing}" operation="destroyPipeline"/>
</steps>
<output name="validatorOutput">
$validatorOutput
</output>
</scriptlet>