Hitachi

JP1 Version 12 JP1/Navigation Platform Development Guide


5.2.2 outputToNode method

When transition to a node that contains an I/O Plugin occurs, this method performs processing to output information to the transition destination node.

You can use this method to effectively implement data reference processing, such as applying information acquired from external systems, during node transition.

If you want to switch the I/O Plugin processing for each transition path at a Branch Node, determine the transition path from the transition source node by using the I/O Plugin outputToNode method, and then switch the processing.

Notes on the outputToNode method

Note that a method's execution results, other than error, are normal and warning.

Organization of this subsection

(1) Format

public Map<String, Object> outputToNode(HttpSession session, Map<String, Object> param);

(2) Arguments

(a) session

This argument stores the current session. To execute the setAttribute() method for the HttpSession object acquired in a plugin, do not specify any of the following names for the name argument of the setAttribute() method:

  • Name beginning with "ucnp"

  • Name beginning with "java."

  • Name beginning with "javax."

  • Name beginning with "javax.portlet."

  • Name beginning with "hptl"

  • Name beginning with "com.cosminexus"

  • Name beginning with "jp.co.hitachi.soft.portal"

You can also use the URL request parameter. To use this parameter, you must acquire the ucnpOptions parameter by using the ucnp.request.options key.

You can acquire the ucnpOptions parameter for each session or for each window ID. We recommend that you acquire the value of the ucnpOptions parameter for each window ID. For details about how to acquire the values for each window ID, see (b) param.

Reason why data acquisition for each session is not recommended

If multiple windows of Navigation Platform are displayed in the same session, the HTTP session is overwritten with the value of the ucnpOptions parameter of the window that you worked with last. As a result, information of the ucnpOptions parameters for previously used windows is deleted.

ucnp.request.options key

This key is used to acquire the value of the ucnpOptions parameter (specified for the URL) from the session. By specifying this key in the HttpSession.getAttribute() method, you can acquire the URL decoded value of the ucnpOptions parameter. If the ucnpOptions parameter is not specified for the URL, null is returned.

For details about a specification example of the ucnp.request.options key, see the specification example of the inputFromNode method in 5.2 IIoPluginController (server processing implementation interface).

(b) param

This argument stores the information sent from the client during execution of the I/O Plugin. The table below provides details. Do not update the param parameter.

Table 5‒7: Keys stored in param (outputToNode method)

No.

Key name

Value

Description

1

ucnp.next.params.map

Map<String,String>

When an I/O Plugin is executed, a Map containing the following key and value pair is passed:

  • Key

    Output parameter name of the I/O Plugin

  • Value

    Cache value of the Guide associated with the output parameter at the point before transition

Parameters not associated with the Guide are not contained in the key.

For details about cache values of Guide Parts, see 5.2.1(5) Cache values of Guide Parts.

2

ucnp.button.type

String

One of the following:

  • "start"

  • "show_next_page"

  • "show_previous_page"

  • "show_complete_page"

Indicates the type of the clicked button or the type of transition.

  • "start"

    Switch from the Terminal Node (start) to a Process Node.

    Alternatively, display the first Process Node not connected to the Terminal Node (start).

  • "show_next_page"

    Switch to the next node by clicking the button or directly selecting the node.

    Alternatively, switch to a Process Node for which the transition destination node exists or a Process Node with the Back button displayed.

  • "show_previous_page"

    Switch to the previous node by clicking the button or directly selecting the node.

  • "show_complete_page"

    Switch to a node with the Done button displayed.

    Alternatively, switch to a Process Node for which the transition destination node does not exist and for which the Back button is hidden.

3

ucnp.isdirectjump

String

Either of the following:

  • "true"

  • "false"

Indicates whether the transition type is direct transition.

  • "true"

    Direct transition

  • "false"

    Not direct transition

4

ucnp.current.node.name

String

String of zero or more characters

The node name corresponding to the transfer-source Guide is passed.

If the node name has not been set, an empty character string is passed.

5

ucnp.next.node.name

String

String of zero or more characters

The node name corresponding to the transfer-destination Guide is passed.

If the node name has not been set, an empty character string is passed.

6

ucnp.current.node.id

String

String of zero or more characters

The node ID corresponding to the transfer-source Guide is passed.

If the node ID has not been set, an empty character string is passed.

7

ucnp.next.node.id

String

String of zero or more characters

The node ID corresponding to the transfer-destination Guide is passed.

If the node ID has not been set, an empty character string is passed.

8

ucnp.flow.contents.id

String

String of one or more characters

The Operational Content ID of the selected Operational Content is passed.

9

ucnp.flow.contents.name

String

String of one or more characters

The Operational Content name of the selected Operational Content is passed.

10

ucnp.flow.contents.execute.id

