Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Removing Users assigned to a role dynamically

Hi,

We have a process. In each block we have used "Assign Users to process role" callable object for assigning a set of users to the role of that block. But in a scenario we want to replace the existing users with a new set of users. Is there any way of doing this using GP API.

In simple terms we want to remove the users assigned to a role dynamically. We tried the code

IGPProcessRoleInstance processRoleInstance=executionContext.getProcessRoleInstance();
processRoleInstance.removeUser(IUser);

We also tried

IGPRuntimeManager rtm=GPProcessFactory.getRuntimeManager();
rtm.changeTaskProcessor(processInstanceId, activityInstanceId, currentUserContext, newUserContext);

None of them are helping. They are also not throwing any exception. But using the same IGPProcessRoleInstance we could add a runtimeDefinedUser.

Is it actually possible to remove or replace the user for a role. If so is there any other api or way through which it could be achieved. Would appreciate quick inputs.

Thanks in advance.

Thanks and Regards,

Srinivasan Subbiah

Not what you were looking for? View more on this topic or Ask a question