1 Introduction
close this book View the PDF document Extending Greenstone for Institutional Repositories : David Bainbridge, Wendy Osborn, Ian H. Witten, David M. Nichols
close this folder 4 Implementation
View the document 4.1 Macros
View the document 4.2 Controlling the workflow

4.2 Controlling the workflow

Figure 3 shows edited highlights of the macro file that produces the simple workflow shown in Figure 1. Key points in the file are:

·  _numsteps_, a compulsory macro that defines the number N of stages in this submission process.

· 
_step1content_, _step2content_, … _stepNcontent_ is the convention used to define the page content that is displayed, along with _stepNtext_ which controls what appears in the progress bar.

·  _step1text_ in this example is defined to be _textmeta_, another macro (defined at the bottom of Figure 2) which resolves through the language independence feature to “specify metadata” when viewed in English

·   _laststep_ controls how the workflow ends: for example, automatic building the collection, or going to the collection’s editor for review.

· 

</table></p>

<p>_depositorbar_</p>

</form>

}

_textmeta_ [l=en] {Specify Metadata}

Figure 3: Excerpt of macro file for producing the first step of the submission process for the Fine Arts Repository example.

Text Box: package depositor



_numsteps_ {1}



_textstep1_ {_textmeta_}

_laststep_ {build}

_textlaststep_ {_textbuild_}





_step1content_ {



<form name="depositorform" method=post action="/gsdlmod"

  enctype="multipart/form-data">

<input type=hidden name="p" value="about">



<center><h2>_textstep1_</h2></center>

<p>_textimagesimpledesc_</p>



<p><table>

<tr>

  <td>Filename:</td>

  <td> <input type=file name=dauserfile value="_userfile_" size=61></td>

</tr>



<tr>

  <td>Title:</td>

  <td> <input type=text name=damd.dc.Title value="_damd.dc.Title_"

          size=74></td>

</tr>



</table></p>





<p>_depositorbar_</p>

</form>

}



_textmeta_ [l=en] {Specify Metadata}

Figure 3: Excerpt of macro file for producing the first step of the submission process for the Fine Arts Repository example.
_depositorbar_ is defined by the runtime system (the depositor action). It is formed by composing the information represented in _numsteps_ with _step1text_, _step2text_ and so on. _laststep_ specifies which of the predefined endings terminates the submission process (e.g. _contentbuild_ and _textbuild_). Since these two are stored in the macro files they can be refined and extended as needed.