Hi guys,
I have a requirement where I need to get the current active UWL task id in BPM context. I have seen the following code to create a direct execution url for a BPM task.
// begin session IUWLSession uwlSession; uwlSession = uwlService.beginSession(uwlContext, sessionIdleTimeout); uwlContext.setSession(uwlSession); IUWLItemManager itemManager = uwlService.getItemManager(uwlContext); QueryResult result = itemManager.getItems(uwlContext, null, null); ItemCollection items = result.getItems(); Item item = null; for (int i = 0; i < items.size(); i++) { item = items.get(i); Map params = new HashMap(); params.put("taskId", item.getExternalId()); String executionURL = WDURLGenerator.getApplicationURL("sap.com/tc~bpem~wdui~taskinstance", "ATaskExecution", params);
This works fine, but this is looping through all the tasks assigned to a user. How do I get the current task ID. I want to use the code inside webdynpro application which is caled as a human activity in BPM. When this WebDynpro application is called I would like to know the current task ID.
As an FYI , UWL configuration passes the current task ID as a Dynamic parameter to "sap.com/tcbpemwdui~taskinstance"
application.
Please help if someone can identify how to get this value in my custom WD.
Thanks,
Yomesh.