JDeveloper 18.104.22.168, BPM/SOA 22.214.171.124, WLS 10.3.6
I am working on a custom BPM Workspace kind of page and need to query the tasks for the current logged in user.
For initial testing, I tried the following API to get the workflow context of the user by passing the hardcoded values of username and password. And it works fine.
IBPMContext ctx = getBPMServiceClientFactory().getBPMUserAuthenticationService().authenticate(username, password.toCharArray(), null);
But ideally, we should be getting the workflow context directly from the already authenticated user
Just for testing purpose I am trying to call the following API from a user task on a button click.
(I am testing from BPM workspace, which means the user is already authenticated)
IWorkflowContext workflowContext = queryService.getWorkflowContextForAuthenticatedUser();
I also tried to call the getWorkflowContextForAuthenticatedUser() after successful authentication (after the getBPMUserAuthenticationService().authenticate() method)
But it was still not working.
Can anyone please let me know how to get the workflow context for the logged in user.
Thanks for any help