Quantcast
Channel: SCN : All Content - SAP Business Process Management
Viewing all articles
Browse latest Browse all 887

how to get current task ID in BPM

$
0
0

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.


Viewing all articles
Browse latest Browse all 887

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>