As mentioned above, when writing a wizard to handle the creation of an evidence record, you should try to keep it to two pages, the first for selecting related records, and the second for entering the evidence specific information. Both pages should be set to the same height using the WINDOW_OPTIONS attribute of the <PAGE> element.
Any evidence type that has higher level relationships that must be selected when it is being created, e.g. Parent, PreAssociation, must supply a default wizard that allows the user to select a suitable record for that relationship. This is the main create wizard and is used from all the high level workspaces such as EvidenceFlow, Dashboard, Active Evidence etc. As a result, the first page of this wizard should be considered as the evidence types main create page for purposes of configuration (see the next section).
As each evidence record can be viewed as a Business Object in its own tab, and any child evidence types can also be created from there, it follows that each evidence type must provide a suitable wizard or standalone create page that is suitable for use from these locations, where one of its relationships is already selected implicitly.
There are infrastructure methods in place to support these wizards such as the facade method Evidence.listBusinessObjects which will return a list of Business objects of a given type.
Type B requires a wizard that allows selection of a record of Type A.
Type B also requires a standalone create page that takes as a parameter an evidenceID and evidenceType of an implicitly selected record. This way, when viewing an object of Type A, a child record can be created without the need to select a parent record.
Type B requires a standalone create page
Type C requires a wizard that allows selection of a record of Type A and of Type B
Type C requires a second wizard that only allows selection of Type A and takes an evidenceID and type of Type B as a parameter.
Type C requires a third wizard that only allows selection of Type B and takes an evidenceID and type of Type A as a parameter.
Type C does NOT require a standalone create page, as there is nowhere that both parents can be implicitly selected.
The following example code is of a wizard select page, using the single select widget. Note the use of an action phase server interface to read the latest Evidence ID, and Type from the chosen evidence object.
<PAGE
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
WINDOW_OPTIONS="height=400,width=700"
xsi:noNamespaceSchemaLocation="file://Curam/UIMSchema.xsd"
PAGE_ID="MyProduct_createChildSelectParentEvidence"
>
<!-- Page Title Etc -->
<MENU MODE="WIZARD_PROGRESS_BAR">
<CONNECT>
<SOURCE
PROPERTY="MyChildEntity.wizardMenu"
NAME="CONSTANT"
/>
</CONNECT>
</MENU>
<SERVER_INTERFACE
CLASS="Evidence"
OPERATION="listPossibleRelatedObjects"
NAME="PARENTLIST"
/>
<SERVER_INTERFACE
CLASS="MyProductEvidenceFacade"
NAME="PARENTPARAMS"
OPERATION="getEvidenceAndCaseFromSuccession"
PHASE="ACTION"
/>
<LIST>
<CONTAINER WIDTH="5">
<WIDGET TYPE="SINGLESELECT">
<WIDGET_PARAMETER NAME="SELECT_SOURCE">
<CONNECT>
<SOURCE
PROPERTY="result$dtls$successionID"
NAME="PARENTLIST"
/>
</CONNECT>
</WIDGET_PARAMETER>
<WIDGET_PARAMETER NAME="SELECT_TARGET">
<CONNECT>
<TARGET
PROPERTY="key$successionID"
NAME="PARENTPARAMS"
/>
</CONNECT>
</WIDGET_PARAMETER>
</WIDGET>
</CONTAINER>
<!-- Display Fields -->
</LIST>
<ACTION_SET ALIGNMENT="RIGHT">
<ACTION_CONTROL
ALIGNMENT="LEFT"
LABEL="ActionControl.Label.Cancel"
IMAGE="CancelButton"
/>
<ACTION_CONTROL
TYPE="SUBMIT"
LABEL="ActionControl.Label.Next"
IMAGE="NextButton"
>
<LINK
SAVE_LINK="FALSE"
DISMISS_MODAL="FALSE"
PAGE_ID="MyProduct_createChildFromWizard"
>
<CONNECT>
<SOURCE PROPERTY="caseID" NAME="PAGE"/>
<TARGET PROPERTY="caseID" NAME="PAGE"/>
</CONNECT>
<CONNECT>
<SOURCE
PROPERTY="evidenceKey$evidenceID"
NAME="PARENTPARAMS"
/>
<TARGET PROPERTY="parEvID" NAME="PAGE"/>
</CONNECT>
<CONNECT>
<SOURCE
PROPERTY="evidenceKey$evType"
NAME="PARENTPARAMS"
/>
<TARGET PROPERTY="parEvType" NAME="PAGE"/>
</CONNECT>
</LINK>
</ACTION_CONTROL>
</ACTION_SET>
</PAGE>