[JBoss Seam] - Re: Manager.switchConversation via Ajax4JSF actionListener d
by objectbay
Thanks for answering, Pete.
What I don't understand is why the first conversation in my steps-to-reproduce scenario is locked at that point in time (when trying to switch from the active conversation 2 back to conversation 1).
This would imply that my code for starting a new conversation
Conversation.instance().leave();
| Manager.instance().beginConversation("navigator");
| Manager.instance().redirect(Views.COMPUTATION.toString());
leaves the current conversation in a locked state, wouldn't it?
The other thing that puzzles me, is that the problem only occurs after a GET request.
As long as the current page is either submitted via a POST, or the conversation switched without POSTing just through the dropdown box, switching works fine. But as soon as a GET-request hits a conversation, switching breaks (i.e., the timeout problem occurs).
Does that mean that the GET request has a side-effect on the lock-state of conversations? Shouldn't all conversations get unlocked during Manager.endRequest?
thanks,
Karl
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120901#4120901
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120901
18 years, 5 months
[JBoss jBPM] - How to retrieve the Task list of a user ?
by francis1970
Hi all !
I have developed a web application which should be a front-end for a Jbpm process.
In the main Servlet I should list all Task pending for a user.
Unfortunately the task list is empty, where do I am wrong ??
This is the simple process:
<process-definition
| xmlns="urn:jbpm.org:jpdl-3.2"
| name="simple">
| <swimlane name="user">
| </swimlane>
| <start-state name="start">
| <transition name="" to="state1"></transition>
| </start-state>
| <state name="state1">
| <transition name="" to="task1"></transition>
| </state>
| <task-node name="task1">
| <task name="task1" swimlane="user"></task>
| <transition name="" to="end1"></transition>
| </task-node>
|
| <end-state name="end1"></end-state>
|
| </process-definition>
Inside the servlet I signal the process until it reaches the Task1.
Then I expect to find one pending task for user "user". But the list is empty.
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
|
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
|
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("processDefinition.xml");
|
| jbpmContext.deployProcessDefinition(processDefinition);
|
| ProcessInstance instance = new ProcessInstance(processDefinition);
|
|
| // Move the process instance from its start state to the state1.
| instance.signal();
|
| System.out.println("You are in state: "+instance.getRootToken().getNode().getName());
|
| // Move to Task1
| instance.signal();
|
| Vector vec = new Vector();
| vec.add("user");
|
| List list = jbpmContext.getGroupTaskList(vec);
|
| if (list != null) {
| for (int ii=0;ii<list.size();ii++){
| System.out.println(list.get(ii));
| }
| }
Unfortunaly the List is empty.
What is missing ? Have I assigned uncorrectly the task to "user" ??
or Should I istantiate the Actor class and inject the "user" as userId ?
I'm using JBoss 4.0.2 and JBPM 3.2
Thanks
Francesco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120900#4120900
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120900
18 years, 5 months
[JBoss Seam] - Removing Stateful Session Beans from the Session gracefully
by Oberiko
Hello,
I'm currently in the midst of (slowly) teaching myself how to use Seam. In my "myFirstProject" project, I've got two pages, one which saves entities to the database, and another which pulls them out, lists them and allows the user to delete them. Each screen can navigate to the other.
For my list, I'm using a Stateful Session Bean (SFSB) in the session scope. When I go back to the entry screen and add more users, naturally they won't appear on the list screen since its drawing on a list currently in the session (populated by a "@factory" method)
I've been looking around, but I can't seem to find how to properly remove objects from the session scope properly when they are no longer needed.
Am I supposed to call the "destroy()" method when I go back to the entry screen?
Should I instead change this into the conversation scope (which seems a bit much for a single list page) and add a "@begin" and "@end"?
Is there a much more elegant solution I'm simply overlooking?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120899#4120899
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120899
18 years, 5 months
[JBossWS] - unexpected XML reader state
by kosmos
We've generated ws client by means of wxconsume from jbossws-native-2.0.2.GA. Everything looked good, until we got an exception.
| javax.xml.ws.WebServiceException: unexpected XML reader state. expected: END_ELEMENT but found: START_ELEMENT
| at com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder.toInternalMessage(Unknown Source)
| at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.receive(Unknown Source)
| at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(Unknown Source)
| at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.send(Unknown Source)
| at com.sun.xml.internal.ws.encoding.soap.internal.DelegateBase.send(Unknown Source)
| at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.implementSEIMethod(Unknown Source)
| at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.invoke(Unknown Source)
| at $Proxy17.listStudents(Unknown Source)
| at testContingent.main(testContingent.java:32)
| Caused by: unexpected XML reader state. expected: END_ELEMENT but found: START_ELEMENT
| at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.verifyReaderState(Unknown Source)
| at com.sun.xml.internal.ws.encoding.soap.SOAPDecoder.decodeBody(Unknown Source)
| at com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder.decodeBody(Unknown Source)
| at com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder.decodeEnvelope(Unknown Source)
| ... 9 more
|
| public class testContingent {
| public static void main(String[] args) {
| Contingent contingent = new Contingent();
| StudentsSrvPort studentsSrvPort = contingent.getContingentSOAP();
| ObjectFactory of = new ObjectFactory();
| ListStudentsRequest listStudentsRequest = of.createListStudentsRequest();
| listStudentsRequest.setFirstName("");
| listStudentsRequest.setMiddleName("");
| listStudentsRequest.setLastName("");
| listStudentsRequest.setStudentState("");
| listStudentsRequest.setGender("");
| listStudentsRequest.setCardNumber("");
| listStudentsRequest.setDisabled(null);
| listStudentsRequest.setDormitory(null);
| listStudentsRequest.setForeign(null);
| listStudentsRequest.setGroup("5-11");
| try{
| List<Student> studList = new ArrayList<Student>(studentsSrvPort.listStudents(listStudentsRequest).getStudent());
|
| if (studList != null) {
| for (Student stud : studList){
| System.out.println(new String((stud.getId()+" "+stud.getName()).getBytes("UTF8")));
| }
| }
| } catch (WebServiceException e) {
| e.printStackTrace();
| } catch (UnsupportedEncodingException e) {
| e.printStackTrace();
| }
| }
| }
|
Here is our POST
| POST /SOAP HTTP/1.1
| Content-Length: 501
| SOAPAction: "http://contingent.bmstu.ru/listStudents"
| Accept: text/xml, application/xop+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
| Content-Type: text/xml; charset=utf-8
| User-Agent: Java/1.6.0_01
| Host: contingent.bmstu.ru:144
| Connection: keep-alive
|
| <?xml version="1.0" ?>
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://contingent.bmstu.ru/">
| <soapenv:Body>
| <ns1:listStudentsRequest>
| <ns1:lastName></ns1:lastName>
| <ns1:firstName></ns1:firstName>
| <ns1:middleName></ns1:middleName>
| <ns1:group>5-11</ns1:group>
| <ns1:gender></ns1:gender>
| <ns1:cardNumber></ns1:cardNumber>
| <ns1:studentState></ns1:studentState>
| </ns1:listStudentsRequest>
| </soapenv:Body>
| </soapenv:Envelope>
|
And server's response
| HTTP/1.1 200
| Server: nginx/0.5.20
| Date: Thu, 17 Jan 2008 13:53:35 GMT
| Content-Type: text/xml; charset=utf-8
| Connection: keep-alive
| Content-length: 38923
|
| <?xml version='1.0'?>
| <soapenv:Envelope xmlns:ns1='http://contingent.bmstu.ru/'
| xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
| xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
| xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <soapenv:Body>
| <listStudentsResponse xsi:type='ns1:listStudentsResponse'>
| <student xsi:type='ns1:Student'>
| <id>67b8a137-8636-4c20-9649-00000001b583</id>
| <name>xxx xxx xxx</name>
| <firstName>xxx</firstName>
| <middleName>xxx</middleName>
| <lastName>xxx</lastName>
| <gender xsi:type='ns1:Classifier'>
| <id>2c4fdb64-0c14-4dd1-81c1-000000000001</id>
| <name>xxx</name>
| </gender>
| <cardNumber>07ã024</cardNumber>
| <studyType xsi:type='ns1:Classifier'>
| <id>f3fd113a-e251-4816-b411-000000000001</id>
| <name>xxx</name>
| </studyType>
| <studentState xsi:type='ns1:Classifier'>
| <id>9e32657c-61c5-4e58-8ca6-000000000002</id>
| <name>xxx</name>
| </studentState>
| <dormitory>false</dormitory>
| <group xsi:type='ns1:Group'>
| <id>e3664f92-3b36-430e-a638-000000001afa</id>
| <name>5-11</name>
| </group>
| <profession xsi:type='ns1:ProfessionClassifier'>
| <id>ffffffff-ffff-ffff-ffff-ffffffffffff</id>
| <professionCode>230102</professionCode>
| <specializationCode>00</specializationCode>
| <qualificationCode>65</qualificationCode>
| </profession>
| <disabled>false</disabled>
| <foreign>false</foreign>
| <militaryState xsi:type='ns1:Classifier'>
| <id>a6d7fb86-4925-4aed-89bf-000000000000</id>
| <name/>
| </militaryState>
| </student>
| </listStudentsResponse>
| </soapenv:Body>
| </soapenv:Envelope>
|
That looks like a bug.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120895#4120895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120895
18 years, 5 months