Course menuForge Cloud

Level 2 · Intermediate

Intermediate Forge

About four hours. Extend the same app with a check-in page: type in a car’s problems, and AI turns them into one repair task per problem, writes a repair report in Confluence, and hands the tricky ones to an AI expert of your own.

What you’ll build

Apps / Check-in desk

Check-in desk

Car

BMW 3 Series

Notes

Grinding noise from the front when braking. Oil service is due. Battery light is on and the car won’t start some mornings.

Check in

Check-in done: three repair tasks

  • WS-24 BMW 3 Series – grinding noise from the front when braking
  • WS-25 BMW 3 Series – oil service
  • WS-26 BMW 3 Series – battery light on, won’t start some mornings needs-expert
A sketch of the check-in desk, not a real screen. The page, the repair tasks, the report and the expert’s comment are what you build in Level 2.

A page in Jira called Check-in desk. When a car comes in, the person at the front desk types its make and model and the customer’s notes about what is wrong. The desk answers straight away with a receipt. Behind it, the app works through a queue:

  • Forge LLM, an AI model that Atlassian hosts, splits the notes into one repair task per problem.
  • The app writes a repair report in Confluence that lists them.
  • Every repair task still shows the Level 1 car details card.

Then the app sends repairs that need a diagnosis to an expert: an AI agent of your own in Rovo, Atlassian’s assistant, that looks up the car and writes up likely causes. You finish by comparing it with an agent built in Rovo Studio, with no code.

Plan on about four hours, with breaks. It starts from the finished Level 1 app; download it from the first lesson if you need to.

How the Level 2 app works

This is the Level 1 diagram again, with what Level 2 adds drawn on top. The Level 1 parts stay where they were and turn grey unless a step uses them. Scroll, and the step you are reading lights up its part of the diagram while each kind of data moves along the arrows as its own shape. The lessons link back to the step that shows what they build.

What the Level 2 app does

  • Request
  • Stored data
  • Event
  • Return value
  • AI answer
  • Written by the app itself (asApp)
  • Outside answer
  • Jira or Confluence data
  • Secret

The check-in desk calls its own resolver with invoke().

Runs in the browser

Global page The check-in desk

A full page of your own in Jira’s Apps menu. Here the person at the front desk names the car and pastes the notes.

