Skip to Content
0
Former Member
Jul 29, 2009 at 06:45 AM

Problem in Execute Method in webdynpro for Java

19 Views

Hi Gurus,

I am getting input from GP context as follows.

input

-->HeaderStructure

-


>HeaderStructure(1)

-


>ReqSequence

-


>Comments

-


>HeaderStructure(2)

-


>ReqSequence

-


>Comments

I am using the code to set "Comments" to my value node in Execute Method.

this.executionContext = executionContext;
IGPStructure input = executionContext.getInputStructure();
IGPStructure headerInputStrcuture = input.getStructure("HeaderStructure");
Collection headerInput = input.getStructures("HeaderStructure");

  for (Iterator iter1 = headerInput.iterator();iter1.hasNext();) 
			{
					   	
	   	
			Collection struct_reqsequence_in_list =
			headerInputStrcuture.getStructures("ReqSequence");
			IPrivateCO_DdptsInterface.IVn_ReqSequenceElement reqSequenceElement;
			read the ReqSequence elements and set it to context	
			for (Iterator iter = struct_reqsequence_in_list.iterator();
				iter.hasNext();
				) {
				IGPStructure struct_reqsequence_in = (IGPStructure) iter.next();
				reqSequenceElement = wdContext.createVn_ReqSequenceElement();
				reqSequenceElement.setVa_comments(struct_reqsequence_in.getAttributeAsString("Comments"));
				
				wdContext.nodeVn_ReqSequence().addElement(reqSequenceElement);
			}

While i am running this code server is getting shutdown.I think loop is running for infinite?

Can you please tell me how can i get the "Comments" values from both strutures.

The code which i wrote is correct?

Regards

Rajesh