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
-
If an I/O Plugin is placed in the transition source node and the execution result of the inputFromNode that was executed in advance indicates an error, the outputToNode methods of all I/O Plugins are not executed.
-
If multiple I/O Plugins are placed in the same node and the execution result of the outputToNode method was executed in advance indicates an error, subsequent I/O Plugins are not executed.
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.
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:
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:
|
Indicates the type of the clicked button or the type of transition.
|
3 |
ucnp.isdirectjump |
String Either of the following:
|
Indicates whether the transition type is 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:
|
Indicates whether the window being used for execution of Operational Content is the preview 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.
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:
|
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:
Note the following when setting this key:
|
3 |
ucnp.error.type |
String Either of the following:
|
Specify whether to suppress node transition after the message dialog box specified for ucnp.error.message is displayed. You can specify the following strings.
The value specified for this key is ignored in the following cases:
"NG" is assumed in the following cases:
When you execute multiple I/O Plugins, operation is different depending on the setting as shown below:
|
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.
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