After a plug-in page is closed, you can open the page of another or even of the same plug-in. This allows you to implement complex business flows using several different plug-ins, or update Oracle Field Service entities without exiting the plug-in's page. From the current plug-in, you can redirect only to those plug-ins that use the Plugin API. The value of the Disable Plugin in offline option is not taken into account, so the plug-in must handle the offline mode properly.
Additional Parameters for Plug-in on Redirection
List of all buttons that are configured for a plug-in is sent to the plug-in in the 'buttons' field of the 'init' message. This field is a list of objects that contains the 'buttonId' and 'params' fields. buttonId is the 'context layout item id' of the button. 'params' is an object that represents the parameters that are configured for the corresponding context layout item.
-
The plug-in navigates to one of the many different plug-ins according to some business logic.
-
The plug-in shows some data only if it receives correct parameters from another plug-in. It does not show the data if it's opened directly from a button, to force the user to follow business process.
-
The plug-in implements some business logic that is based on the data from another plug-in, without the need to store this data in the entities' properties or the browser's local storage.
Navigation flow from plug-in A to plug-in B when sending parameters
Plug-in A sends the close message with the backpluginLabel and backpluginOpenParams fields. backpluginLabel equals to the label of plug-in B. backpluginOpenParams is an object, which contains the data needed by plug-in B.
After successful processing of the close message, plug-in A is closed.
Plug-in B is opened immediately and is shown on the page after the ready message is received.
Plug-in B receives the open message, which contains the openParams field. The value of this field equals to the value of backpluginOpenParams sent by plug-in A.
Requirements for the "backPluginOpenParams" Field
backPluginOpenParams is a plain object.
The maximum number of the object's fields is 20.
Each field of the object has a scalar value (string, number, bool, null, undefined). Nested objects are forbidden.
The size is limited to 5 KB and includes JSON structure overhead. That is, the limit is applied to the length of the serialized JSON string.
Example of the close message sent by plug-in A
{
"apiVersion": 1,
"method": "close",
"entity": "activity",
"backScreen": "plugin_by_label",
"backPluginLabel": "plugin_b",
"backPluginOpenParams": {
"foo": "bar"
}
}
Example of the open message received by plug-in B
{
"apiVersion": 1,
"method": "open",
"entity": "activity",
"openParams": {
"foo": "bar"
}
...
}