|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Setting data to a workItem | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | silver | 
			  
				|  Posted: Mon May 09, 2005 1:34 am    Post subject: Setting data to a workItem |   |  |  
		  | Newbie
 
 
 Joined: 23 Mar 2005Posts: 4
 
 
 | 
			  
				| Hi, I am new to WorkFlow. I have set data to the in container and when I am trying to retrive it from the outcontainer am getting an exception. The following is my code. 
 ProcessTemplate[] templates = _workflowConnection.queryProcessTemplates("NAME = '" + _templateName + "'",	null,null);
 ReadWriteContainer inputContainer = myTemplate.initialInContainer();
 
 try {
 ContainerElement[] containerElements = workItem.outContainer().leaves();
 for (int i = 0; i < containerElements.length; i++)
 {
 if (containerElements[i].fullName().indexOf("workflow")== -1)
 {
 try
 {
 fields.put(containerElements[i].fullName(),containerElements[i].getString());
 }
 catch (FmcException fmcException)
 {
 continue;
 }
 }
 }
 WorkItem.setOutContainer(inputContainer);
 return myTemplate.createAndStartInstance2("Leave Process",null,null,inputContainer,false);
 }
 
 
 Now when I am trying to get the values form the outcontainer, I am getting an exception "Object value not set"
 
 Could any one please help me in this.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | jmac | 
			  
				|  Posted: Mon May 09, 2005 5:17 am    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 27 Jun 2001Posts: 3081
 Location: EmeriCon, LLC
 
 | 
			  
				| Perhaps you could give a little bit of background here... I am confused, you access the Source container from the Template, then the output container from a workitem.  Where exactly is this code running? _________________
 John McDonald
 RETIRED
 |  |  
		  | Back to top |  |  
		  |  |  
		  | vennela | 
			  
				|  Posted: Mon May 09, 2005 6:06 am    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 11 Aug 2002Posts: 4055
 Location: Hyderabad, India
 
 | 
			  
				| 
   
	| Quote: |  
	| I have set data to the in container and when I am trying to retrive it from the outcontainer am getting an exception. |  I haven't looked at the code but you should be getting from Input Container and setting to Output Container.
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  |  |  |