PIF-XML sample document
From: http://www.xmls.com/pif/pif.xml
Date:  June 13, 1998

<?XML VERSION="1.0"?>
<!DOCTYPE pif SYSTEM "http://www.xmls.com/pif/pif.dtd">

<!-- this example based on http://ccs.mit.edu/pif8.html -->
<!-- also see http://www.xmls.com/pif/ -->
   
<pif>

<!-- Project and team definitions -->

<activity id="EXAMPLE-PROJECT">
  <documentation>A project is the top level activity of this activity elaboration hierarchy. The component attribute lists the subactivities of the project.</documentation>
  <name>The Example Project Process</name>
  <component href="ARCHITECTURE-DESIGN-1"/>
  <component href="ELECTRICAL-DESIGN-2"/>
  <component href="MECHANICAL-DESIGN-3"/>
  <component href="DESIGN-REVIEW-4"/>
  </activity>

<agent id="DESIGN-TEAM-1">
  <documentation>A project team is composed of AGENTS, which as a whole can be viewed as an AGENT itself.</documentation>
  <name>Project Design Team</name>
  <component href="ARCHITECT-1"/>
  <component href="ELECTRICAL-ENGINEER-2"/>
  <component href="MECHANICAL-ENGINEER-3"/>
  <component href="PROJECT-MANAGER-4"/>
  </agent>

<performs id="TEAM-PERFORMS-PROJECT">
  <actor href="DESIGN-TEAM-1"/>
  <activity-ref href="EXAMPLE-PROJECT"/>
  </preforms>

<!-- Architectural design and Architect-1 -->

<activity id="ARCHITECTURE-DESIGN-1">
  <documentation>This is the first activity of the example project. It starts when a contract is made. It produces an architectural design which will be followed by electrical and mechanical design.</document>
  <name>Architecture Design</name>
  <end href="ARCHITECTURE-DESIGN-1-END-TIMEPOINT"/>
  </activity>

<timepoint id="ARCHITECTURE-DESIGN-1-END-TIMEPOINT">
  <documentation>The end TIMEPOINT of the ARCHITECTURE-DESIGN-1 activity, among other things.</documentation>
  <name>End Timepoint for Architecture Design</name>
  </timepoint>

<agent id="ARCHITECT-1">
  <name>Robert Callahan</name>
  <capability href="ARCHITECTURE-SKILL"/>
  </agent>

<performs id="PERFORMS-1">
  <actor href="ARCHITECT-1"/>
  <activity-ref href="ARCHITECTURE-DESIGN-1"/>
  </performs>

<!-- Electrical Design and Electrical-Engineer-2 -->

<activity id="ELECTRICAL-DESIGN-2">
  <documentation>This is the second activity of the project. This activity can begin only after ARCHITECTURE-DESIGN-1 is completed. It can (but does not necessarily) occur in parallel with MECHANICAL-DESIGN-3.</documentation>
  <name>Electrical Design</name>
  <begin href="ELECTRICAL-DESIGN-2-BEGIN-TIMEPOINT"/>
  <end href="ELECTRICAL-DESIGN-2-END-TIMEPOINT"/>
  </activity>

<timepoint id="ELECTRICAL-DESIGN-2-BEGIN-TIMEPOINT">
  <documentation>The begin TIMEPOINT of the ELECTRICAL-DESIGN-2 activity, among other things</documentation>
  <name>Begin Timepoint for ELECTRICAL-DESIGN-2</name>
  </timepoint>

<timepoint id="ELECTRICAL-DESIGN-2-END-TIMEPOINT">
  <documentation>The end timepoint of the ELECTRICAL-DESIGN-2 activity, among other things</documentation>
  <name>End Timepoint for ELECTRICAL-DESIGN-2</name>
  </timepoint>

<before id="ARCH-BEFORE-ELECTRIC">
  <preceding-timepoint href="ARCHITECTURE-DESIGN-1-END-TIMEPOINT"/>
  <succeeding-timepoint href="ELECTRICAL-DESIGN-2-BEGIN-TIMEPOINT"/>
  </before>

<agent id="ELECTRICAL-ENGINEER-2">
  <documentation>This engineer has two skills, one is electrical and the other is mechanical.  She is responsible for both electrical design and design review.</documentation>
  <name>Cristina Marconi</name>
  <capability href="ELECTRICAL-SKILL"/>  
  <capability href="MECHANICAL-SKILL"/>
  </agent>

