1 Reply Latest reply: Oct 18, 2011 7:25 AM by Gary Brown RSS

    Is a common id in messages required for a simulation?

    Jaroslaw Kijanowski Newbie

      Hello,

      I'm having trouble to understand, let's call it "the message identification process", when running a simulation.

       

      I have a scenario with two roles, where I send a message with two attributes, "question" and "id" and I receive a message with two attributes "answer" and "id".

       

      I create a choreography. Now I create a new "IDType" Information Type and a new "ID" Token referencing the IDType.

      I also create a new Token Locator referencing the "ID" token and the query is //@id. Finally I create an Identity for the channel referencing the "ID" token.

       

      Now I run a simulation, both messages have the @id attribute set to the same value. All green, yeah!

       

      The thing is, I don't want to have that id attribute in any of my messages, so my request has only one attribute, "question" and my response has also one attribute, "answer".

       

      So I changed the TokenLocator for my request to be "//@question" and created a new Token Locator for my response to be "//@answer". The simulation fails - I get a "green" for the request, but a "red" for the response.

       

      Do my messages have to have an id, that is the same across all messages exchanged between all roles in a particular scenario (flow)? Or am I messing up the token locators?

       

      Thanks,

      Jarek