Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Unable to start process via GP API in which group is exposed as input


I am not been able to start process using GP API for the particular senario.

I created Process at design time.

In this process I mapped parameters to a group and exposed this group, So that input is required for initiating the process.

Now I want to initiate this process via GP API.

I got sucess in starting processes which takes parameters as inputs or which does not need any inputs, but i was not been able to start process where group is exposed.

it's giving me GP INVOCATION Exception.

Please Help ASAP



Former Member
Former Member replied


I try to simulate with scenario described by you and I got success with my test.

Follow my java code:

	public boolean initiateProcessSDN () { 
		boolean ret = false;
		try {
			IUser user = UMFactory.getUserFactory().getUserByLogonID("uces");
			IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(user);
			IGPProcess processTemplate 
				= GPProcessFactory.getDesigntimeManager().getActiveTemplate(
						"8DC0B411957D11DDB7910017F2EBE4A5", userContext);
			IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
			IGPStructure params	= GPStructureFactory.getStructure(processTemplate.getInputParameters());
			params.setAttributeValue("NameGroup", "Pedro");
			params.setAttributeValue("AddressGroup", "XPTO");
			IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
			IGPProcessInstance prInstance 
				= rtm.startProcess(	processTemplate, 
								"Test 1", 
								"Test 2",
			ret = true;
			} catch (Exception ex) {
				ret = false;
		return ret;

Print screen about my GP design:

Callable Object with 4 parameters

Action grouping CO parameters into 2 groups

Process reflecting these groups as input parameters

Process started by java code above

Best Regards,

Pedro Nunes

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question