Friday, October 15, 2010

Number precision and conversion in query criteria

There is a strange behavior of number type fields in af:query.
I created a simple Query page from HR schema for Employees (Entity and View) with some typical criteria.
When a user type a value in a String criterion field then he is not allowed to type more characters than the precision of the field.(i.e. 25 for LastName, email)
The same apply for the LOV field (Department 4 digits)
Yet Number fields have strange behavior.No mater the precision of the Number field you can type as many digits you want.
Yet if you type up to 21 then the last 4 digits are converted to 0!!?
If you type more than 21 digits it is converted to the first digits with other 3 as decimals!?
If you type number with more than 3 decimals it is rounded to 3 decimals.

These restrictions make large numbers not usable for query criteria.
Is this a bug to be fixed?
Test case:

Sunday, October 10, 2010

ADF/SOA custom worklist viewFilter

I have managed to create a ADF application with a custom worklist region following instructions of :
Developer's Guide for Oracle SOA Suite &30.13 Creating Reusable Worklist Regions

It was not easy since
• WSRP Container is missing in latest jdeveloper 11.1.1.3
• when I deployed nothing was shown and no error in the logs.

I found out that WSRP Container seems not to be needed and that it was authorization issue.
Since the application must have security enabled, you need to give access also to task flows that comes from libraries:


Then the task list is visible and task details shows as dialog.


Yet we need to show to the user a custom view that contains Flex Fields with business logic values.
I see that there is a parameter you can pass to the worklist task flow the viewFilter:
Developer's Guide for Oracle SOA Suite &34.4 Passing Worklist Portlet Parameters
'viewFilter Specifies the selected view for which the tasks are displayed.'

Yet when I use it with values like:
value="Due Soon"
value="My Work Queues/Standard Views/Due Soon"
I get the following error:



Is this a bug or i need diferent format of value in order to filter specific task view?

I also noticed that from view menu all views shows 2 times apart from Inbox:


Is this also a bug?

Test case:
http://adfbugs.googlecode.com/files/TestCustomWorklist.zip