%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  CONTEXT file
%%  by Willi Egger
%%  filename: 4-231.tex
%%  November 2002
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setupoutput[pdftex]
\setupbodyfont[ss,12pt]
\setupinteraction[state=start,level=all,color=red]
\setupcolors[state=start]

\usemodule[chart]

   \setupFLOWcharts
      [x=1,
       y=1,
       nx= 6,
       ny= 11,
       dx=\bodyfontsize,
       dy=\bodyfontsize,
       width=7\bodyfontsize,
       height=5\bodyfontsize]

\startbuffer[SchemaA]
\startFLOWchart[ChartA]
   \startFLOWcell
    \name{A}
    \location {2,1}
    \shape{62}
    \text{\goto{\bf A}[Str-SchemaB]}
    \connection[b,t]{BEGIN}
   \stopFLOWcell

   \startFLOWcell
    \name{BEGIN}
    \location {+0,+1}
    \shape{procedure}
    \text{Begin \\ Schema A}
    \connection[b,t]{Stap1}
   \stopFLOWcell

   \startFLOWcell
    \name{Stap1}
    \location {+0,+1}
    \shape{product}
    \text{Product A}
    \connection[b,t]{Stap2}
   \stopFLOWcell

   \startFLOWcell
    \name{Stap2}
    \location {+0,+1}
    \shape{action}
    \text{Product mengen}
    \connection [b,t]{Stap3}
   \stopFLOWcell

  \startFLOWcell
    \name{Bak}
    \location {-1,+0}
    \shape{product}
    \text{Bak}
    \connection[r,l]{Stap2}
   \stopFLOWcell

   \startFLOWcell
    \name{Stap3}
    \location {+1,+1}
    \shape{subprocedure}
    \text{Afvullen}
    \destination{Str-SchemaB}
    \connection[b,t]{EINDE}
    \connection[r,l]{Afvullen}
   \stopFLOWcell

   \startFLOWcell
    \name{Afvullen}
    \location{+1,+0}
    \text{\goto{\bf B}[Str-SchemaB]}
    \shape{62}
   \stopFLOWcell

   \startFLOWcell
    \name{EINDE}
    \location{-1,+1}
    \text{Einde}
    \shape{procedure}
   \stopFLOWcell
\stopFLOWchart
\FLOWchart[ChartA]
\stopbuffer

\startbuffer[SchemaB]
\startFLOWchart[ChartB]
   \startFLOWcell
    \name{B}
    \location {2,1}
    \shape{62}
    \text{\goto{\bf B}[Str-SchemaA]}
    \connection[b,t]{BEGIN}
   \stopFLOWcell

   \startFLOWcell
    \name{BEGIN}
    \location {+0,+1}
    \shape{procedure}
    \text{Begin \\ Schema B}
    \connection[b,t]{Stap1}
   \stopFLOWcell

   \startFLOWcell
    \name{Stap1}
    \location {+0,+1}
    \shape{product}
    \text{Product B}
    \connection[b,t]{Stap2}
   \stopFLOWcell

   \startFLOWcell
    \name{Stap2}
    \location {+0,+1}
    \shape{action}
    \text{Product afvullen}
    \connection [b,t]{EINDE}
   \stopFLOWcell

  \startFLOWcell
    \name{Bak}
    \location {-1,+0}
    \shape{product}
    \text{Bekers}
    \connection[r,l]{Stap2}
   \stopFLOWcell

   \startFLOWcell
    \name{EINDE}
    \location{+1,+1}
    \text{Einde}
    \shape{procedure}
   \stopFLOWcell
\stopFLOWchart
\FLOWchart[ChartB]
\stopbuffer


\startFLOWchart[ChartC]
   \startFLOWcell
    \name{C}
    \location {2,1}
    \shape{62}
    \text{\goto{\bf C}[Str-SchemaA]}
    \connection[b,t]{BEGIN}
   \stopFLOWcell

   \startFLOWcell
    \name{BEGIN}
    \location {+0,+1}
    \shape{procedure}
    \text{Begin \\ Schema C}
    \connection[b,t]{Stap1}
   \stopFLOWcell

   \startFLOWcell
    \name{Stap1}
    \location {+0,+1}
    \shape{product}
    \text{Product C}
    \connection[b,t]{Stap2}
   \stopFLOWcell

   \startFLOWcell
    \name{Stap2}
    \location {+0,+1}
    \shape{action}
    \text{Product afvullen}
    \connection [b,t]{EINDE}
   \stopFLOWcell

  \startFLOWcell
    \name{Bak}
    \location {-1,+0}
    \shape{product}
    \text{Bekers}
    \connection[r,l]{Stap2}
   \stopFLOWcell

   \startFLOWcell
    \name{EINDE}
    \location{+1,+1}
    \text{\blue Einde}
    \destination{Str-SchemaA}
    \shape{procedure}
   \stopFLOWcell
\stopFLOWchart



\starttext
\placecontent
\page

\section[Str-SchemaA]{Schema A}

\placefigure[left][str:schemaa]{none}{\externalfigure[SchemaA][type=buffer,height=.9\textheight]}


\section[Str-SchemaB]{Schema B}

\placefigure[left][str:schemab]{none}{\externalfigure[SchemaB][type=buffer,height=.9\textheight]}

\section[Str-SchemaC]{Schema C (native)}

\FLOWchart[ChartC]
\stoptext
