Using the Questionnaire Component

You can use the questionnaire component with your app.

This task shows you how to:

Register an App to Use the Questionnaire Component

Each app that uses the questionnaire component, must register the app name and the name of the app-specific page object for configuring the apps behavior for questionnaires.

  1. Open the Questionnaire-Registry.xml file located in ../Apps/V6R2022x/Modules/ENOQuestionnaire/AppInstall/Programs/Questionnaire-Registry.xml.
  2. Register the app name and the name of the app-specific page object.

    For example,

    <registries>
    <registry appname="QUC" page="Questionnaire-QUC"/>
    </registries>
    

Configuring the App-Specific Page Object

To use the questionnaire component, you must install an app-specific page object that configures the behavior for the app.

  1. Install an app-specific page object.
  2. Add or edit these lines:

    <appconfig appname="QUC">
    		 <contextlist>
    			 <context type="type_ControlledDocumentTemplate">
    				 <resolutions>
    					 <resolution>
    						 <type>type_RouteTemplate</type>
    						 <policy>policy_RouteTemplate</policy>
    						 <state>Active</state>
    					 </resolution>
    			      </resolutions>
    			      <submitaction>
    	 		     <!—See below for possible values 
                             </submitaction>
    			</context>
    		</contextlist>
    </appconfig>
    
    -where
    • appconfig - defines the root node that includes the attribute specifying the app name. The appconfig attribute is required.
    • contextlist - contains the context definition. The contextlist attribute is required.
    • context type - specifies the definition for a particular context that includes an optional type attribute that specifies the symbolic name of the type on which the questionnaire is defined by the Leader. At least one context type attribute is required.
      Note: If your app supports questionnaires on controlled document templates that are answered on the instance of the template, the symbolic name of the type of template must be specified on the context type. If your app supports stand-alone questionnaires, do not specify the context type.
    • resolutions - contains the list of resolution nodes. The resolutions attribute is optional.
    • resolution - specifies the type, policy, and state of the objects that can be assigned as related data to the questionnaire. The resolution attribute is optional.
    • submitaction - contains a type attribute that specifies the app-specific handler on submitting the questionnaire. The questions and answers are in json format. The submitaction attribute is required.

      The submitaction - attributes can be a qualified Java class definition, an mweb module path, the URL, or the name of the form. For example:

      <submitaction type="class">
      <class>com.dassault_systemes.enovia.questionnaire.SubmitQuestionnaire</class>
      </submitaction> 
      <submitaction type="mweb">
      <module>DS/ENOQuestionaireUX/scripts/view/ContextQuestionnaireView</module>
      <function>validateOptions</function>
      </submitaction>
      <submitaction type="url">
      <url>../common/emxCreate.jsp?</url><arguments>type=type_QualitySystemDocument&amp;createJPO=ENODCDocument:createDocument</arguments>
      </submitaction>
      <submitaction type="form">
      <form>QUCCreateDocument</form><arguments>type=type_QualitySystemDocument&amp;createJPO=ENODCDocument:createDocument</arguments>
      </submitaction>
      

    Note: Quality-based Document Control uses <submitaction type="form">.