<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:replace="base::layout(~{::title}, ~{::main})">
<head>
  <title>Wee! Workflow Enactment Engine</title>
</head>
<body>
<main>
  <section class="pt-6 pb-6 pl-5 pr-5">
    <h2 class="is-size-3 is-capitalized">Workflow Enactment Engine</h2>
    <p th:inline="text">Enactment of the Process Model: [[${session.pm.name}]] has ended!</p>
    <a th:href="@{/}">HOME</a>
    <p th:inline="text">Trace: [[${session.trace.name}]]</p>
    <p th:inline="text">Started at: [[${session.trace.events[0].timestampF}]]</p>
    <th:block th:each="ev : ${session.trace.events}">
      <p th:if="${ev.class.name == 'ua.be.wee.model.pt.StartActivityEvent'}">Begin:</p>
      <p th:if="${ev.class.name == 'ua.be.wee.model.pt.EndActivityEvent'}">End:</p>
      <p th:if="${ev.class.name == 'ua.be.wee.model.pt.EndActivityEvent' || ev.class.name == 'ua.be.wee.model.pt.StartActivityEvent'}" th:text="${ev.relatesTo.activity.name}"></p>
      <p th:if="${ev.class.name == 'ua.be.wee.model.pt.EndTraceEvent'}">End of Trace at:</p>
      <p th:if="${ev.class.name == 'ua.be.wee.model.pt.EndTraceEvent'}" th:text="${ev.timestampF}"></p>
      <p th:if="${ev.class.name == 'ua.be.wee.model.pt.EndActivityEvent' || ev.class.name == 'ua.be.wee.model.pt.StartActivityEvent'}">port: [[${ev.relatesTo.name}]]</p>
    </th:block>
  </section>
</main>
</body>
</html>