Building an Advanced Two-Phase Case Management System in the AgileApps Cloud

From AgileApps Support Wiki
Revision as of 09:49, 11 April 2017 by imported>Aeric

Overview

This paper describes an advanced implementation of an Employee Onboarding application that creates a second case record and launches the attendant processes when the processes attached to the first record have been completed. It represents a deeper dive into the platform that demonstrates some of the things you can do with advanced rules and processes.

Notepad.png

Note: If you haven’t already read it, this article describes the basic application: Building a Dynamic Case Management Application in the AgileApps Cloud Links to those articles and other useful pages can be found in the support wiki’s Article Index at Article Index

The Goal: Set Up a Two-Phase Onboarding Process

The goal of the implementation is to create a process suitable for onboarding new employees, in two phases.

Requirements & Strategy
  • Manage the process in two phases, each with its own deadlines.
    • In the first phase, the organization has a week to prepare for the new employee
    • In the second phase, the organization has a day to get the person into their new position
  • Notifications should be sent if either of the two phases reaches 90% of its time limit.
Meeting the Challenge of Two-Phase Onboarding

The need for a two-phase approach represents a major challenge for this case study. That’s something the AgileApps case management platform was not originally designed to do. (It may well do so in the future, however, in response to needs like this one.) The strategy for meeting that challenge is to create two records for each case, and to use a combination of event-handing and rules to begin the second phase automatically when the first is done:

Utl.png

Here’s how it works:

1. When a new case is created, a Case Created event occurs.
The Rules associated with that event check to see which kind of case it is: Phase I or Phase II.
For a Phase I case, processes associated with Phase II are disabled, so they can’t be launched inadvertently, and Phase I processes are initiated. For a Phase 2 case, the reverse is true.
2. Track process completion.
When a process completed event occurs, run rules to determine which process it is, and set the appropriate flag in the case record to record the fact that it has been done.
3. Determine when the next phase can begin.
When all processes in Phase I have been completed, Phase II can begin.
4. If all of the flags are set, mark the current case as Resolved.
It could also be marked as Closed, which is almost the same thing, but when an HR Rep sees the Resolved status in their list of cases, they immediately know that Phase II is in progress.
5. Create the child case record for Phase II.
The new record points back to the original one, so the two remain tied together.
A flag is set to further indicate that this is a Phase II record.
6. Launch Phase II Processes.
Another flag in the record identifies it as a Phase II case, triggering the Case Created rule that disables processes for Phase I and enables those for Phase II.
7. Close the case.
When all onboarding preparations are complete, the case can be closed.
Mapping the Requirements to Platform Capabilities

The following table shows the functional capabilities used to implement the new system requirements.


Requirement

Functionality
Start Phase II only when Phase I is complete Use Rules triggered by Case Events to create records and initiate the appropriate processes.

Customize the Application

Start by opening the Employee Onboarding application created in the companion article: Building a Dynamic Case Management Application in the AgileApps Cloud

Add Additional Case Fields

Next you’ll add some additional fields that the Cases object needs. The need for them will become more apparent when the Business Processes are created. For now, as you go through the process just note the different kinds of fields, and take a moment to examine the many other field types that are available. (Note, too, that adding fields here gives you many more field type choices than you had in the Wizard.)

  1. Go to GearIcon.png > Case Management > Case Fields
  2. Click [New Field] to specify needed fields. As each is defined, click [Save & New].

(These values will be displayed as read-only. They are to be modified by the new processes.)


Field Label

Display Type

Notes
Onboarding Phase Picklist Values: Pre-Boarding, Onboarding. (Will equate to 1 and 2, respectively.)

Default : 'Pre-Boarding' (include the single quotes)

Parent Case Lookup Object Name: Onboardings

Lookup Field Configuration: Default (none). This field will be set by the system to connect the Phase 2 case record to the Phase 1 record.

3.When done adding the last field, click [Save].
Customize the Form

Go to

4.GearIcon.png > Case Management > Case Forms.
5. Click the Default Layout form.
6. Change the properties of Onboarding Phase and Parent Case, to Read Only, as they will be modified programmatically:
  • Click the Edit Field icon
  • For Field Attributes, select Read Only.
  • Click [Save].
7. Click and drag on the Move-arrows icons to change the position of the fields to create an arrangement like the one shown here:
Aa.png

Automating the Procedures

Here, you’ll set up two independent processes that will run as “parallel tracks” for a new employee. When both processes end, you’ll use events and rules to start the Phase II process. Later, you’ll ad d rules that use the case fields you added to track the process completions.

Define the First Phase I Process

Every active process in the system has a record associated with it. That record tracks the progress of the process for a given case. A Process is a template for those records. Underlying the template is a shared Process Model that defines the sequences of manual and automated tasks, potentially with conditional branching and other sophisticated features. This a simple two-step process, so the goal here is mostly to see how a process is constructed. Create the Process:

1. Go to GearIcon.png > Case Automation > Processes
2. Click [New Process]
3. Drag in a Start Event.
4. Drag in a User Task and fill in the task information:
Ab.png

Here, we’re telling the owner of the current case (the HR Rep) to get the background-information form filled out, and to deliver it to the security agency for verification. When this part of the process is reached, a task appears for the case in the Agent’s sidebar. When done, the Agent marks it as Complete. (You’ll see how that works in a moment.)

5. Click [Save].
Advanced Two-Phase Case System AgileApps Cloud 29 May 2015, pg 7
6. Create another User Task to get the results from the security agency.
Ac.png

Here, we have simply left the Form and Change Status fields empty, rather than choosing “None”. The effect is the same. (Were the background check to fail, we’ll assume the agent adds a note to the case and changes its status. But we’ll focus on the “happy path” here, and assume that everything succeeds.)

7. Align the tasks, and draw the arrows between them. Then click the second task, and select the End Event icon:
Ad.png