I am looking for an API to populate a workspace from code. The rtb_api.p is not much help. I also created some API's myself a long time ago. But to be honest I am not sure where to start anymore. Thanks. [/mls01/rtb/rtb101c/gui/rtb/p] grep ^PROC rtb_api.p PROCEDURE add_task : PROCEDURE assign_object : PROCEDURE check_in_object : PROCEDURE check_object_integrity : PROCEDURE check_out_object : PROCEDURE compile_object : PROCEDURE complete_task : PROCEDURE create_object : PROCEDURE create_variant : PROCEDURE create_xrefs : PROCEDURE delete_object : PROCEDURE extract_object : PROCEDURE login : PROCEDURE logout : PROCEDURE selective_compile : PROCEDURE set_paths : PROCEDURE set_session_id : PROCEDURE set_task : PROCEDURE set_workspace_id : PROCEDURE unlock_object : [/mls01/rtb/rtb101c/gui/rtb/p] grep ^PROC rtb_api.i PROCEDURE get_object_share_status: PROCEDURE set_object_share_status: PROCEDURE get_object_version_note: PROCEDURE set_object_version_note: PROCEDURE check_available_task: PROCEDURE get_task_directory: PROCEDURE get_object_absolute_pathnames: PROCEDURE get_object_version: PROCEDURE get_object_version_task: PROCEDURE get_object_update_status: PROCEDURE get_object_object_status: PROCEDURE check_available_object: PROCEDURE get_workspace_tasks: PROCEDURE get_task_objects: PROCEDURE get_object_versions: PROCEDURE get_object_product_module: PROCEDURE set_wspace_id : PROCEDURE check_available_object_alias: PROCEDURE get_object_version_description: PROCEDURE set_object_version_description: PROCEDURE get_object_details: PROCEDURE get_object_version_details: [/mls01/rtb/rtb101c/gui/rtb/p]
Why are my posts always on one line after posting?
Which RTB version are you using ? the path seems to indicate rtb 10.1c.
In a recent RTB version I'd check if the automation toolkit can do it.
AFAIK you need to
for each rtb_object where wspace-id = myworkspace:
run rtb_nams to get the paths.
create the directories , not sure if it's required but it's in my code.
run rtb_extract_object to extract.
end.
Don't know how to attach code here so I'll mail something .
Yes, we are still using 10.1C... Thanks, but I was hoping to directly call the procedure that is behind the menu Workspace, Workspace Maintenance, <select workspace>, File, Populate Workspace.
It is probably ./rtb/w/rtb_popws.w but it is encrypted so I have to figure out the i/o parameters. Any ideas? Probably I need the wspace-id...
Thanks, probably need to run it persistent and run the populate_workspace procedure...
Edit: no that is not true. probably can run it directly...
[/mls01/rtb/rtb101c/gui] strings ./rtb/w/rtb_popws.r | head -10
29E000D9utf-8
MAIN rtb\w\rtb_popws.w,,INPUT Pwspace-id CHARACTER
PROCEDURE RTB_xref_generator,,
PROCEDURE populate_workspace,,
PROCEDURE initializeObject,,
PROCEDURE enable_UI,,
PROCEDURE disable_UI,,
PROCEDURE adm-create-objects,,
PROCEDURE start-super-proc,,INPUT pcProcName CHARACTER
PROCEDURE adm-clone-props,,
[/mls01/rtb/rtb101c/gui]
It is the correct functionality but unfortunately this has a GUI in front of it. :-(
DEFINE VARIABLE Merror AS CHARACTER NO-UNDO. DEFINE VARIABLE MhStatus AS HANDLE NO-UNDO. DEFINE VARIABLE Mok AS LOGICAL NO-UNDO. MESSAGE SUBSTITUTE("Populate module(s) '&1' in workspace '&2'?",Mmodule,Pwspace-id) VIEW-AS ALERT-BOX WARNING BUTTONS YES-NO TITLE Malert-title UPDATE Mok. IF Mok THEN DO: SESSION:SET-WAIT-STATE("GENERAL":U). /* Display status window */ IF CONNECTED("rtb":U) THEN DO: RUN hideObject IN SOURCE-PROCEDURE. MhStatus = DYNAMIC-FUNCTION('fnRtbRunWindowOnce':U,"rtb/w/rtb_procstat.w"). RUN rtb_set_window_title IN MhStatus (INPUT Malert-title). END. SESSION:SET-WAIT-STATE("GENERAL":U). Merror = DYNAMIC-FUNCTION('fnRtbPopulateWorkspace':U IN h_rtb_u_ws,Pwspace-id,Mmodule). SESSION:SET-WAIT-STATE(""). IF VALID-HANDLE(MhStatus) THEN DO: RUN destroyObject IN MhStatus. MhStatus = ?. RUN viewObject IN SOURCE-PROCEDURE. END. IF Merror <> "" THEN MESSAGE Merror VIEW-AS ALERT-BOX ERROR TITLE Malert-title. ELSE MESSAGE SUBSTITUTE("Module '&1' in workspace '&2' successfully populated.",Mmodule,Pwspace-id) VIEW-AS ALERT-BOX INFO TITLE Malert-title. END. /* Mok */ RETURN.
As long as Roundtable is running, you should just be able to execute this code as the Workspace procedure library is running super to the session.
Thanks!
Follow-up question. Is it also possible to populate to a different directory other than the workspace directory?
Hi Simon. No, not from the Populate Workspace routine.
You could create a Deployment which lets your specify the output directory. The Automation Toolkit has an API to help with Deployments.
Hi Simon. No, not from the Populate Workspace routine.
You could create a Deployment which lets your specify the output directory. The Automation Toolkit has an API to help with Deployments.