Java Subsytems flow

About this task

The Java Subsystems flow comprises eight conversational steps. You begin the flow by creating a new skill action in the AIOps Assistant

Procedure

  1. Log in to watsonx Orchestrate.
  2. Click the AI assistant builder tile.
  3. From the main menu bar, select the AIOps Assistant to which you want to create the skill flow.
  4. Hover the cursor over the home icon, select Actions, and then click New action.
  5. On the Create an action page, select Start from scratch.
  6. On the New Action window, enter Show all my JVM subsystems and click Save.
    You are directed to the page where you can create the conversational steps. Step 1 exists by default. To add the remaining steps, click New step for each step that you want to add, and then save the changes by clicking the Save icon.
  7. Create the Java Subsystems flow:
    Step 1:
    1. In the Add then section, click Go to a subaction, and then select Retrieve all JVM Details.
    Step 2:
    1. Select the variables and their values as described in the following table.
      For more information on how to add variables, see Setting conditions and variables for AIOps Assistant flows.
      Note: The variable values are provided in boldface to differentiate them from the object values.
      Variable Type Value
      allJVMTable Any 1. Retrieve all JVM Details result variable.value.message
      NormalizedJVMTable1 Any allJVMTable .toString().replace("Job Name", "jvmId").toJson()
      NormalizedJVMTable2 Any NormalizedJVMTable1 .toString().replace("Collector ID", "collectorId").toJson()
      NormalizedJVMTable3 Any NormalizedJVMTable2.toString().replace("SMF ID", "smfId").toJson()
      NormalizedJVMTable4 Any NormalizedJVMTable3.toString().replace("Process ID", "jvmPId").toJson()
      JVMIdList Free text NormalizedJVMTable4.joinToArray("%e.jvmId%", true)
    2. In the Assistant says section, enter What do you want to do next?.
    3. Click Define customer response and then click Options.
    4. In the Edit Response window, enter the following:
      • Option 1 - View JVM details
      • Option 2 - View JVM locks
      • Click Apply.
    Step 3:
    1. In the Conditions section, set the following conditions:
      For more information on how to add conditions, see Setting conditions and variables for AIOps Assistant flows.
      • Condition 1 - Select 2. **What do you want to do next?** selected and set the condition to View JVM details.
      • Condition 2 - Select 2. **What do you want to do next?** selected and set the condition to View JVM locks
    2. In the Assistant says section, do the following:
      1. Type the string "Select the JVM Job Name you want to".
      2. Press the $ key on your keyboard.
      3. Select Action step variables > 2. **What do you want to do next?**.
      4. Type the string "for:".
      After you perform the preceding steps from i through iv, the complete expression should be "Select the JVM Job Name you want to 2. **What do you want to do next?** for:"
    3. Click Define customer response and then click Options.
    4. In the Edit Response window, do the following:
      1. Toggle the Dynamic switch to the On position.
      2. Select the variable JVMIdList that you defined in the previous step.
      3. Click Apply.
    Step 4:
    1. In the Conditions section, select Action step variables > 3. **Select the JVM Job Name you want to**** {variable}****for:** selected and set the value to Defined.
    2. Select the variables and their values as described in the following table.
      For more information on how to add conditions and variables, see Setting conditions and variables for AIOps Assistant flows.
      Note: The variable values are provided in boldface to differentiate them from the object values.
      Variable Type Value
      selectedJVMId Free text 3. **Select the JVM Job Name you want to** **{variable}** **for:**.value
      selectedJVMIdIndex Number JVMIdList.indexOf(selectedJVMId)
      selectedJVMcollectorId Free text NormalizedJVMTable4.get(selectedJVMIdIndex).collectorId
      selectedJVMPId Free text NormalizedJVMTable4.get(selectedJVMIdIndex).jvmPId
      selectedJVMsmfId Free text NormalizedJVMTable4.get(selectedJVMIdIndex).smfId
    Step 5:
    1. In the Conditions section, select 2. **What do you want to do next?** selected and set the value to View JVM details.
    2. In the Add then section, do the following:
      1. Select Go to a subaction.
      2. In the Go to field, select Retrieve a JVM details by JVM ID.
      3. Click Apply.
    3. In the Add then section, do the following:
      1. Click Edit passed values.
      2. Click Set new value.
      3. Select 2. jvmId and set the value to selectedJVMId.
      4. Click Apply.
    Step 6:
    1. In the Conditions section, select Retrieve JVM details by JVM ID (step 5) > Retrieve JVM details by JVM ID result variable and set the value to Defined.
    2. In the Assistant says section, enter Do you want to view locks?
    3. Click Define customer response and select Confirmation to include the Yes and No buttons.
    Step 7:
    1. In the Conditions section, select 6. **Do you want to view locks?** selected and set the value to No.
    2. In the Add then section, select End the action.
    Step 8:
    1. In the Conditions section, set the following conditions:
      • Condition 1 - Select Action step variables > 2. **What do you want to do next?** selected and set the value to View JVM locks.
      • Condition 2 - Select Action step variables > 3. **Select the JVM Job Name you want to** **{variable}** **for:** selected and set the value to Defined.
    2. Add a new condition group and set the following Or condition:
      • Select Action step variables > 6. **Do you want to view locks?** selected and set the value to Yes.
    3. Select the variables and their values as described in the following table.
      For more information on how to add conditions and variables, see Setting conditions and variables for AIOps Assistant flows.
      Note: The variable values are provided in boldface to differentiate them from the object values.
      Variable Type Value
      selectedJVMId Free text

      3. **Select the JVM Job Name you want to** **{variable}** **for:**.value

      selectedJVMIdIndex Number JVMIdList.indexOf(selectedJVMId)
      selectedJVMcollectorId Free text NormalizedJVMTable4.get(selectedJVMIdIndex).collectorId
      selectedJVMPId Free text NormalizedJVMTable4.get(selectedJVMIdIndex).jvmPId
      selectedJVMsmfId Free text NormalizedJVMTable4.get(selectedJVMIdIndex).smfId
    4. In the Add then section, select Go to a subaction.
    5. In the Go to a subaction window, do the following:
      1. In the Go to field, select Retrieve a JVM Lock.
      2. Click Apply.
    6. In the Add then section, click Edit passed values.
    7. In the Edit passed values window, do the following:
      1. Click Set new value and select the following values:
        • Select collectorId and set the value to selectedJVMcollectorId.
        • Select jvmPid and set the value to selectedJVMPId.
        • Select smfId and set the value to selectedJVMsmfId.
      2. Click Apply.