I'm trying to track down a problem with my CDI conversations. I've got a page that works if I take one route through my application, but not if I go through another. I believe it's something conversation related but I cannot figure out what.
The working workflow occurs like this:
- Load page A
- Open edit page A
- At this point, a new conversation is start with the ID of 1
- Make edit and save which returns me page A
- Click link on page A to load page B
- Open edit page B
- Conversation is started with ID 2. Pressing refresh at this start will start a conversation with an ID of 3. Other refreshes increase the conversation ID.
- Edit occurs successfully
The work flow where it doesn't work is this: The working workflow occurs like this:
- Load page A
- Click link on page A to load page B
- Open edit page B
- Conversation is started with ID 1. Refreshing the page will tell me that my conversation ID is still 1.
- Various actions on the page throw a "WELD-000321 No conversation found to restore for id 1" exception.
So the differences between the two workflows are that in the working workflow I make a successful edit & when I am on my second edit page, I get incremental conversations IDs. The not working workflow, conversation ID is always 1 but I can't do anything!
The things that I am trying to understand are:
- If I have a conversation with an ID of 1, do something then end the conversation, when I start a new conversation - what would it's ID be? 1 (as this conversation was ended) or 2 (the next non-used ID).
- Is there anything apart from the conversation not being ended properly that would like to the incrementing conversation ID's that I am seeing? As far as I can tell, I am closing my conversations correctly.
Hopefully the answer to one of these will shed some light onto what's going wrong. Thanks for any input