Nov 1, 2016

When the "default" hurts the Human Task UI [TaskForm]

So, you just created  a BPM project  using JDeveloper 12c. You defined the BPMN component itself, you defined the  Business Objects and based on the Business Objects you also defined some Process Data Objects.


Once done with all composite details you wan tot "Auto-Generate Task Form". All will work fine out-of-the box.

 For whatever the reason you just realized you made some mistake with some data type from the Business Objects.... Or you just want to change a parameter from some "string" type to "boolean" type.
Once done with this small  change you are happy since  now  you can update the "Data Associations" using the new "boolean" type. Actually, by default, the same parameter will now be as "boolean" type in the "Data Associations".

Since you just made some updates in your composite, you want to "Auto-Generate Task Form" again. Maybe you also want to add some picture on the  new ADF UI - to be creative with your future ADF UI Task Form :D

However, now you see there are some issues with your new UI: there is actually no UI defined; you only have some ADF files generated but the main UI ADF file is actually empty. The "jspx" file is empty.

What just happened ?  Why now the "Auto-Generate Task Form" will end up as a blank web page ?

The answer is simple:  you now have a "default" attribute in the XSD  file associated with the Business Object you just changed : "default=""" . We need to remove it from the XSD and all will work fine ;)

Since a picture equals 100 words, we should now go with the  pictures.

Below is a step-by-step BPM 12c project and the idea is simple:  we have a  client, client will send some credit card details [CardNumber], then we invoke a remote web service  to check the credit card and the response [CardType, CardValid] from  this web service should be handled  by a  human task activity.

Note: I used one  role since the idea  was to focus on the  "Auto-Generate Task Form" UI step.

Thank you CDYNE for the big help in terms of LuhnChecker web service !

 

Now back to the JDeveloper:

 






 
 



 












 
 




 
 


Looks we need to change the type from  "string" to "boolean":






 




Check the details on the Human Task "Data" and all will be clear for you:

 



Open the XSD file from BPMN_Project_Path\SOA\businessCatalog\ ***_Module :

Note: For my project I had the next path: CreditCard_Demo_App\CreditCard_Demo_Proj\SOA\businessCatalog\Credit_Card_Module\Credit_Card_Result.xsd



 We need to remove the extra default="attribute from this schema:




Go back to the Human Task "Data" and see there are no more issues:




And now "Auto-Generate Task Form" again: