Red Hat Training
A Red Hat training course is available for Red Hat Process Automation Manager
Chapter 9. Milestones
Milestones are a special service task that can be configured in the case definition designer by adding the milestone node to the process designer palette. When creating a new case definition, a milestone configured as Adhoc autostart
is included on the design palette by default.
Case management milestones usually occurs at the end of a stage, but they can also be the result of achieving other milestones. A milestone always requires a condition to be defined in order to track progress. Milestones react to case file data when data is added to a case. A milestone represents a single point of achievement within the case instance. It can be used to flag certain events, which can be useful for KPI tracking or identifying the tasks that are still to be completed.
Milestones can have three states:
- Active - The condition has been defined on the milestone but it has not been met.
- Completed - The milestone condition has been met, the milestone has been achieved, and the case can proceed to the next task.
- Terminated - The milestone is no longer a part of the case process and is no longer required.
While a milestone is available or completed it can be triggered manually using a signal or can be automatically started (by configuring Adhoc autostart
) when a case instance starts. Milestones can be triggered as many times as required, however, it is directly achieved when the condition is met.
9.1. Milestone configuration and triggering
Case milestones can be configured to start automatically when a case instance starts or they can triggered using a signal, which is configured manually during the case design.
Prerequisite
- A case project has been created in Business Central.
- A case definition has been created.
Procedure
- In the process designer, click to open the Object Library on the left of the design palette.
From the list, open Milestone and drag the
Milestone
object onto the palette.- With the milestone node selected, click to open the Properties panel on the right.
-
Open Assignments to add a completion condition. Milestones include a
condition
parameter by default. -
To define the completion condition to for the milestone, select
Constant
from the list. The condition must be provided using the Drools syntax. Configure the
Adhoc autostart
property.-
Set this property to
true
for milestones that are required to start automatically when a case instance starts. -
Set this property to
false
for milestones that are to be triggered by a signal event.
-
Set this property to
(Optional) Configure a signal event to trigger a milestone once a case goal has been reached.
- With the signal event selected in the case design palette, open the Properties panel on the right.
-
Set the
Signal Scope
property toProcess Instance
. Open the
SignalRef
expression editor and type the name of the milestone to be triggered.Click Ok to finish.
9.2. IT Orders case milestones
Milestones are configured in the process designer by adding a milestone node to the design palette.
The following milestones are configured in the IT Orders sample project:
Hardware spec ready
This milestone is reached when the required hardware specification document is completed. This is configured using the following condition:
org.kie.api.runtime.process.CaseData(data.get("hwSpec") != null)
Adhoc autostart
is enabled for this milestone.Manager decision
This milestone is reached when the
managerDecision
variable has been given a response. It is configured using the following condition:org.kie.api.runtime.process.CaseData(data.get("managerDecision") != null)
Adhoc autostart
is enabled for this milestone.Milestone 1: Order placed
This milestone is in a wait state until the completion condition is met.
The condition for this milestone is that a case file variable named
ordered
exists with the valuetrue
. This is configured using the following condition:org.kie.api.runtime.process.CaseData(data.get("ordered") == true)
A script task then sends a notification that the hardware order has been placed.
Adhoc autostart
is enabled for this milestone.Milestone 2: Order shipped
The condition for this milestone is that a case file variable named
shipped
istrue
. This is configured using the following condition:org.kie.api.runtime.process.CaseData(data.get("shipped") == true)
The
Send to tracking system
script is executed when the condition is met.Adhoc autostart
is not enabled for this milestone. Instead, it is triggered by a signal event when the order is ready to be sent.Milestone 3: Delivered to customer
The condition for this milestone is that a case file variable named
delivered
istrue
. This is configured using the following condition:org.kie.api.runtime.process.CaseData(data.get("delivered") == true)
A
Customer satisfaction survey
task is created when the condition is met.Adhoc autostart
is not enabled for this milestone. Instead, it is triggered by a signal event after the order has successfully shipped to the customer.