GrailsFlow

Required field error produced even when field is not writable on the node

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1
  • Component/s: None
  • Labels:
    None
  • Request Controller:
    Please Select
  • External Supervisor:
    Please select
  • Executing Programmer:
    Please select

Description

I have a flow with many required fields but not all are enterable on the first wait node.
At the first node, I enter the required fields and submit.
I cannot continue because the validator tells me that these non-displayed fields are required.

I am working with grailsflow-src-20100222

A possible fix ;-

ProcessController.groovy

private def findWritableVariables( def processClass, def nodeID) {
def vars = processClass.variables.findAll { varDef -> def visibility = processClass.varVisibility[ nodeID]?.get( varDef.name) visibility == ConstantUtils.WRITE_READ }

return vars.name
}

def sendEvent = {
...
def writableVariables = findWritableVariables( processClass, params.nodeID)

// get passed ProcessVariable values
// check if all 'required' properties are filled
processClass.variables?.each { variable ->
...
if( writableVariables.contains( name) &&
variable.required &&
...

Activity

Hide
Voitovich, Maria added a comment - 22/Feb/11 12:23 PM

Fixed by moving "required" property from Process level to Node level.

Show
Voitovich, Maria added a comment - 22/Feb/11 12:23 PM Fixed by moving "required" property from Process level to Node level.

People

Vote (0)
Watch (0)

Dates

  • Created:
    05/Mar/10 10:02 AM
    Updated:
    22/Feb/11 12:24 PM
    Resolved:
    22/Feb/11 12:24 PM