IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

Creating an initial and final state through an operation state

About this task

The Operation state is used to access the database and analyze the data from the page before, where Java is used preform a required action with the flow. In this section the following will be discussed:
  • How to build a flow has a operation.
  • How to write code to send out an event defined in the operation state.
To create an initial and final state through an operation, take the following steps:

Procedure

  1. Create an XUI project and a processor transaction file (defined data and Context required).
  2. Create a initial state with an event named start.
  3. Create a final state and Choose OK as its exit event.
  4. Create two Page states and Add an event to the state (Since the flow has two pages).
    Note: Add Page JSP file to it, refer to section 2.3.
  5. Create an operation and add events as required by the user.
  6. Define and select an operation for the Operation state.

    The following steps will explain the process of accessing data from the XUI file and sending events from the operation:

    Below is an example of data that is defined within a context.

    An example of a XUI file.

    In this example the goal here is retrieve the required data, and determine if the balance is greater than the need to pay. If this is true then the final state is set to OK, otherwise it is set to Error.

    1. Retrieve data from the context by name of the data:

    2. Transmit the event:

      The event name "ok" and "error" written in the code should be the same names as the names defined in the operation state.

    3. Connect these states with transitions and ensure the names for the events are correct.



Feedback