Adding a Post-Condition to Task 1

The following code adds the post-condition to Task 1. The post-condition checks whether a geometry part exists in the Geometry > Parts manager node. If a part exists, the condition is satisfied.

  1. Return to the Task01ImportGeometry class.
  2. Locate the public Task01ImportGeometry() constructor.
  3. Add the following code to this constructor:
    // Makes sure that a geometry part is created.
    setPostconditions(Collections.singleton(InternalFlowConditions.createPartCondition()));

    where:

    • setPostconditions() sets the post-condition for the task.

    • Collections.singleton(InternalFlowConditions.createPartCondition()) is the condition that checks for a geometry part.

  4. Add the missing import.
  5. Save the file (Ctrl-S).