forked from mosip/mosip-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration-processor-camel-routes-update-default-dmz.xml
37 lines (37 loc) · 1.59 KB
/
registration-processor-camel-routes-update-default-dmz.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
<routes xmlns="http://camel.apache.org/schema/spring">
<!-- Packet-Reciever to securezone-notification Route -->
<route id="packet-reciever-->securezone-notification update route">
<from uri="eventbus://packet-receiver-update-bus-out" />
<log message="packet-reciever-->securezone-notification update ${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>
<process ref="tokenGenerationProcessor" />
<setHeader headerName="CamelHttpMethod">
<constant>POST</constant>
</setHeader>
<setHeader headerName="Content-Type">
<constant>application/json</constant>
</setHeader>
<setHeader headerName="Cookie">
<simple>${header.Cookie}</simple>
</setHeader>
<setBody>
<simple>${bodyAs(String)}</simple>
</setBody>
<to uri="http://mz.ingress:30080/registrationprocessor/v1/securezone/notification" />
</otherwise>
</choice>
</route>
</routes>