<performs id="PERFORMS-2">
  <actor href="ELECTRICAL-ENGINEER-2"/>
  <activity-ref href="ELECTRICAL-DESIGN-2"/> 
  </performs>

<!-- Mechanical Design Mechanical-Engineer-3 -->

<decision id="IF-ARCHITECTURE-DESIGN-1-DELAYED">
  <documentation>The activity that decides what to do after checking if ARCHITECTURE-DESIGN-1 is delayed or not.</documentation>
  <begin href="IF-ARCHITECTURE-DESIGN-DELAYED-BEGIN-TIMEPOINT"/> 
  <if language="JavaScript">
    <!-- script should go here -->
    <component href="ARCHITECTURE-DESIGN-1-DELAYED"/>
    <!-- the question remains how to best create PIF-SENTENCES in XML-->
    </if>
  <then href="MECHANICAL-DESIGN-4"/>
  <else href="MECHANICAL-DESIGN-3"/>
  </decision>

<activity-status id="ARCHITECTURE-DESIGN-1-DELAYED">
  <documentation>The ARCHITECTURE-DESIGN-1 is delayed at the beginning of the DECISION activity, IF-ARCHITECTURE-DESIGN-DELAYED</documentation>
  <activity-ref href="ARCHITECTURE-DESIGN-1"/>
  <status>DELAYED</status>
  <when href="IF-ARCHITECTURE-DESIGN-DELAYED-BEGIN-TIMEPOINT"/>
  </activity-status>

<timepoint id="IF-ARCHITECTURE-DESIGN-DELAYED-BEGIN-TIMEPOINT">
  <documentation>The begin timepoint of the IF-ARCHITECTURE-DESIGN-DELAYED activity</documentation>
  <name>Begin Timepoint for IF-ARCHITECTURE-DESIGN-DELAYED</name>
  </timepoint>

<activity id="MECHANICAL-DESIGN-3">
  <documentation>This activity can begin only if ARCHITECTURE-DESIGN-1 is completed in time.  It can (but not necessarily) occur in parallel with ELECTRICAL-DESIGN-2.</documentation>
  <name>Mechanical Design</name>
  <begin href="MECHANICAL-DESIGN-3-BEGIN-TIMEPOINT"/>
  <end href="MECHANICAL-DESIGN-3-END-TIMEPOINT"/> 
  </activity>

<timepoint id="MECHANICAL-DESIGN-3-BEGIN-TIMEPOINT">
  <documentation>The begin timepoint of the MECHANICAL-DESIGN-3 activity, among other things</documentation>
  <name>Begin Timepoint for Mechanical Design 3</name>
  </timepoint>

<timepoint id="MECHANICAL-DESIGN-3-END-TIMEPOINT">
  <documentation>The End timepoint of the MECHANICAL-DESIGN-3 activity, among other things</documentation>
  <name>End Timepoint for Mechanical Design 3</name>
  </timepoint>


<activity id="MECHANICAL-DESIGN-4">
  <documentation>This activity can begin only if ARCHITECTURE-DESIGN-1 is delayed.  It can (but not necessarily) occur in parallel with ELECTRICAL-DESIGN-2.</documentation>
  <name>Mechanical Design 4</name>
  <begin href="MECHANICAL-DESIGN-4-BEGIN-TIMEPOINT"/>
  <end href="MECHANICAL-DESIGN-4-END-TIMEPOINT"/>
  </activity>

<timepoint id="MECHANICAL-DESIGN-4-BEGIN-TIMEPOINT">
  <documentation>The begin TIMEPOINT of the MECHANICAL-DESIGN-4 activity, among other things</documentation>
  <name>Begin Timepoint for Mechanical Design 4</name>
  </timepoint>

<timepoint id="MECHANICAL-DESIGN-4-END-TIMEPOINT">
  <documentation>The End Timepoint of the MECHANICAL-DESIGN-4 activity, among other things</documentation>
  <name>End Timepoint for Mechanical Design 4</name>
  </timepoint>

