Process Flow

I’ve created a process for Foreman. This shows a typical flow of a case through all the different users. Click to enlarge.



User Journey: Authorisers

Authorisers have the least amount of permissions on Foreman. They are allowed to authorise/reject cases and to view those cases. The administrative panel also has an option to allow authorisers to see tasks and evidence associated with those cases. When a requester selects an authoriser from their department when adding a new case, an email is sent to the authoriser for them to review the case details and approve/reject. If the authoriser rejects the case, the requester is able to edit the case and resubmit for authorisation. Case work cannot start until the case has been authorised.

  1. The requester has created a new case. The status is “Awaiting authorisation” and Frank has been sent an email.auth1
  2. Frank logs in and sees all the cases he must authorise. By clicking on the case name, he will see the case details.auth2
  3. Frank can now click on authorise/reject this case after reviewing the detailsauth3
  4. The case history appears at the top of the page. In this instance, Frank rejects the caseauth4
  5. The requester Rafael will receive an email with Frank’s reason for rejection. Rafael can edit the case, and this automatically changes the status from Rejected to Pending, and sends another email to Frank to authorise. Below, Frank accesses the authorise page again. The case history shows the changes Rafael has made to the justification, and this time, Frank approves the case. auth5

Here is a summary of the permissions a case authoriser has:

Cases add new case N
authorise case Y
view cases associated with Y
view other cases N
update case status N
close & archive case N
edit case details N
link with other cases N
add/edit case managers N
move tasks to other cases N
upload file N
generate report N
Task add new task N
view task associated with Y*
view other tasks N
edit task details N
assign someone as investigator/QA N
assign self as investigator/QA N
update task status N
upload task file N
update task notes N
complete task investigation N
complete task QA N
Evidence add evidence N
view evidence associated with Y*
view evidence N
check in / out evidence N
add evidence photo N
edit evidence details N
add evidence QR code N
move evidence to other case N

* – denotes this is an admin option to allow/disallow this. Authorisers cannot see cases (and associated tasks & evidence) that they have not authorised.

How to deploy to a web server

Foreman comes with the default Python server, which when run will run Foreman in the localhost on port 5000. This is fine when it’s just one person using Foreman or its being used on a shared machine, bet it’s likely you’ll want to deploy Foreman onto a webserver so it can be accessed by lots of people. Below is a guide if you are using Apache on Linux.

  1. Download mod_wsgi. On Debian this can be done via:
apt-get install libapache2-mod-wsgi
  1. Create a foreman.wsgi file with the following contents inside the foreman folder:
#!/usr/bin/env python
import sys, site
from os import path


site.addsitedir('[Path to Foreman package]')
config = '[Path to Foreman config file]'


def make_app():
from foreman.utils.utils import setup

from foreman.application import make_app
return make_app()

application = make_app()
  1. Finally, Apache needs configuring. An example is below:
<VirtualHost *>

    WSGIDaemonProcess foreman user=user1 group=group1 processes=2 threads=5
    WSGIScriptAlias / [Path to WSGI file]/foreman.wsgi

    <Directory [Path to Foreman]>
        WSGIProcessGroup foreman
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all

Documentation on mod_wsgi can be found here.