Hexagon Geospatial

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Frequent Contributor
Posts: 88
Registered: ‎11-17-2015

GMSC - Oracle Revision set API



For our project, we need to be able to work a little bit more with Oracle Revision sets inside GMSC.


From GMSC we need to be able to:

  • Create a Revision Set
  • Refresh the GMSC Revision set list
  • Activate a Revision Set by name
  • Commit a revision set
  • Discard a revision set


We would like to be able to do it through workflows (not a JAVA plugin. IScriptingObject if needed).


Do you think it’s possible? Is there an API (JS, JAVA) to access this part of GMSC?


Thank you very much for your help.


Technical Evangelist
Posts: 140
Registered: ‎10-20-2015

Re: GMSC - Oracle Revision set API

Hi Yohann,


  • Refresh GMSC's workspace list

The workspace list on the right side of GMSC's menu window will be reloaded at the plugin start. Therefore the user must reload the client to get a new list. If you want that the user sees always the latest workspace list, then you can write a workflow and use the IValueProvider implementation which is called WorkspaceProvider.


GetValue of this WorkspaceProvider returns the name of the active workspace and GetValues returns the list of all available workspaces (Select WORKSPACE From ALL_WORKSPACES Order By WORKSPACE). 


  • Create a workspace

The trigger CreateWorkspaceTrigger helps you to create a new workspace. This trigger has the following parameters:

Workspace[string] - is required

IsRefreshed[bool] - is required

Description[string] - optional

IsAutoCommit[bool] - default value is true


We are using the following oracle statement to create a workspace. If you need more details about the parameters, please check the Oracle's documentation.



 string sqlCommand = string.Format(@"begin 
                DBMS_WM.CreateWorkspace (@workspace, {0}, @description, {1});
                end;", IsRefreshed, IsAutoCommit);



  • Activate a workspace

Use the trigger SwitchWorkspaceTrigger which has the following parameters:




  • Merge a workspace

Use the trigger MergeWorkspaceTrigger which has the following parameters:

Workspace[string] - required

CreateSavePoint[bool] - default value is false

RemoveWorkspace[bool] - default value is false

IsAutoCommit[bool] - default value is true


string sqlCommand = string.Format(@"begin 
                DBMS_WM.MergeWorkspace (@workspace, {0}, {1}, {2});
                end;", CreateSavePoint, RemoveWorkspace, IsAutoCommit);



  • Remove a workspace

Use the trigger RemoveWorkspaceTrigger which has the following parameters:

Workspace[string] - is required

IsAutoCommit[bool] - default is true


The Oracle statement which will be executed:


string sqlCommand = string.Format(@"begin 
                DBMS_WM.RemoveWorkspace (@workspace, {0});
                end;", IsAutoCommit);


Best Regards,


Frequent Contributor
Posts: 88
Registered: ‎11-17-2015

Re: GMSC - Oracle Revision set API

When I create a Workspace using the "CreateWorkspaceTrigger" I cannot edit in this workspace when it is activated (after a reload of GMSC).

Same problem when I create the Workspace using PLSQL.

The problem is:

ORA-20500: Unable to obtain revision set id for revision set - testGMSC ORA-06512: at "WMSYS.WM$2$UPDATE$", line 14 ORA-04088: error during execution of trigger 'WMSYS.WM$2$UPDATE$'


I can edit my data in GMSC when I create a Workspace in GM and activate it in GMSC.

Seems like "begin;DBMS_WM.CreateWorkspace (@workspace, {0}, @description, {1});end;" is not enough for GMSC.


What is the difference in the workspace creation between GM (transaction manager) and GMSC?


Thank you!

Posts: 147
Registered: ‎02-02-2016

Re: GMSC - Oracle Revision set API

You might try the following to resolve the ORA-20500:  Unable to obtain revision set id for revision set error.


Connect as system/manager:
EXEC DBMS_WM.GrantSystemPriv('ACCESS_ANY_WORKSPACE','<username>');

Where username is the owner of the secured feature class.

Suggest only running the suggested EXEC DBMS_WM.GrantSystemPriv as required (if the error occurs). If needed, it will most likely be Oracle 12C systems and it would only be required for user's that will be accessing revision sets.

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.