<-- Back

Microflow button disabled when optional object parameter is empty

Issue

A microflow button becomes disabled when an object input parameter is empty, even though the parameter has been marked as Optional.

The expected behavior is that marking the parameter as Optional should allow the microflow button to remain enabled when no object is passed. However, the button may still appear disabled when the parameter value is empty.

Environment

Studio Pro (all versions)

Cause

This is expected behavior.

The Optional setting means that an argument does not have to be passed to the microflow parameter. It does not mean that the microflow button will remain enabled when an object value is available in the context but is empty.

When an argument value is passed to the parameter, and that value is empty, the microflow button is disabled by design.

The behavior can be explained by the difference between the following situations:

  • No object is in scope: If the parameter is Optional and there is no object of the required type in scope, the button can remain enabled because no argument needs to be passed.

  • An object is in scope, but its value is empty: If an object of the required type is in scope but its value is empty, the microflow button will be disabled.

Solution/Workaround

Verify whether an object of the required type is in scope on the page where the button is disabled.

If an object is in scope but its value is empty, the disabled button is expected behavior for an Optional object parameter.

If the button needs to remain enabled regardless of whether an object is available, consider redesigning the microflow or page context so that an empty object is not passed as the parameter. For example, the logic can be adjusted so that the microflow is invoked without an object when none is available, and it handles the absence of the optional parameter internally.

Internal information related

  • 280472
  • WTF-2709

Additional information

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.