1 2 Previous Next 18 Replies Latest reply on May 23, 2006 9:15 PM by aguizar

    Problem in required field attribute in default form controll

      Hi,
      This is withrespect to the following topic.
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=82549

      The required field option given in the default form controller is not functioning. I have added the required property correspondingly in the corresponding jsp page. Still it is not functioning.

      I tried to display the value of required attribute given in default form controller using "#{taskformcontroller.required}". It shows the value as false for all the attributes. It is not reflected properly.

      Can anyone provide me suggestion.

        • 1. Re: Problem in required field attribute in default form cont
          becka

          do you mean:


          i got the same problem, an just wanted to post it now ;)
          can anybody help?

          • 2. Re: Problem in required field attribute in default form cont

            Yes.

            I am having the same problem.
            Could anyone help me

            • 3. Re: Problem in required field attribute in default form cont
              kukeltje

              If you post enough info on the version of jBPM you are using we will try. I already requested this info in the other thread, but did not receive a response. Since you obviously read the other thread (you posted a reference to it) I assume you are aware of this earlier question.

              • 4. Re: Problem in required field attribute in default form cont
                becka

                My Version is Eclipse 3.1.1 and Designer 3.0.5 and the field is ignored.
                Is there a Syntax error in the Designer Plugin or is it ignored by the jBPM?

                • 5. Re: Problem in required field attribute in default form cont
                  logicalsid

                  hi,

                  Even i am facing the same problem.Even if the variable has access as 'required' , its not being validated or checked.

                  Also this occurs in both the example webapp as well as my own process.The other access properties like read and write are working properly.

                  Environment ::
                  jbpm-starters-kit-3.1 + default eclipse plugin
                  Java 1.4.2
                  WinXP Pro

                  @ Becka and pganesh81 :: kukeltje is asking for your jbpm version + any other changed variable :-)

                  regards,
                  Sidd

                  • 6. Re: Problem in required field attribute in default form cont
                    becka

                     

                    "logicalsid" wrote:

                    @ Becka and pganesh81 :: kukeltje is asking for your jbpm version + any other changed variable :-)


                    ups, my jBPM is from Starters Kit 3.0.2

                    • 7. Re: Problem in required field attribute in default form cont

                      I am using,
                      jbpm-starters-kit-3.1
                      eclipse -3.1

                      • 8. Re: Problem in required field attribute in default form cont
                        cknowles

                        I have the same problem with eclipse 3.1.2 and jbpm 3.1.1 (starters kit 3.1.1), with both the example and my own process definition.

                        • 9. Re: Problem in required field attribute in default form cont
                          akakunin

                          Could you send part of processdefinition.xml (in xml-sources) defined this variable?

                          • 10. Re: Problem in required field attribute in default form cont
                            omaass

                            Hi, I seem to have the same problem.

                            I am using jBPM3.1 (from starter kit) and Eclipse 3.1.1.

                            I created a process definition like in the online demo (holiday-request). The processdefinition.xml for the start-state looks like this:

                            <start-state name="enter request">
                             <task name="request entry" swimlane="initiator">
                             <controller>
                             <variable name="start date" access="read,write,required"></variable>
                             <variable name="duration" access="read,write,required"></variable>
                             </controller>
                             </task>
                             <transition name="" to="evaluate request"></transition>
                             </start-state>
                            


                            So "start date" and "duration" should be required.

                            I wrote a test class doing the following:

                            public void testHolidayRequestProcess() throws Exception {
                             // Extract a process definition from the processdefinition.xml file.
                             ProcessDefinition definition =
                             ProcessDefinition.parseXmlResource("holiday-request.par/processdefinition.xml");
                             assertNotNull("Definition should not be null", definition);
                            
                             // Create an instance of the process definition.
                             ProcessInstance instance = new ProcessInstance(definition);
                             assertEquals(
                             "Instance is waiting for request entering",
                             instance.getRootToken().getNode().getName(),
                             "enter request");
                             assertNull(
                             "Message variable should not exist yet",
                             instance.getContextInstance().getVariable("message"));
                             showVariables(instance.getContextInstance());
                            
                             // create some variables
                             // ** BUG? if I comment out these 2 following lines, the process still
                             // ** goes to state "evaluate request" though the 2 required variables
                             // ** are not provided **
                             instance.getContextInstance().createVariable("start date", new java.util.Date());
                             instance.getContextInstance().createVariable("duration", new Integer(5));
                             // **********************************
                             showVariables(instance.getContextInstance());
                            
                             // Move the process instance from its start state to the first state.
                             // The configured action should execute and the appropriate message
                             // should appear in the message process variable.
                             instance.signal();
                             assertEquals(
                             "Instance is in evaluation state",
                             instance.getRootToken().getNode().getName(),
                             "evaluate request");
                             showVariables(instance.getContextInstance());
                            
                             }
                            


                            When I comment out the two marked lines (so I do not provide the required variables), the process still is moved to the next state.


                            • 11. Re: Problem in required field attribute in default form cont
                              kukeltje

                              you mix up two things here, signalling the process instance does *not* end the task. It is still there, so there is no check done.

                              If you try getting a taskinstance and do an .end() on that, the situation is what should be done.

                              Ending tasks when signalling the token in the node or keep them blocking is a different issue (search the jira for that)

                              • 12. Re: Problem in required field attribute in default form cont

                                <start-state name="Create new resignation application">










                                </start-state>

                                • 13. Re: Problem in required field attribute in default form cont

                                  <start-state name="Create new resignation application">










                                  </start-state>

                                  • 14. Re: Problem in required field attribute in default form cont

                                     

                                    <start-state name="Create new resignation application">
                                     <task name="Create new resignation application" swimlane="Employee">
                                     <controller>
                                     <variable name="Name" access="read" mappedName="Name"></variable>
                                     <variable name="PSNo" access="read" mappedName="PSNo"></variable>
                                     <variable name="Department" mappedName="Department"></variable>
                                     <variable name="Reason" access="read,write,required" mappedName="Reason"></variable>
                                     <variable name="Superiorid" mappedName="Superiorid"></variable>
                                     </controller>
                                     </task>
                                     <transition name="" to="Send Mail to sbu head and manager"></transition>
                                     </start-state>


                                    1 2 Previous Next