BUG: HP OO 10.50 - Setting an invalid response with JavaScript Nashorn causes an exception to be thr


I have a slightly irritating bug to report...  I have various custom operators which suffer from this same issue.  It is easy to reproduce:

Create The Operator

  1. Create a new operation.  Select the operation to import: 'com.hp.oo:oo-base-plugin: 1.8.0' --> 'No Action Taken'
  2. Add an input 'myValue', set it to 'Prompt User',
  3. Add the following responses 'test1', 'test2', setting both to be of a type other than red cross.  Ensure 'Default' and 'On-Fail' are not ticked.
  4. Add a 'failure' response.  Ensure that 'Default' and 'On-Fail' are ticked.
  5. Add the following in as the scriptlet:
    scriptletResponse = ""   myValue;
  6. Set the script Type as 'JavaScrpit Nashorn'.

Test The Operator

  1. Create a flow and add the operator.
  2. Wire-up the responses.
  3. Run the operator.  When prompted, enter 'test1'.
  4. The operator will choose the test1 response.
  5. Repeat the test and enter 'test3'.  The flow will fail hard, with the following exception, rather than following the 'failure' response:

com.iconclude.dharma.runengine.RunException: Exception occurred during navigation calculation. Did not find Flow Exception Step id.
at com.iconclude.dharma.runengine.view.BeanViewBuilder.updateRunView(BeanViewBuilder.java:524)
at com.iconclude.dharma.runengine.view.DefaultRunViewFactory.updateView(DefaultRunViewFactory.java:61)
at com.iconclude.dharma.runengine.debugger.RunControlImpl.onEvent(RunControlImpl.java:236)
at com.hp.oo.studio.debugger.engine.AbstractDebugRunEventsChannel.notifyListeners(AbstractDebugRunEventsChannel.java:50)
at com.hp.oo.studio.debugger.engine.AbstractDebugRunEventsChannel.processFinishEvent(AbstractDebugRunEventsChannel.java:102)
at com.hp.oo.studio.debugger.events.StudioDebuggerEventsBuffer.processFinishEvent(StudioDebuggerEventsBuffer.java:98)
at com.hp.oo.studio.debugger.engine.AbstractDebugRunEventsChannel.processEvent(AbstractDebugRunEventsChannel.java:83)
at com.hp.oo.studio.debugger.events.StudioDebuggerEventsBuffer$DebuggerEventsConsumer.run(StudioDebuggerEventsBuffer.java:120)
Caused by: java.lang.Exception: Exception occurred during navigation calculation. Did not find Flow Exception Step id.
... 8 more


There are two workarounds for this:

  1. Switch the operator JavaScript Rhino,
  2. Use the following code snippet, to catch the exception:


try {
scriptletResponse = "" myValue;
} catch (e) {
//Nothing is required in the catch block.







  • Reason of failure:
    When using scriptletResponse = “anything” and the response “anything” does not exist for the step.

    Possible solutions :
    -Create “anything” response
    -Delete the sentence
    -Correct the sentence to scriptletResponse = “some_response_which_exists”

    Other insights I’ve learned about this error:

    • It is not operation-related (It will happened using any operation)
    • This is an Exception handling error by the Javascript engine which executes scriptlet code (Rhino).