on 10-07-2008 1:20 PM
Hi,
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
Regards,
Pratik
Pratik,
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",
user,
roles,
params,
user);
ret = true;
} catch (Exception ex) {
ret = false;
}
return ret;
}
Print screen about my GP design:
Callable Object with 4 parameters
http://img530.imageshack.us/img530/16/sdngpgroup001bt5.jpg
Action grouping CO parameters into 2 groups
http://img147.imageshack.us/img147/2006/sdngpgroup002xy3.jpg
Process reflecting these groups as input parameters
http://img147.imageshack.us/img147/9184/sdngpgroup003pp0.jpg
Process started by java code above
http://img530.imageshack.us/img530/8833/sdngpgroup004no4.jpg
Best Regards,
Pedro Nunes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Pedro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.