hanataba
(hanataba)
April 15, 2022, 2:24pm
1
Description
The following program works. but, it sometimes fails.
When run CreateBO in “room2”, BO_ID become null.
struct BOSetting
{
std::wstring name;
std::vector<std::wstring> userids;
};
//rooms is BOSetting array. name and userids is setted before this code.
//rooms value like this
// [
// {"room1", ["user1useridstr","user1useridstr"]},
// {"room2", ["user3useridstr","user4useridstr"]},
// ]
for (int i = 0; i < rooms.size(); i++) {
auto room = rooms[i];
const wchar_t* BO_ID = MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->CreateBO(room.name.c_str());
for (int j = 0; j < room.userids.size(); j++)
{
if (MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->AssignUserToBO(room.userids[j].c_str(), BO_ID)) {
print("AssignUserToBO success");
}
else
{
print("AssignUserToBO error");
}
}
}
Should I do the following? But onBOCreateSuccess is slow.
Create BO → Wait for onBOCreateSuccess → Create the next BO
Maybe IBatchCreateBOHelper can solve it? Can you create it all at once?
Which Windows Meeting SDK version?
v5.9.3.3191
Device (please complete the following information):
Device:
Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz 2.10 GH
16.0 GB RAM
1T SSD
OS: Windows 10 Pro 64bit
Hi @hanataba ,
You are definitely on the right track asking about the IBatchCreateBOHelper
. This class allows you to add multiple rooms to the helper, and then create them all via CreateBoTransactionCommit
. Be sure to call CreateBOTransactionBegin
before you start adding breakout room names.
Thanks!
hanataba
(hanataba)
April 16, 2022, 11:35am
3
@jon.lieblich
Thank you. I changed the program as below
MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->GetBatchCreateBOHelper()->CreateBOTransactionBegin();
for (int i = 0; i < rooms.size(); i++) {
auto room = rooms[i];
const wchar_t* BO_ID = MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->CreateBO(room.name.c_str());
for (int j = 0; j < room.userids.size(); j++)
{
if (MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->AssignUserToBO(room.userids[j].c_str(), BO_ID)) {
print("AssignUserToBO success");
}
else
{
print("AssignUserToBO error");
}
}
}
MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->GetBatchCreateBOHelper()->CreateBoTransactionCommit();
but I have the same problem.
i think , i have to CreateBoTransactionCommit() run every time CreateBO().
and i changed the program as below.
MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->GetBatchCreateBOHelper()->CreateBOTransactionBegin();
for (int i = 0; i < rooms.size(); i++) {
auto room = rooms[i];
const wchar_t* BO_ID = MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->CreateBO(room.name.c_str());
for (int j = 0; j < room.userids.size(); j++)
{
if (MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->AssignUserToBO(room.userids[j].c_str(), BO_ID)) {
print("AssignUserToBO success");
}
else
{
print("AssignUserToBO error");
}
}
MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->GetBatchCreateBOHelper()->CreateBoTransactionCommit();
}
but I have the same problem.
i think , i have to CreateBOTransactionBegin() and CreateBoTransactionCommit() run every time CreateBO().
and i changed the program as below.
for (int i = 0; i < rooms.size(); i++) {
auto room = rooms[i];
MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->GetBatchCreateBOHelper()->CreateBOTransactionBegin();
const wchar_t* BO_ID = MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->CreateBO(room.name.c_str());
for (int j = 0; j < room.userids.size(); j++)
{
if (MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->AssignUserToBO(room.userids[j].c_str(), BO_ID)) {
print("AssignUserToBO success");
}
else
{
print("AssignUserToBO error");
}
}
MyMeetingBOControllerEvent::GetInstance().mypCreatorObj->GetBatchCreateBOHelper()->CreateBoTransactionCommit();
}
but I have the same problem.
what should i do?
hanataba
(hanataba)
April 18, 2022, 12:43pm
4
@jon.zoom
Can you give me some information?
Hi @hanataba ,
It does not look like IBatchCreateBOHelper
is being used correctly. After create the transaction, you should use the AddNewBoToList
for each breakout room you would like to create. After these have all been added to the helper through that method, you commit the transaction. CreateBO
is only meant to be used for creating rooms individually.
Thanks!
1 Like
precisao
(Precisão-i)
April 20, 2022, 2:00pm
6
And, additionally, I suppose you can only AssignUserToBO after the creation is committed.
1 Like
hanataba
(hanataba)
April 21, 2022, 5:02am
7
@jon.zoom @precisao
Thank you for your reply.
When can I get the BOID?
Is onBOCreateSuccess called when committed?
If called,
Will it be called once?
Or is it called as many as the number of BOs made?
Hi @hanataba ,
You provide the ID when you call AddNewBoToList
, and it will also be provided in the onBOCreateSuccess
callback, which is triggered each time a breakout room is successfully created.
Thanks!
1 Like
system
(system)
Closed
May 22, 2022, 7:09am
9
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.