<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/webflow
      http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

  <end-state id="finish" view="community.EntryView">
    <on-entry>
      <set name="flowScope.communityCode" value="requestParameters.communityCode"/>
      <set name="requestScope.threadId" value="requestParameters.threadId" type="int"/>
      <set name="requestScope.entryCode" value="requestParameters.entryCode"/>
      <set name="requestScope.user" value="externalContext.requestMap._user"/>
      <set name="flowScope.community" value="communityTable.findByCode(communityCode)"/>
      <set name="flowScope.thread" value="community.getThread(threadId)"/>
      <set name="flowScope.entry" value="thread.findEntryByEntryCodeForRead(entryCode, user)"/>
    </on-entry>
  </end-state>

</flow>
