forked from sjkarthik/mosip-config-nira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration-processor-camel-routes-res-reprint-default.xml
94 lines (94 loc) · 4.21 KB
/
registration-processor-camel-routes-res-reprint-default.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<routes xmlns="http://camel.apache.org/schema/spring">
<!-- Packet-Reciever to securezone-notification Route -->
<route id="packet-reciever-->securezone-notification res_reprint route">
<from uri="eventbus://packet-receiver-res_reprint-bus-out" />
<log message="packet-reciever-->securezone-notification res_reprint ${bodyAs(String)}" />
<choice>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == true && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://mark-as-reprocess" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == false)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
</when>
<otherwise>
<to uri="eventbus://securezone-notification-bus-in" />
</otherwise>
</choice>
</route>
<!-- securezone-notification to packet-uploader Route -->
<route id="securezone-notification-->packet-uploader res_reprint route">
<from uri="eventbus://securezone-notification-res_reprint-bus-out" />
<log message="securezone-notification-->packet-uploader res_reprint route ${bodyAs(String)}" />
<choice>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == true && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://mark-as-reprocess" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == false)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
</when>
<otherwise>
<to uri="eventbus://packet-uploader-bus-in" />
</otherwise>
</choice>
</route>
<!-- packet-uploader to printing-stage Route -->
<route id="packet-uploader-->printing-stage res_reprint route">
<from uri="eventbus://packet-uploader-res_reprint-bus-out" />
<log message="packet-uploader-->printing-stage res_reprint route ${bodyAs(String)}" />
<choice>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
<to uri="workflow-cmd://anonymous-profile" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == true && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://mark-as-reprocess" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == false)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
<to uri="workflow-cmd://anonymous-profile" />
</when>
<otherwise>
<to uri="eventbus://printing-bus-in" />
</otherwise>
</choice>
</route>
<route id="printing-stage--> res_reprint route">
<from uri="eventbus://printing-res_reprint-bus-out" />
<log message="printing-stage--> route ${bodyAs(String)}" />
<choice>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
<to uri="workflow-cmd://anonymous-profile" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == true && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://mark-as-reprocess" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == false)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
<to uri="workflow-cmd://anonymous-profile" />
</when>
<otherwise>
<to uri="workflow-cmd://complete-as-processed" />
<to uri="workflow-cmd://anonymous-profile" />
</otherwise>
</choice>
</route>
</routes>