Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Store Event XML in Instance Variable

Avatar

Avatar
Validate 1
Level 1
chrisr17787094
Level 1

Likes

3 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 1
chrisr17787094
Level 1

Likes

3 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
chrisr17787094
Level 1

10-05-2018

Hi there

I am trying to understand how I extract an XML data node and store it within an instance variable inside a workflow. I've tried looking everywhere for help on how to do this but cannot find anything. I have limited JS knowledge but am assuming this must be possible somehow. Below are some examples of the XML and what I am currently trying within the workflow. Any help would be appreciated.

XML looks like this:

<ctx>

      <UUID>cab2ed30-4864-439b-a2bf-73ec5a42ff17</UUID>

      <CUSTOMERNAME>Mr 238396</CUSTOMERNAME>

      <POLICYNUMBER>ABC123456</POLICYNUMBER>

      <COVER_START>18-04-2018</COVER_START>

      <COVER_END>17-04-2019</COVER_END>

     </ctx>

Then within a JavaScript code node I have this:

var ctx = XML(ams.<companyname>MessagingEventQueue.ctx);

instance.vars.custName = ctx.CUSTOMERNAME;

Cheers

Chris

Accepted Solutions (0)

Answers (0)