KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > xml > ReceiveReader


1 package org.jbpm.bpel.xml;
2
3 import org.w3c.dom.Element JavaDoc;
4
5 import org.jbpm.bpel.def.Activity;
6 import org.jbpm.bpel.def.Receive;
7 import org.jbpm.bpel.service.def.Receiver;
8 /**
9  * @author Juan Cantú
10  * @version $Revision: 1.5 $ $Date: 2005/06/16 19:15:34 $
11  */

12 public class ReceiveReader extends ActivityReader {
13
14   protected Activity createActivity() {
15     return new Receive();
16   }
17   
18   protected void readActivity(Activity activity, Element JavaDoc element) {
19     Receive receive = (Receive) activity;
20     Boolean JavaDoc createInstance = bpelReader.readTBoolean(
21         element.getAttributeNode(BpelConstants.ATTR_CREATE_INSTANCE), Boolean.FALSE);
22     
23     receive.setCreateInstance(createInstance.booleanValue());
24     Receiver receiver = bpelReader.readReceiver(element, receive.getCompositeActivity());
25     receive.setReceiver( receiver );
26     receiver.setInboundMessageActivity( receive );
27   }
28 }
29
Popular Tags