Skip to Content
author's profile photo Former Member
Former Member

Can`t get Runtime GP Action Attribute Values from Web Dynpo

Dear experts ,

I am in dire need of help.

In my portal I have a GP (Proccess , Block , Action)

From Web Dynpro I need to get the runtime value of a attribute in the action.(that is currently being processed)

For this currently I first get the runtime manager

IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
	IGPDesigntimeManager dtm = GPProcessFactory.getDesigntimeManager() ;

	IGPUserContext userContext = this.getUserContext();

Then I get the activities for the process

IGPProcessInstanceInfo[] processInstanceInfoArray = rtm.getRunningInstances(GPSearchRole.SEARCH_ROLE_OWNER, java.sql.Date.valueOf("2008-08-01") , java.sql.Date.valueOf("2008-08-10"), userContext);
		for (int i=0; i<processInstanceInfoArray.length; i++)
			messageMgr.reportSuccess("Nr. Actions: " + processInstanceInfoArray<i>.getTotalNumberOfActions() );
			IGPProcessInstance processInstance =  rtm.getProcessInstance(processInstanceInfoArray<i>, userContext);
			messageMgr.reportSuccess("ID processInstance: " + processInstance.getID() );
			IGPBlockInstance blockInstance = (IGPBlockInstance)processInstance.getChildrenInformation()[0];	
			messageMgr.reportSuccess("ID blockInstance: " + blockInstance.getID() );		
			IGPActivityInstance[] activityInstance = blockInstance.getChildrenInformation();
			messageMgr.reportSuccess("getChildrenInformation: " + activityInstance.length);

Then I try to read the attributes

for( int j=0; j<activityInstance.length; j++)
				messageMgr.reportSuccess("ID activityInstance: " + activityInstance[j].getID());
				messageMgr.reportSuccess("isAction: " +  activityInstance[j].isAction() );
				messageMgr.reportSuccess("isBlock: " +  activityInstance[j].isBlock() );
				IGPActionInstance actionInstance = rtm.getActionInstance(processInstance.getID(), activityInstance[j].getID() , userContext); //blockInstance.getDecisionActionInformation();
				messageMgr.reportSuccess("ID actionInstance: " + actionInstance.getID());
				Collection collectionAttr = actionInstance.getTemplate().getInputParameters().getAttributes();
				Iterator itr = collectionAttr.iterator();

					IGPAttributeInfo attr = (IGPAttributeInfo);
					messageMgr.reportSuccess("attr: " +  attr.toString() );// this works
					IGPStructureInfo structureInfo = attr.getStructureInfo();

					Collection output = structureInfo.getStructures();
					Iterator itr2 = output.iterator();
						IGPStructureInfo str = (IGPStructureInfo);
						IGPStructure structure = GPStructureFactory.getStructure(str);
						messageMgr.reportSuccess("str: " +  structure.toString() );
						//IGPAttributeInfo attr3 = str.getAttributeValues();
						//Collection output3 = str.getAttributeValues(attr.getTechName());
						//Iterator itr3 = output3.iterator();
						//	IGPAttributeInfo attr3 = (IGPAttributeInfo);
					//		messageMgr.reportSuccess("attr3: " +  attr3.toString());
					//	}						

This brings me the attribute name but the attribute value shows up as null and not the value that is specified at runtime (u201C123u201D).

What changes do I need to do in order for this to work properly?

Thank you in Advance,


Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 20, 2008 at 02:10 PM

    Can you please explain how will you get the ID of currently running action in Web dynpro

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 19, 2008 at 03:20 PM

    Could you solve your problem?

    I am also looking for similar solution, so can you please share your solution?



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 22, 2008 at 12:24 PM

    Hi Evandro,

    I am also trying to retrieve some of the runtime values from GP process.

    I am unable to get this class in my developer studio.


    I am currently using NWDS version 7.0.15.

    can you please share , which was your NWDS server version?



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.