Administrative command interactive mode environment
An administrative command can be run in interactive mode by providing the -interactive option in the options string when invoking the command.
We can still provide other options, even when using the interactive option. The options values specified are applied to the command before the command data is displayed. Whether or not other options are specified, wsadmin.sh steps the user through the command to collect command information.
The general interactive flow sequence is:
- Collect user inputs for target object and parameters
- If the command does not include a step, the command execution menu displays to run or cancel the command.
- If the command includes a step, the menu to select the step displays. When all the required inputs are entered, the menu includes command execution.
- When a step is selected, if the step supports collection, then the menu to select an object in the collection displays and we can exit the step. If we exit the step, repeat steps 1-3.
- Collect user inputs for the selected step or for an object in the collection
- Repeat steps 4 and 5 if from the collection step menu
- Repeat steps 3-5 if from step selection menu
Depending on what input area is enabled by an administrative command, we can go through part or all of the interactive flow sequence. If an administrative command is run in interactive mode, the syntax to run the command except for the deletion of collection object in batch mode is generated and logged as a WASX7278I message in both the interactive session and in the wsadmin trace file.
Collect user inputs for target object and parameters
The following interactive prompt is used to collect inputs for the Target object and Arguments input areas that are displayed in the command-specific help:
Command title Command Description *target object title [current or default value]: *param1 title (param1 name) [choice1, choice2, ...]: [current/default value] param2 title (param2 name) [choice1, choice2, ...]: [current/default value] ...
Display command execution menu
If an administrative command does not contain a step, you are presented with the following menu after collecting values for target object and parameters:
Command title F (Finish) C (Cancel) Select [F, C]: FThe Finish option runs the command and the Cancel option cancels the command. The default selection is F (Finish). This menu is the last menu that is displayed for a non-step command to exit interactive mode by either canceling or running the command.
Display command step selection and execution menu
If an administrative command contains a step, the following menu is displayed after collecting values for target object and parameters:
Command title Command description -> *1. step1 title (step1 name) 2. step2 title (step2 name) *3. step3 title (step3 name) (4. step4 title (step4 name)) n. stepn title (stepn name) S (Select) N (Next) P (Previous) F (Finish) C (Cancel) H (Help) Select [S, N, P, F, C, H]: SThe number of steps that is displayed in the menu depends on the administrative command. The step name is displayed for information and is the name used to set data in this step in batch mode. The following notations are used to describe a step:
- A "->" before the step indicates the current step position.
- A "*" before the step indicates a required step.
- A ( ) enclosing the entire step indicates a disabled step. We cannot navigate to this step using the Next or Previous options.
Use the menu, we can navigate through steps sequentially by selecting Previous or Next. Select selects the current step, Finish runs the command, Cancel cancels the command, and Help provides online help for the command. Not all menu choices are available. Previous is not available if the current step is the first step. Next is not available if the current step is the last step. Finish is not available if still steps are still missing required inputs. The default selection is S (Select) if the current step is a valid step and steps are missing required inputs. Default selection is F (Finish) if all the required input is provided for the steps.
For commands with steps, we can exit interactive mode on this menu by either canceling or running the command.
Display collection step menu
A step might or might not support collection. A collection refers to objects of the same type. In an administrative command, a collection contains objects that have the same set of parameters. If a step that supports collection is selected, wsadmin.sh displays the following menu to add and select an object in the collection:
Step title (step name) | key param1 title (key param1 name), key param2 title (key param2 name), ... --------------------------------------------------------------------------- -> | object1 key param1 value, key param2 value, ... *| object2 key param1 value, key param2 value, ... ... key param1 title, key param2 title, ... must be provided to specify a row in batch row. S (Select Row) N (Next) P (Previous) A (Add Row or Add Row Before) D (Delete Row) F (Finish) H (Help) Select [S, N, P, A, D, F, H]: FThe number of objects that display in the menu depends on the command step. Key parameters are identified by the step to use to uniquely identify an object in a collection. Key parameter values are displayed to identify an object to select. As with the command step selection menu, an arrow (->) is used to indicate the current object position, and a asterisk (*) is used to indicate that required input is missing in the object.
Use the menu to navigate through objects sequentially by selecting Previous or Next. Select Row selects the current object, Add Row adds a new object, Add Row Before adds a new object before the current object, Delete Row deletes the current object, Finish returns control back to the step selection and execution menu, and Help provides on-line help for the step. Not all menu choices are available. Previous is not available if there is no object in the collection or the first object is the current object. Next is not available if there is no object in the collection or the last object is the current object. Select Row is available only if there is a current object. Add Row is provided only if there is no object in the collection and the step supports new object to be added. Add Row Before is provided if the step supports new object to be added and there are existing objects in the collection. Delete Row is provided only if there is a current object and the step supports an object to be deleted. Finish is not available if there are still objects missing required inputs. Default selection is A (Add Row) when there is no object in the collection and the step supports objects to be added. Default selection is S (Select Row) if there is a current object and there are still objects missing required inputs. Default selection is F (Finish) if there is no required input missing in any object.
Collect user inputs for parameters of a collection object
After a collection object is selected, the parameter value for each parameter is prompted sequentially as shown in the following example:
*param1 title (param1 name) [choice1, choice2, ...]: [current/default value] param2 title (param2 name) [choice1, choice2, ...]: [current/default value] ...The number of parameters depends on the number of arguments in the Argument area of the command step-specific help. The same asterisk (*) notation is used to denote a required parameter. If a parameter value is restricted to a set of values, then the valid choices are displayed. If the current or default value is available, it is displayed. For each writable parameter, we can accept the existing value by pressing Enter. To add or change an existing value, enter a new value and press Enter. For a read-only parameter, the parameter and its value are displayed. You will not be given the prompt to modify its value. After you go through all of the parameters, wsadmin.sh returns to the collection step menu.
Collect user inputs for non-collection step
This step has two parts. The first part displays the current or default parameter values for the selected step, as shown in the following example:
Step title (step name) *param1 title (param1 name) [choice1, choice2, ...]: [current/default value] param2 title (param2 name) [choice1, choice2, ...]: [current/default value] ... Select [C (Cancel), E (Edit)]: [E]No prompting is included in this part. Instead, this part is more like a help function providing parameter information on the selected step. The number of parameters depends on the number of arguments in the argument area of the command step specific help. The asterisk (*) notation denotes a required parameter. If a parameter value is restricted to a set of values, then the valid choices will be displayed. If the current or default value is available, it is displayed. We can choose to cancel the step or continue to the next part to provide parameter inputs. The default selection is Edit. Because it is possible that you are seeing default values assigned to a new piece of data that is not yet set in the step, we can accept the default selection to continue to the next part. Otherwise, if no data exists in the selected step, selecting Cancel does not result in creating the data.
If we accept the default Edit selection, collect user inputs for parameters sequentially just like Collect user inputs for parameters of a collection object.
*param1 title (param1 name) [choice1, choice2, ...]: [current/default value] param2 title (param2 name) [choice1, choice2, ...]: [current/default value] ...For each writable parameter, we can accept the existing value by pressing Enter. To add or change an existing value, enter a new value and then press Enter. For a read-only parameter, the parameter and its value are displayed. You will not be given the prompt to modify the value of the parameter. As soon as you step through all the parameters, wsadmin.sh will lead you back to the command step selection and execution menu.
Related tasks
Invoking an administrative command in interactive mode