[jboss-user] [JBoss Seam] - jBPM can't evaluate method
smithbstl
do-not-reply at jboss.com
Mon Apr 9 17:24:13 EDT 2007
I am taking my first stab at using jPdl page flows and can't get jBPM to recognize a component method.
I have a SFSB that contains two DataModels. The first DataModel fills a clickable data table (AddressLookup.xhtml) which has a link to another page (AddressRequestListing.xhtml) with a second table filled by the second DataModel in the SFSB.
I keep getting this error
org.jbpm.JbpmException: couldn't evaluate expression '#{requestEntry.findRequests}'
Here is my page flow - pageflow.jpdl.xml
<pageflow-definition name="serviceRequestCreation">
| <start-page name="addressLookup" view-id="/AddressLookup.xhtml">
| <redirect/>
| <transition name="viewRequests" to="addressRequestListing">
| <action expression="#{requestEntry.findRequests}"/>
| </transition>
| </start-page>
| <page name="addressRequestListing" view-id="/AddressRequestListing.xhtml"/>
| </pageflow-definition>
Here is pages.xml
<pages>
| <page view-id="/AddressLookup.xhtml">
| <begin-conversation join="true" pageflow="serviceRequestCreation"/>
| </page>
| </pages>
Here is my SFSB
@Stateful
| @Name("requestEntry")
| public class RequestEntryAction implements com.stlouiscity.csb.ejb.action.RequestEntry {
|
| @PersistenceContext(unitName="CSB_Oracle", type=EXTENDED)
| private EntityManager em;
|
| @In(create=true)
| private Address address;
|
| @In(create=true, required=false)
| private AddressLookup addressLookup;
|
| @DataModel("addresses")
| private List<ParcelAddress> addresses;
|
| @DataModelSelection(value="addresses")
| @Out(required=false)
| private ParcelAddress selectedAddress;
|
| @DataModel("requests")
| private List<ServiceRequest> requests;
|
| @DataModelSelection(value="requests")
| private ServiceRequest selectedRequest;
|
| public RequestEntryAction() {
| }
|
| public void findAddresses() {
|
| if (address.getStreetName() != null) {
| System.out.println("Address Is NOT NULL");
| //Find ParcelAddress
| Query q = em.createQuery("Select a From ParcelAddress a Where" +
| " (a.structureAddress.nlc.streetDirection = :streetDirection OR :streetDirection IS NULL) AND" +
| " (lower(a.structureAddress.nlc.streetName) LIKE :street) AND" +
| " (((a.structureAddress.structureAddressPK.houseNumber = :houseNumber) OR" +
| " (:houseNumber BETWEEN a.structureAddress.houseLow AND a.structureAddress.houseHigh)) OR (:houseNumber IS NULL))");
| q.setParameter("houseNumber",address.getHouseNumber());
| q.setParameter("streetDirection",address.getStreetDirection());
| q.setParameter("street",address.getStreetName().toLowerCase() + "%");
|
| addresses = q.getResultList();
| } else {
| System.out.println("Address IS NULL");
| }
| }
|
| public void findRequests() {
| System.out.println("**********Entered findRequests*************");
| System.out.println("**********Selected Address: " + selectedAddress.toString());
| Query q = em.createQuery("Select s From ServiceRequest Where" +
| " s.parcelAddress = :parcelAddress");
| q.setParameter("parcelAddress",selectedAddress);
| requests = q.getResultList();
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035815#4035815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035815
More information about the jboss-user
mailing list