Boolean as a Task Flow Input Parameter

When customizing WebCenter Portal Task Flows, you may be required to add new parameters.

This post explains how to solve a problem when the parameter added is java.lang.Boolean type.

What happens when adding an Input Parameter of type Boolean?

 

2
Booelan parameter with default scoped variable

 

When adding a Boolean parameter to a Task Flow it will be shown as Check Box.

 

1
Check Box when configuring Boolean parameter with Oracle Composer

 

However, trying to use this parameter, for example in a Router, will produce following error:

<Jan 10, 2014 11:52:12 AM CET> <Error> <oracle.adf.controller.internal.binding.TaskFlowRegionModelViewPort> <BEA-000000> <
oracle.adf.controller.activity.ActivityLogicException: ADFC-06008: Router case expression '#{pageFlowScope.analytics}' does not evaluate to a boolean.

Why does this not evaluate to a Boolean?

Looking into the MDS you will find following:

 

3
MDS stored values when checking/unchecking

 

  • ${'true'}
  • ${'false'}

This values are taken by #{pageFlowScope.analytics} as String.

What is the solution?

The solution is based on create a Managed Bean with a java.lang.Boolean property that will be mapped to the input parameter value.

 

5
Managed Bean that will store the parameter value

 

4
Parameter mapped to a property of the Manage Bean

 

Using this method will allow you to Boolean values without conversion problems.