This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Prompt user from a selection list and customise the response based on their selection

Hi guys,

I want to create a customised operation that will prompt a user for a selection from a selection list. Possible options are 'Reset a password' and 'Unlock an account'. How can I create a customised response based on the selection input so that the flow branches out to 'Reset a password' or 'Unlock an account' paths. I know I can check this in another step but I want to do it all within one step.

Thanks

Dan

  • Verified Answer

    +1

    Hi,

    In case prompting on the step is mandatory then using the manual operation (Base Content Pack /Library/Utility Operations/Manual) would solve this issue without extra custom work. The manual operation will always prompt with a selection list of options based on the operation's responses in the flow. 

    To use the manual operation you have to drag it onto the canvas and then simply drag transitions from it to the various branches of your flow. Each transition (response) of the step will take the name of the step to which it is connected. The name of the response will also be part of the selection list that will be prompted dynamically when the execution reaches this step. As I mentioned above the execution will always prompt when reaching this step and you cannot control it through flow variable manipulation.

    If you want to be able to either prompt or have a variable control the resulting action then you have to create a custom operation based on the do nothing operation (Base Content Pack /Library/Utility Operations/Flow Variable Manipulation/Do Nothing ) whith the necessary number of responses, then on the flow canvas through a scriptlet based on the result of the step choose the response of the operation. The scriptlet would look something like this:

    selectionResult = scriptletContext.getLocal("returnResult");

    if ( selectionResult == "option 1" )
    { scriptletResponse = "response 1";
    }

    if ( selectionResult == "option 2" )
    { scriptletResponse = "response 2";
    }

    Hope this helps,

    Vlad

  • 0 in reply to 

    Vlad. Thank you so much for you answer. Using the 'Manual" step works perfectly. I have used OO for a long time but have not used this operation. Thank you once again.