3: Terminate a Process
If the patient isn’t suffering form weight loss, the protocol we are modelling is not applicable and clinicians should not use it. In this chapter you’ll modify the process-description so that it will terminate under these conditions.
The protocol can be terminated by terminating the top-level plan.
Two plan properties can be used to interrupt a process:
- Termination condition: once this condition is met, the plan terminates, i.e., the plan state is set to completed, and all tasks within the plan that have not been completed are discarded.
- Abort condition: once this condition is met, the plan aborts, i.e., the plan state is set to discarded, and all tasks within the plan that have not been completed are discarded as well.
If a task is scheduled to run after a plan, terminating that plan means that the task is considered for execution by the Tallis engine. If, on the other hand, that plan is aborted, the downstream task is discarded.
To download the process-description created in the previous chapter select File > Load Process Description From Web Repository. If you are logged in, the Load Process Description dialog appears; otherwise, you have to log in (if you don’t have a personal account, use the guest account: User Name = Guest; Password = testpass). Navigate to World\Tutorials and select and load Chapter02_collect_data.
1. Open the Process-Description That Was Created in Chapter 2
For more information about opening files see Step 1 of Chapter 2.
2. Plan Termination
Select the Management of weight loss (simplified) plan.
In the Plan Specific Attributes panel enter the following expression:
Termination Condition: | Problem != "Weight loss" |
3. Save the Process-Description
For more information about saving see Step 6 of Chapter 1.
4. Run the Process-Description in the Tallis Tester
For more information about running a process-description see Step 7 of Chapter 1.
- The top-level Plan, Management of weight loss (simplified) and the Patient problem enquiry are both in progress. This is indicated by the yellow colour of their icons in the tree view.
- The source of the Patient problem enquiry is displayed in the Requested Data panel.
- On the Requested Data panel, click Add All.
- Select constipation and click Commit.
- The top-level plan – the whole process-description, that is – becomes completed.
Re-run the process-description to test what happens when you enter weight loss instead of constipation in the patient problem enquiry (for more information about restarting see Step 7 of Chapter 1).
Exit the Tester before going on to the next chapter.