Select any box in the diagram to see what it is.

  1. Chapter 1 of 3

    What happens at the check-in desk

  2. Step 1 of 5 · Check-in

    Check-in. Someone at the front desk types a car and its problems into the check-in desk, a page in Jira, and the page sends them to its own resolver in the Atlassian cloud.

  3. Step 2 of 5 · File it and answer

    File it and answer. The desk resolver files the whole check-in in KVS storage, puts only its id on the queue, and answers the desk at once with a receipt, so nobody waits for the slow work.

    Runs in the Atlassian cloud

    Runtime limits

    Forge gives each run of the code a time limit, short for requests from a screen, longer for work taken from a queue. That is why Level 2 answers the page first and does the slow work afterwards, just as a long automation runs in the background.

    Further reading, optional: Atlassian docs on Quotas and limits (opens in a new tab)

    Runs in the Atlassian cloud

    Key-Value Store (KVS)in the workshop: the filing cabinet

    The app’s own simple storage in Atlassian’s cloud: each value is saved under a name, like a labelled box on a shelf. Level 2 keeps each car’s check-in here.

    Explained in Level 2, lesson 2

    Runs in the Atlassian cloud

    Forge SQL

    Forge also offers a database with tables, for apps that keep many related records. This course doesn’t need it: it uses the simpler storage below, which keeps each value under a name.

    Further reading, optional: Atlassian docs on Storage reference (opens in a new tab)

    Runs in the Atlassian cloud

    Queue (@forge/events)in the workshop: the queue

    A waiting list for work. One part of the app adds a job to it, and another part picks it up later, one job at a time, a bit like an automation rule that queues actions for later.

    Explained in Level 2, lesson 2
  4. Step 3 of 5 · Split the notes

    Split the notes. Later, the queue consumer, the function that takes the next check-in off the queue (the next free mechanic), takes the id from the queue, loads that check-in from storage, and asks Forge LLM, an AI model that Atlassian hosts, to split the notes into separate problems.

    Runs in the Atlassian cloud

    Forge LLM

    An AI language model that Atlassian runs for Forge apps. The app sends it text and gets text back, here a list of repairs. Admins see that the app uses it before they approve it.

    Explained in Level 2, lesson 3
  5. Step 4 of 5 · Repair tasks

    Repair tasks. The consumer creates one Jira work item, a repair task, for each problem with asApp(), which means the app acts as itself, not as the person who checked the car in.

    Atlassian’s own products

    Product REST APIs

    How the app reads and writes Jira and Confluence: the same web addresses that integrations and scripts use, but the app never handles a token, because Forge signs in for it.

    Explained in Level 1, lesson 6
  6. Step 5 of 5 · Repair report

    Repair report. Finally, the consumer writes a Confluence page, the repair report, that lists those repair tasks.

  7. Chapter 2 of 3

    The handoff and the diagnosis expert

  8. Step 1 of 4 · Handoff

    Handoff. When someone moves a repair task to “Approved for expert”, Jira sends an update event to the app’s product trigger, and the handoff function adds one comment to that work item.

  9. Step 2 of 4 · The diagnosis expert

    The diagnosis expert. In Rovo Chat, the chat of Atlassian’s assistant, the app’s own Rovo agent, an AI helper that the app adds to Rovo, decides to call one of the app’s two Rovo actions: functions of the app that the agent may use as tools.

  10. Step 3 of 4 · Look up the car

    Look up the car. The lookup action asks API Ninjas about the car, reusing the car data code from Level 1.

  11. Step 4 of 4 · Publish

    Publish. The publish action writes the diagnosis to a Confluence page as the person chatting, with that person’s permissions.

  12. Chapter 3 of 3Optional

    Online bookings

  13. Step 1 of 2 · A booking arrives

    A booking arrives. A booking system outside Atlassian sends a booking to the web trigger’s web address, together with a shared secret that only it and the app know. In the lesson, you play that system with a command on your laptop.

  14. Step 2 of 2 · Filed in storage

    Filed in storage. The web trigger accepts the booking only when the shared secret is right, and then files it in KVS storage, just as the desk resolver files a check-in.

The lessons

  1. Lesson 0: Get ready for Level 2Get everything Level 2 needs on top of your Level 1 app.
  2. Lesson 1: Open the check-in deskAdd a page of your own to Jira, built with Custom UI (your own web page code, instead of the ready-made screen parts Level 1 used), where the person at the front desk checks a car in with its notes and gets one repair task back.
  3. Lesson 2: Accept fast, repair laterSave the check-in, queue its check-in number and hand back a receipt at once, then let a consumer function, the next free mechanic, write the repair tasks afterwards on the workshop’s own account.
  4. Lesson 3: Split the notes into repair tasksLet Forge LLM split the check-in notes into separate repairs, check its answer, then write one repair task per fault and tick each off, so that if Forge handles the same check-in again it never writes one twice.
  5. Lesson 4: Write the repair reportAfter the repair tasks, write one Confluence page that lists them, and comment its link on each repair task, once.
  6. Lesson 5: Send repairs to the expertAdd a second trigger that watches for repairs marked for the expert and moved to Approved for expert, checks four conditions (the lesson calls them gates), and sends each one on with a comment, exactly once.
  7. Lesson 6: Add the diagnosis expertAdd a Rovo agent to the app with two actions, one that looks up the car with the Level 1 car data file and one that publishes diagnosis notes, both as the person chatting.
  8. Lesson 7: Compare with a Studio agentBuild an agent in Rovo Studio in the browser, with no code, let it work a repair sent to the expert, and compare it with the diagnosis expert your app brings.
  9. Lesson 8: Take online bookingsoptionalGive the app a web trigger, a web address (URL) an online booking system can send bookings to, guarded by a booking code kept in an encrypted variable.

Type at least two letters.