Skip to content

Commit

Permalink
#27 - Allow for the case when no goal is currently executing. Basic
Browse files Browse the repository at this point in the history
capabilities work in Verifier on this version, but testing of goals has
not yet begun.
  • Loading branch information
John Wolfe committed Jul 11, 2014
1 parent 1eb70d3 commit cbd5850
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@ INSERT INTO O_TFR
"0c2280ac-677d-4cc7-a34f-fde18b6c9506",
0,
'// Return the indicator value representing the disposition of
// the currently executing goal.
// the currently executing goal, if one exists. If there is
// no currently executing goal, return Flat.

// Find the currently executing goal associated with the singleton
// instance of the workout session.
// Find the currently executing goal (if one exists) associated
// with the singleton instance of the workout session.
select any session from instances of WorkoutSession;
select one goal related by session->Goal[R11.''is currently executing''];

// Convert the disposition of the currently executing goal
// to a UI indicator.
// (if it exists) to a UI indicator.
indicator = Indicator::Flat;
if ( goal.disposition == GoalDisposition::Increase )
indicator = Indicator::Up;
elif ( goal.disposition == GoalDisposition::Decrease )
indicator = Indicator::Down;
if ( not empty goal )
if ( goal.disposition == GoalDisposition::Increase )
indicator = Indicator::Up;
elif ( goal.disposition == GoalDisposition::Decrease )
indicator = Indicator::Down;
end if;
end if;

return( indicator );',
Expand Down

0 comments on commit cbd5850

Please sign in to comment.