home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Thomson (Residential)
/
TGSTPv7203.iso
/
mac
/
HIW
/
xml
/
mod_setup_includefiles.xml
< prev
next >
Wrap
Extensible Markup Language
|
2008-02-11
|
3KB
|
69 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fsm SYSTEM "fsm.dtd">
<!--
Input properties:
- profile: (required)
Exit events:
- finished: Files are uploaded.
- failed: An error occured while uploading the files.
-->
<fsm type="listIteratorFsm">
<property key="profile" required="yes"/>
<states>
<!-- iteration state -->
<state type="listIterator" name="fileIterator"/>
<!-- read the file -->
<state type="readFile" name="read" weight="1">
<property key="type" value="text"/>
</state>
<!-- upload the file -->
<state type="actionUploadFile" name="upload" weight="3">
<property key="" value=""/>
</state>
</states>
<events>
<event name="finished"/>
<event name="failed"/>
</events>
<transitions>
<!-- iterate -->
<transition startstate="fileIterator">
<!-- take the includefilelist from the profile, put the templatepath before each item, append isp.def (in the app dir) to this list -->
<propertymap target="fsm.fileList" function="append(gres(property($fsm.profile, 'hostwizardIncludefileList'), '^(.*)$', concat($app.applicationPath, '/', $app.templatePath, '/\1')), concat($app.applicationPath, '/isp.def'))"/>
<propertymap target="list" function="$fsm.fileList"/>
<propertymap target="currentItem" function=""/>
</transition>
<!-- read and upload the next file -->
<transition fromstate="fileIterator" tostate="read" event="nextItem">
<propertymap target="fsm.currentPath" function="$currentItem"/>
<propertymap target="path" function="$currentItem"/>
</transition>
<transition fromstate="read" tostate="upload" event="finished">
<propertymap target="device" function="$app.device"/>
<propertymap target="content" function="$content"/>
<!-- get filename without path -->
<propertymap target="fileName" function="substr($fsm.currentPath, add(pos($fsm.currentPath, '/', -1), 1))"/>
</transition>
<!-- next iteration -->
<transition fromstate="read" tostate="fileIterator" event="fileNotFound|failed">
<propertymap target="list" function="$fsm.fileList"/>
<propertymap target="currentItem" function="$fsm.currentPath"/>
</transition>
<transition fromstate="upload" tostate="fileIterator" event="finished">
<propertymap target="list" function="$fsm.fileList"/>
<propertymap target="currentItem" function="$fsm.currentPath"/>
</transition>
<!-- no more managers, finish -->
<transition fromstate="fileIterator" toexit="finished" event="lastItem"/>
<!-- catch errors -->
<transition fromstate="upload" toexit="failed" event="failed"/>
</transitions>
</fsm>