I am trying to add a user into a global group with global role in Polarion using workflow script by providing an input. Can you please help me how to call the below packages into workflow script?
- com.polarion.alm.shared.api.model.usergroup
- com.polarion.alm.shared.api.transaction
also, how to write the below code in workflow script?
TransactionalExecutor.executeInWriteTransaction(transaction -> {
UpdatableUserGroup updatableUG = transaction.userGroups().getBy().id("groupId").getUpdatable(transaction);
UpdatableUsersField updatableUsersField = updatableUG.fields()._users();
updatableUsersField.addUser("dummy_user");
updatableUsersField.addUser("dummy_user2");
updatableUG.save();
return null;
});