cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the process level parameters of GP Process using GP API ?

Former Member
0 Kudos

Hi All,

I am in the process of coming up with a GP Runtime dashboard which displays the information regarding all the running processes for an user. As a part of that I need to access the output parameters of the process which are actually populated by the callable object. I tried out things in the following way:

	
IGPStructureInfo struct = actionInstance.getTemplate().getOutputParameters();
Collection collection = struct.getAttributes();
Iterator iterator = collection.iterator();
while(iterator.hasNext()){
      IGPAttributeInfo test = (IGPAttributeInfo)iterator.next();
      wdComponentAPI.getMessageManager().reportSuccess("test.getnamesapce"+test.getNamespace());
      wdComponentAPI.getMessageManager().reportSuccess("test.label.name"+test.getLabel().getName());
      wdComponentAPI.getMessageManager().reportSuccess("test.label.name"+test.getTechName();
}

The above code is not working as expected. Is it some way to pull out those parameters of the callable object or the process as such ?

-Thanks in advance

KN

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member206397
Contributor
0 Kudos

Hi,

Your coding concept is right. But what do you want to get from process. Do you want to get last level output parameter of process? Here I am sending you a link. Here you will get all types of combinational code what you want. Please check it if you have not checked it before. If your requirement is not solved please let me know I will try in my project.

http://help.sap.com/saphelp_nw70/helpdata/en/fa/0774413aff5458e10000000a1550b0/frameset.htm

One More thing have you tried like this thing

IGPProcess process =

GPProcessFactory.getDesigntimeManager().getActiveTemplate(

// by specifying its ID

processId,

// and the user accessing it

userContext);

//........ retrieve the Runtime Manager

IGPStructureInfo struct = process.getOutputParameters();

Collection attributes = struct.getAttributes();

for (Iterator iter = attributes.iterator(); iter.hasNext();) {

IGPAttributeInfo attribute = (IGPAttributeInfo) iter.next();

...................

...................

...................

}

Thanks

Chandan

Message was edited by:

Chandan Jash

Former Member
0 Kudos

Hi Chandan,

I am trying to pull out the output parameters of the process as a whole. For example: Say one of my action has a callable object CO1 and it has two output parameters defined like Customer Name and Request Number. These two parameters I know would be mapped at the process level and I assume I should be able to pull them out to display in my report.

Any clue on this ?

former_member206397
Contributor
0 Kudos

Hi,

Have you tried with the code which I have sent to you. And please check the link which I have sent. You will get your result because same thing is implemented there.

Thanks

Chandan