<before id="ARCHITECTURE-DESIGN-1-BEFORE-MECHANICAL-DESIGN-3">
  <preceding-timepoint href="ARCHITECTURE-DESIGN-1-END-TIMEPOINT"/>
  <succeeding-timepoint href="MECHANICAL-DESIGN-3-BEGIN-TIMEPOINT"/>
  </before>

<before id="ARCHITECTURE-DESIGN-1-BEFORE-MECHANICAL-DESIGN-4">
  <preceding-timepoint href="ARCHITECTURE-DESIGN-1-END-TIMEPOINT"/>
  <succeeding-timepoint href="MECHANICAL-DESIGN-4-BEGIN-TIMEPOINT"/>
  </before>

<entity id="MECHANICAL-SKILL">
  <name>Mechanical Skill</name>
  </entity>

<entity id="SPECIAL-MECHANICAL-SKILL">
  <name>Special Mechanical Skill</name>
  </entity>

<entity id="ELECTRICAL-SKILL">
  <name>Electrical Skill</name>
  </entity>

<entity id="MANAGEMENT-SKILL"> 
  <name>Management Skill</name>
  </entity>

<agent id="MECHANICAL-ENGINEER-3">
  <name>Gary Fassbinder</name>
  <capability href="MECHANICAL-SKILL"/>
  </agent>

<performs id="PERFORMS-3">
  <actor href="MECHANICAL-ENGINEER-3"/>
  <activity-ref href="MECHANICAL-DESIGN-3"/>
  </performs>

<!--Nobody has been assigned yet to the MECHANICAL-DESIGN-4, but whoever does it has to have the special-mechanical-skill-1. -->
<performs id="PERFORMS-4">
  <activity-ref href="MECHANICAL-DESIGN-4"/>
  <constraint language="JavaScript">
    <!-- script should go here -->
    ?SELF.Actor.Capability SPECIAL-MECHANICAL-SKILL-1
    <!-- the question remains how to best create PIF-SENTENCES in XML -->
    </constraint>
  </performs>

<!-- Design Review and Project Manager -->
<activity id="DESIGN-REVIEW-5">
  <documentation>This is the last activity of the project.  This activity can begin only after both ELECTRICAL-DESIGN-2 and MECHANICAL-DESIGN-3 (or MECHANICAL-DESIGN-4) are completed.  It has four responsible AGENTs, and this activity can be viewed as a design-review meeting.  All team members must participate.</documentation>
  <name>Design Review</name>
  <begin href="DESIGN-REVIEW-5-BEGIN-TIMEPOINT"/>
  </activity>

<timepoint id="DESIGN-REVIEW-5-BEGIN-TIMEPOINT">
  <documentation>The Begin timepoint of the DESIGN-REVIEW-5 activity, among other things</documentation>
  <name>Begin Timepoint for Design Review 5</name>
  </timepoint>

<before id="ELECTRICAL-BEFORE-DESIGN-REVIEW">
 <preceding-timepoint href="ELECTRICAL-DESIGN-2-END-TIMEPOINT"/>
 <succeeding-timepoint href="DESIGN-REVIEW-5-BEGIN-TIMEPOINT"/>
 </before> 

<before id="MECHANICAL-3-BEFORE-DESIGN-REVIEW">
 <preceding-timepoint href="MECHANICAL-DESIGN-3-END-TIMEPOINT"/>
 <succeeding-timepoint href="DESIGN-REVIEW-5-BEGIN-TIMEPOINT"/>
 </before>

<before id="MECHANICAL-4-BEFORE-DESIGN-REVIEW">
  <preceding-timepoint href="MECHANICAL-DESIGN-4-END-TIMEPOINT"/>
  <succeeding-timepoint href="DESIGN-REVIEW-5-BEGIN-TIMEPOINT"/>
  </before>

<agent id="PROJECT-MANAGER-4">
  <documentation>This AGENT is the manager of this project.  She is responsible for decision-making whenever a exception occurs during the process of the project.  She is also co-responsible for the design-review activity.</documentation>
  <name>Ann Rollins</name>
  <capability href="MECHANICAL-SKILL"/> 
  <capability href="ELECTRICAL-SKILL"/> 
  <capability href="MANAGEMENT-SKILL"/>
  </agent>

<performs id="PERFORMS-5">
  <agent href="DESIGN-TEAM-1"/>
  <activity-ref href="DESIGN-REVIEW-5"/>
  </performs>

</pif>





