cancel
Showing results for 
Search instead for 
Did you mean: 

User's propagation for custom actions

Former Member
0 Kudos

Good day!

We have implemented custom action and process them through BPM inbox. We found that there is no logged in user propagation, all actions processed by SAP_BPM_Service.

How can we fix it?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I can confirm that it is an error in BPM API.

The method below uses pure API and we get SAP_BPM_Service as the caller.

public String closeTask(String taskID) {
logger.debugT("BeanCloseTask: Start");
URI taskInstanceId = URI.create("bpm://bpm.sap.com/task-instance/" + taskID);
   TaskInstanceManager taskInstanceManager = BPMFactory.getTaskInstanceManager();
   CustomAction customAction = new CustomAction("approve");
   TaskDetail taskDetail = taskInstanceManager.getTaskDetail(taskInstanceId);
DataObject taskOutputData = taskDetail.getOutputDataObject();
logger.debugT("BeanCloseTask:" + taskOutputData.getString(0) + taskOutputData.getString(1) + taskOutputData.getString(2));
taskInstanceManager.claim(taskInstanceId);
taskInstanceManager.complete(taskInstanceId, taskOutputData, customAction);
  
return "OK";
}
junwu
Active Contributor
0 Kudos

this is your ejb method? can you make it authentication required?

Former Member
0 Kudos

Hello Jun, it is an example only (BPM inbox gives the same behavior). When we check the logged user in the bean, it's not a service one.

ch_loos
Advisor
Advisor
0 Kudos

Hi Kirill,

can you please report this via OSS?

Thanks,

Christian

Former Member
0 Kudos

Hello Christian, yes, I have done it already. Hope will receive a suitable decision.

junwu
Active Contributor
0 Kudos

did u enable that feature(user propagation)?

Former Member
0 Kudos

Yes, we did. And this option is suitable only for automatic activites.

I think it could be an error in BPM API. I hope SAP's guys will clarify that situation.