Script flow migration

During script flow migration, a superseded IEG script is migrated to an IEG script. This new script is identified using the original script ID, a version number that will default to 1 unless the scriptID ends with the letter V followed by a number. In this case, the version will be set to that number. The type will be copied from the original script, but if it was empty it will become "DefaultType". The Quit and Finish pages are extracted from the application's IEGPlayerConfig.xml. If the Quit and Finish pages need to be modified manually, they have to be changed in the Script Definition file as well as in the script-level properties file.

The new script will contain one section that will not be displayed by default (as the concept of sections does not exist in superseded IEG scripts). The section title will be set to the original script name, and the entire content of the migrated script will reside in this section.

For each page from the original script (whether it's a top-level page or a child page), a new page will be added to the section. The new page ID and description are set to the question group ID and description, whereas the page title comes from the old page name. The presence of loopsize or precondition attributes will enclose the new pages into loop or condition elements.

Loop types used to be implicit, depending on the expression. They are now explicitly set on loop elements.

The progress bar is enabled by default and the progress value for each page is calculated by allocating weights equally.

Postconditions will automatically be replaced by validation elements.

The following example illustrates how the script flow gets migrated, firstly by showing a superseded IEG script definition before the migration process:

Figure 1. Superseded IEG Script Definition Before Migration
<?xml version="1.0" encoding="UTF-8"?>
<IEGScript id="SampleScript">
    <QuestionPageDefinition questionpageid="1" 
      questiongroupid="QuestionGroup1" loopsize="" precondition="">
	…
    </QuestionPageDefinition>
    <QuestionPageDefinition questionpageid="2" 
      questiongroupid="QuestionGroup2" 
      precondition="QuestionGroup1.Q1>0" 
      loopsize="">
	<postcondition id="ValueUnder100" 
	  expression="QuestionGroup2.Q1<100">
	    <message>
		<Translation id="en" 
		  value="Value must be under 100" />
	    </message>
	</postcondition>
	…
	<QuestionPageDefinition questionpageid="3" 
	  questiongroupid="QuestionGroup3" precondition="" 
	  loopsize="QuestionGroup2.Q1">
	    …
	</QuestionPageDefinition>
    </QuestionPageDefinition>
    <ScriptName>
	<Translation id="en" value="Sample Script" />
    </ScriptName>
    <ScriptDescription>
	<Translation id="en" value="" />
    </ScriptDescription>
</IEGScript>

The following XML sample represents the IEG Script Definition created by the migration tool, having operated on the above superseded Script Definition:

Figure 2. IEG Script Definition After Migration
<?xml version="1.0" encoding="UTF-8"?>
<ieg-script finish-page="IEGPlayer_summary" 
  quit-page="IEGPlayer_summary" show-sections="false" 
  show-progress-bar="true">
    <identifier id="SampleScript" scriptversionnumber="1" 
      type="DefaultType" />
    <section>
	<title id="Section.Title" />
	<question-page id="QuestionGroup1" entity="QuestionGroup1" 
	  progress="0" … >
	    …
	</question-page>
	<condition expression="QuestionGroup1.Q1>0">
	    <question-page id="QuestionGroup2" 
	      entity="QuestionGroup2" progress="33" … >
		…
		<validation expression="QuestionGroup1.Q1 < 100">
		    <message 
		      id="QuestionGroup2.ValueUnder100.Message" />
		</validation>
		…
	    </question-page>
	    <loop loop-type="for" expression="QuestionGroup2.Q1" 
	      entity="QuestionGroup3">
		<question-page id="QuestionGroup3" 
		  entity="QuestionGroup3" progress="67" … >
		    …
		</question-page>
	    </loop>
	</condition>
	<summary-page id="SummaryPage" progress="100" … >
	    …
	</summary-page>
    </section>
</ieg-script>