Skip to content

Commit

Permalink
updated notification url for operations for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpcarter committed Feb 23, 2021
1 parent 27d9672 commit e927780
Show file tree
Hide file tree
Showing 2 changed files with 754 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@
</INVOKE>

<INVOKE TIMEOUT="" SERVICE="jc.cumulocity.tools._priv:http" VALIDATE-IN="$none" VALIDATE-OUT="$none">
<COMMENT>POST - devicecontrol/notifications - subscribe - this is where events will start to be queued</COMMENT>
<COMMENT>POST - /notification/operations - subscribe - this is where events will start to be queued</COMMENT>

<!-- nodes -->

Expand Down Expand Up @@ -2662,11 +2662,15 @@
</DATA>
</MAPSET>

<MAPSET NAME="Setter" OVERWRITE="true" VARIABLES="true" GLOBALVARIABLES="false" FIELD="/url;1;0">
<MAPSET NAME="Setter" OVERWRITE="true" VARIABLES="true" GLOBALVARIABLES="false" FIELD="/payload;1;0">
<DATA ENCODING="XMLValues" I18N="true">

<Values version="2.0">
<value name="xml">%credentials/endPoint%/devicecontrol/notifications</value>
<value name="xml">{
"channel": "/meta/subscribe",
"clientId": "%clientId%",
"subscription": "/%c8yIdOfAgent%"
}</value>
<record name="type" javaclass="com.wm.util.Values">
<value name="node_type">record</value>
<value name="node_subtype">unknown</value>
Expand All @@ -2677,7 +2681,7 @@
<value name="field_password">false</value>
</record>
<value name="is_public">false</value>
<value name="field_name">url</value>
<value name="field_name">payload</value>
<value name="field_type">string</value>
<value name="field_dim">0</value>
<array name="field_options" type="value" depth="1">
Expand All @@ -2690,15 +2694,17 @@
</DATA>
</MAPSET>

<MAPSET NAME="Setter" OVERWRITE="true" VARIABLES="true" GLOBALVARIABLES="false" FIELD="/payload;1;0">
<MAPCOPY FROM="/credentials;4;0;jc.cumulocity.tools.app.docs:Credentials/defaultUser;1;0" TO="/auth;2;0/user;1;0">
</MAPCOPY>

<MAPCOPY FROM="/credentials;4;0;jc.cumulocity.tools.app.docs:Credentials/defaultPassword;1;0" TO="/auth;2;0/pass;1;0">
</MAPCOPY>

<MAPSET NAME="Setter" OVERWRITE="true" VARIABLES="true" GLOBALVARIABLES="false" FIELD="/url;1;0">
<DATA ENCODING="XMLValues" I18N="true">

<Values version="2.0">
<value name="xml">{
"channel": "/meta/subscribe",
"clientId": "%clientId%",
"subscription": "/%c8yIdOfAgent%"
}</value>
<value name="xml">%credentials/endPoint%/notification/operations</value>
<record name="type" javaclass="com.wm.util.Values">
<value name="node_type">record</value>
<value name="node_subtype">unknown</value>
Expand All @@ -2709,7 +2715,7 @@
<value name="field_password">false</value>
</record>
<value name="is_public">false</value>
<value name="field_name">payload</value>
<value name="field_name">url</value>
<value name="field_type">string</value>
<value name="field_dim">0</value>
<array name="field_options" type="value" depth="1">
Expand All @@ -2721,12 +2727,6 @@
</Values>
</DATA>
</MAPSET>

<MAPCOPY FROM="/credentials;4;0;jc.cumulocity.tools.app.docs:Credentials/defaultUser;1;0" TO="/auth;2;0/user;1;0">
</MAPCOPY>

<MAPCOPY FROM="/credentials;4;0;jc.cumulocity.tools.app.docs:Credentials/defaultPassword;1;0" TO="/auth;2;0/pass;1;0">
</MAPCOPY>
</MAP>

<MAP MODE="OUTPUT">
Expand Down Expand Up @@ -3718,7 +3718,7 @@
<value name="xml">{
"channel": "/meta/subscribe",
"clientId": "%clientId%",
"subscription": "/devicecontrol/%c8yIdOfAgent%"
"subscription": "/operations/%c8yIdOfAgent%"
}</value>
<record name="type" javaclass="com.wm.util.Values">
<value name="node_type">record</value>
Expand Down Expand Up @@ -8013,10 +8013,6 @@
</MAP>
</INVOKE>

<INVOKE TIMEOUT="" SERVICE="pub.flow:tracePipeline" VALIDATE-IN="$none" VALIDATE-OUT="$none">
<COMMENT></COMMENT>
</INVOKE>

<EXIT FROM="$flow" SIGNAL="FAILURE" FAILURE-MESSAGE="Subscription failed due to %failureMessage%">
<COMMENT></COMMENT>
</EXIT>
Expand Down

0 comments on commit e927780

Please sign in to comment.