Advanced design

Understand the context

Each Oracle Forms request references a component that has been previously created by the server. If the request sequence changes, compared with the sequence recorded, then the components lifecycles must be taken into account:

For more information, see Oracle Forms: Design a scenario with iterations.

Component lifecycle

Each Oracle Forms component is created, then destroyed, by the server. These operations are carried out within the responses returned by the server. Between the creation of a component and its destruction, its properties are updated by the requests sent to the server.

This example shows the lifecycle of a text field:

  1. The server sends a response containing a message that creates a component named LOGIN_USERNAME_0.
    <DataMessage> 
      <actionCode>CREATE</actionCode> 
      <handlerName>LOGIN_USERNAME_0</handlerName> 
      <handlerId>15</handlerId> <handlerClassId>257</handlerClassId> 
      <properties> 
        <Property> 
          <id>TITLE</id> 
          <type>STRING</type> 
          <value objectClass="String">LOGIN_USERNAME_0</value> 
        </Property> 
        <Property> 
          <id>MAX_LENGTH</id> 
          <type>INTEGER</type> 
          <value objectClass="int">30</value> 
        </Property> 
        ... 
      </properties> 
    </DataMessage>

    The LOGIN_USERNAME_0 component is now valid. It can be updated in the subsequent requests.

  2. The client sends a request to update the LOGIN_USERNAME_0 component, containing the value u3 in the text field.
    <DataMessage> 
      <actionCode>UPDATE</actionCode> 
      <handlerName>LOGIN_USERNAME_0</handlerName> 
      <handlerId>15</handlerId> 
      <properties> 
        <Property> 
          <id>VALUE</id> 
          <type>STRING</type> 
          <value objectClass="String">u3</value> 
        </Property> 
        <Property> 
          <id>SELECTION</id> 
          <type>POINT</type> 
          <value objectClass="Point"> 
            <x>2</x> 
            <y>2</y> 
          </value> 
        </Property> 
        <Property> 
          <id>CURSOR_POSITION</id> 
          <type>INTEGER</type> 
          <value objectClass="int">2</value> 
        </Property> 
      </properties> 
    </DataMessage>
  3. The server sends back a response containing a message that destroys the LOGIN_USERNAME_0 component.
    <DataMessage> 
      <actionCode>DESTROY</actionCode> 
      <handlerName>LOGIN_USERNAME_0</handlerName> 
      <handlerId>15</handlerId> 
      <properties/> 
    </DataMessage>

    The LOGIN_USERNAME_0 component is now invalid. It can no longer be updated, since it no longer exists.

Correlate dynamic component names

During the recording, certain components may have a dynamic name. The following code shows a recorded request containing a component with a dynamic name:

</Dialog>
 <messages>
  <DataMessage>
   <actionCode>UPDATE</actionCode>
   <handlerName>Sales Orders (Vision Operations) - 63850, Business World</handlerName>
   <handlerId>289</handlerId>
   <properties>
    <Property>
     <id>EVENT_MENU</id>
     <type>INTEGER</type>
     <value objectClass="int">11077</value>
    </Property>
   </properties>
  </DataMessage>
  <TerminalMessage>
   <responseCode>1</responseCode>
  </TerminalMessage>
 </messages>
</Dialog>

When played back, the Virtual User fails to run correctly because the server has given the component a different name. In the previous example, the component name ends with 63850, Business World, which is its dynamic element. To get around this problem, simply delete the dynamic part of the component name to obtain the following XML:

</Dialog>
  <messages>
    <DataMessage>
      <actionCode>UPDATE</actionCode>
      <handlerName>Sales Orders (Vision Operations) - </handlerName>
      <handlerId>289</handlerId>
      <properties>
        <Property>
          <id>EVENT_MENU</id>
          <type>INTEGER</type>
          <value objectClass="int">11077</value>
        </Property>
      </properties>
    </DataMessage>
    <TerminalMessage>
      <responseCode>1</responseCode>
    </TerminalMessage>
  </messages>
</Dialog>

During runtime, NeoLoad will find the dynamic part of the component name and replace it in the played request.

Limitations

With advanced design, all the components lifecycles must be followed. When adding a loop in a Virtual User, it is vital for the components to be in the same state both at the start and at the end of the iteration. Loops will only work if this guideline is adhered to. Failure to do so will result in NL-OF-PLUGIN-ENGINE-03 -type errors when the Virtual User is run.

For more information, see Oracle Forms: Design a scenario with iterations.