8 Replies Latest reply on Jun 12, 2006 10:32 AM by Ronald van Kuijk

    Question in JBPM <Controller>

    Mahalakshmi Arunachalam Newbie

      Hi,

      I have written a process definition with controller as follows.



      <variable name="a" access="read" mapped-name="x" />
      <variable name="b" access="read,write,required" mapped-name="y" />




      So when I deploy and run the process definition for these variables in the user interface I could see a text box. But when I want a option buttons, select drop downs, images to be assigned how can I define it in controller tag.

      I would be happy if anybody could help me with some exaples.

      Thanks

        • 1. Re: Question in JBPM <Controller>
          Walter Mourão Newbie

          You have to create/edit the .xhtml files according your needs.

          • 2. Re: Question in JBPM <Controller>
            Mahalakshmi Arunachalam Newbie

            Thanks for the reply. But I hope you are meaning the processdefinition.xml files.

            Can you explain me in detail.

            Thanks

            • 3. Re: Question in JBPM <Controller>
              Walter Mourão Newbie

              I suggest you take a closer look at the examples, mainly in the websale example (in cvs).

              • 4. Re: Question in JBPM <Controller>
                Mahalakshmi Arunachalam Newbie

                Hi,

                This is the websale exapmle available in CVS

                <?xml version="1.0"?>

                <process-definition name="websale"
                xmlns="urn:jbpm.org:jpdl-3.1">

                <!-- SWIMLANES (= process roles) -->















                <!-- NODES -->

                <start-state name="create new web sale order">








                </start-state>

                <task-node name="evaluate web order">



                salesman











                </task-node>

                <task-node name="fix web order data">









                </task-node>






                <task-node name="wait for money">









                </task-node>



                accountancy application is now informed of the payment






                shipper
                ${shipper} now ships ${item} to ${address}








                <end-state name="end" />

                </process-definition>

                I could find only text boxes in the user interface when I deploy and run it..



                • 5. Re: Question in JBPM <Controller>
                  Mahalakshmi Arunachalam Newbie

                   

                  <?xml version="1.0"?>
                  
                  <process-definition name="websale"
                   xmlns="urn:jbpm.org:jpdl-3.1">
                  
                   <!-- SWIMLANES (= process roles) -->
                  
                   <swimlane name="buyer" />
                  
                   <swimlane name="salesman">
                   <assignment expression="user(ernie)" />
                   </swimlane>
                  
                   <swimlane name="accountant">
                   <assignment expression="user(bert)" />
                   </swimlane>
                  
                   <swimlane name="shipper">
                   <assignment expression="user(grover)" />
                   </swimlane>
                  
                   <!-- NODES -->
                  
                   <start-state name="create new web sale order">
                   <task swimlane="buyer">
                   <controller>
                   <variable name="item"/>
                   <variable name="quantity"/>
                   <variable name="address"/>
                   </controller>
                   </task>
                   <transition to="evaluate web order" />
                   </start-state>
                  
                   <task-node name="evaluate web order">
                   <task swimlane="salesman">
                   <timer duedate="20 seconds" repeat="10 seconds">
                   <action class="org.jbpm.websale.RemindActor">
                   <swimlaneName>salesman</swimlaneName>
                   </action>
                   </timer>
                   <controller>
                   <variable name="item" access="read"/>
                   <variable name="quantity" access="read"/>
                   <variable name="address" access="read"/>
                   <variable name="comment"/>
                   </controller>
                   </task>
                   <transition name="ok" to="salefork" />
                   <transition name="more info needed" to="fix web order data" />
                   </task-node>
                  
                   <task-node name="fix web order data">
                   <task swimlane="buyer">
                   <controller>
                   <variable name="comment" access="read"/>
                   <variable name="item" />
                   <variable name="quantity" />
                   <variable name="address" />
                   </controller>
                   </task>
                   <transition to="evaluate web order" />
                   </task-node>
                  
                   <fork name="salefork">
                   <transition name="payment" to="wait for money" />
                   <transition name="shipping" to="ship item" />
                   </fork>
                  
                   <task-node name="wait for money">
                   <task swimlane="accountant">
                   <controller>
                   <variable name="item" access="read" />
                   <variable name="quantity" access="read" />
                   <variable name="address" access="read" />
                   <variable name="money received" />
                   </controller>
                   </task>
                   <transition to="update books" />
                   </task-node>
                  
                   <node name="update books">
                   <action class="org.jbpm.websale.UpdateBooks">
                   <msg>accountancy application is now informed of the payment</msg>
                   </action>
                   <transition to="salejoin" />
                   </node>
                  
                   <node name="ship item">
                   <action class="org.jbpm.websale.ShipItem">
                   <swimlaneName>shipper</swimlaneName>
                   <msg>${shipper} now ships ${item} to ${address}</msg>
                   </action>
                   <transition to="salejoin" />
                   </node>
                  
                   <join name="salejoin">
                   <transition to="end" />
                   </join>
                  
                   <end-state name="end" />
                  
                  </process-definition>
                  
                  


                  I could find only text boxes in the user interface while i am deploying and running..

                  • 6. Re: Question in JBPM <Controller>
                    Walter Mourão Newbie

                    Yes, there are only text boxes, you have to change the JSF widgets according your needs in the .xhtml files.

                    • 7. Re: Question in JBPM <Controller>
                      Mahalakshmi Arunachalam Newbie

                      Hi,

                      Where are the .xhtml files?... I am using the recent version of JBPM 3.1.1.. There are no .xhtml files in it. I want to where exactly to edit.

                      If you could help me with an example...

                      Thanks..

                      • 8. Re: Question in JBPM <Controller>
                        Ronald van Kuijk Master

                        USE CVS (as was mentioned above) there is the 3.2 alpha which has support for this. This is btw mentioned several times before in the forum. Use the search functionality