String

Indicates the Operational Content execution ID, which is assigned during execution of Operational Content

11

ucnp.flow.contents.version.id

String

Indicates the version ID of the Operational Content being used for execution.

12

ucnp.screen.id

String

String of one or more characters

The window ID is passed, which uniquely identifies the window being used for execution of Operational Content.

13

ucnp.screen.ispreview

String

Either of the following:

  • "true"

  • "false"

Indicates whether the window being used for execution of Operational Content is the preview window.

  • "true"

    Preview window

  • "false"

    Operational Content Execution Window

14

ucnp.options.param#

String

Indicates the URL decoded value of the ucnpOptions parameter acquired for each window ID.

This key is not set if the ucnpOptions parameter is not specified.

#

This key is used to acquire the value of the ucnpOptions parameter (specified for the URL) for each window ID. By specifying this key in the param argument, you can acquire the URL decoded value of the ucnpOptions parameter. If the ucnpOptions parameter is not specified for the URL, null is returned. For details about the specification example of the ucnp.options.param key, see the specification example of the inputFromNode method in 5.2 IIoPluginController (server processing implementation interface).

(3) Return values

The execution result of the I/O Plugin is returned as a Map. The table below provides details. Values not covered in the table are ignored.

Table 5‒8: Return values of the outputToNode method

No.

Key name

Value

Description

1

ucnp.next.params.map

Map<String, String>

When an I/O Plugin is executed, a Map containing the following key and value pair is passed:

  • Key

    Output parameter name of the I/O Plugin

  • Value

    Cache value of the Guide associated with the output parameter

2

ucnp.error.message

String

Set this key if you want to display a message for users after execution of the outputToNode method.

If the I/O Plugin associated with the transition destination node terminates with either of the following results, the string specified for this key is displayed in the message dialog box:

  • The execution result type of the outputToNode method for any I/O Plugin is error.

  • The execution result type of the outputToNode method for all I/O Plugins is normal or warning.

Note the following when setting this key:

  • Use \n to specify a linefeed.

  • If this key is set for multiple I/O Plugins, the specified strings are connected and displayed in the message dialog box, using a linefeed as a delimiter. If a message is too long, it might not be displayed fully in the window. Check the message size and make sure that the whole message can be displayed in the window.

3

ucnp.error.type

String

Either of the following:

  • "NG"

  • "WARNING"

Specify whether to suppress node transition after the message dialog box specified for ucnp.error.message is displayed. You can specify the following strings.

  • "NG"

    Transition is suppressed.

  • "WARNING"

    Transition is suppressed.

The value specified for this key is ignored in the following cases:

  • A value is not specified for ucnp.error.message.

  • Null is specified for ucnp.error.message.

"NG" is assumed in the following cases:

  • A string other than "NG" and "WARNING" is specified.

  • Null is specified.

  • A value is not specified.

When you execute multiple I/O Plugins, operation is different depending on the setting as shown below:

  • "WARNING" is specified for all I/O Plugins.

    Transition is not suppressed.

  • "WARNING" is not specified for any I/O Plugin.

    Transition is suppressed.

4

ucnp.next.nodes.active.list

List<String>

Specify the transition destination node.

This activates the Next button corresponding to the process node ID contained in the list, and deactivates buttons not included in the list.

To activate all buttons, specify null.

To deactivate all buttons, specify an empty list.

If this key is specified by multiple plugins simultaneously, buttons will be activated if even one of these is activated.

If a transition destination node is specified from a JavaScript Plugin, by default all buttons will be activated without running the plugin when the Back button is clicked.

To specify the transition destination node even when the Back button is clicked, select the Execute when return. check box before specifying this.

This setting may make direct transition impossible for certain nodes. The check mark will be removed for nodes that can no longer transition due to this setting.

A KDCZ00362-E error will occur if direct transition destination nodes can no longer transition due to the plugin specified on the transition path. When an error occurs, Navigation Platform will behave in the same way as when "NG" is specified for ucnp.error.type.

The following table describes the return values of the outputToNode method and operations after execution of the I/O Plugin associated with the transition destination node.

Table 5‒9: Return values and operations after execution of the I/O Plugin associated with the transition destination node

No.

Value specified for "ucnp.error.message"

Value specified for "ucnp.error.type"

Execution result of the method

Dialog box display

Node transition

1

Not specified, or null

NG

Normal

Disabled

Disabled

2

WARNING

Normal

Disabled

Disabled

3

Values other than NG and WARNING

Normal

Disabled

Disabled

4

Specified (other than null)

NG

Error

Enabled

Enabled

5

WARNING

Warning

Enabled

Disabled

6

Values other than NG and WARNING

Error

Enabled

Enabled

(4) Exception

None