Hello,
using the VC 7.1 I have modeled a dialog which contains a button which invokes a web service.
This web service is meant to initiate a GP process and navigate to the dialog of the first work item.
To this end, I have written the following implemenation of the web service:
IUser currentUser = UMFactory.getUserFactory().getUserByLogonID("Developer");
IGPUserContext currentUserContext = GPContextFactory.getContextManager().createUserContext(currentUser);
IGPProcess workflow = GPProcessFactory.getDesigntimeManager().getActiveTemplate("126C6F00A4F211DDCB350019BBD3A378", currentUserContext);
IGPRuntimeManager gpRuntimeManager = GPProcessFactory.getRuntimeManager();
IGPStructure param = GPStructureFactory.getStructure(workflow.getInputParameters());
IGPProcessRoleInstanceList roles = gpRuntimeManager.createProcessRoleInstanceList();
gpRuntimeManager.startProcess(workflow, "PurchaseRequisition", "PurchaseRequisition", currentUser, roles, param, currentUser);
IGPWorkItem currentWorkItem = gpRuntimeManager.getWorkItems(GPWorkItemStatus.WORKITEM_STATUS_OPEN, currentUserContext)[0];
WDPortalNavigation.navigateAbsolute(currentWorkItem.generateNavigationTargetForSingleTaskUI(), WDPortalNavigationMode.SHOW_HEADERLESS_PORTAL, WDPortalNavigationHistoryMode.NO_DUPLICATIONS, currentWorkItem.generateBusinessParametersForSingleTaskUI());
The creation of the GP process works fine. However, the last line fails with a NullPointerException. Unfortunately, the exception does not provide further information.
I guess that the navigation target cannot be found.
According to this blog [https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9743] I have to copy the target dialog to the PCD. Is that correct? Can someone please tell me, to which exact location I have to copy the target dialog?
Best regards
Alexander