Discussion:
[jboss-user] [jBPM] - Is it possible to get UUID of a process opened in designer from drools-guvnor url
Prathap V S
2013-06-21 09:30:17 UTC
Permalink
Prathap V S [https://community.jboss.org/people/prathap.vs] created the discussion

"Is it possible to get UUID of a process opened in designer from drools-guvnor url"

To view the discussion, visit: https://community.jboss.org/message/824258#824258

--------------------------------------------------------------
Hi,
      Is it possible to get UUID of a process opened in designer from drools-guvnor url?

Usecase:
          We have an use case were we want to get the UUID of currently opened process with in designer to edit. We have created an servicetask component with new property commandbuilder (like Datainputset, Dataoutputset). This is a custom property associated with custom editor to read and display process model assets. Inorder to get asset information, we want know process UUID.

for eg: I have opened a procees in drools-guvnor, whose UUID is 1eb4313d-ed24-4918-9268-47052c0a202e. This UUID is part of url.

http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/Guvnor.jsp#AssetEditorPlace:1eb4313d-ed24-4918-9268-47052c0a202e http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/Guvnor.jsp#AssetEditorPlace:1eb4313d-ed24-4918-9268-47052c0a202e

Let me know if anyone know how get UUID information?

Thanks,
Prathap
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/824258#824258]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
tk120404
2013-06-24 08:21:19 UTC
Permalink
tk120404 [https://community.jboss.org/people/tk120404] created the discussion

"Re: Is it possible to get UUID of a process opened in designer from drools-guvnor url"

To view the discussion, visit: https://community.jboss.org/message/824506#824506

--------------------------------------------------------------
In your custom page, u can access it thru window.parent.top.location.hash.replace('#AssetEditorPlace:','');

ie. var uuid =  window.parent.top.location.hash.replace('#AssetEditorPlace:','');

:) enjoy
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/824506#824506]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Tihomir Surdilovic
2013-06-24 13:00:41 UTC
Permalink
Tihomir Surdilovic [https://community.jboss.org/people/tsurdilovic] created the discussion

"Re: Is it possible to get UUID of a process opened in designer from drools-guvnor url"

To view the discussion, visit: https://community.jboss.org/message/824554#824554

--------------------------------------------------------------
The above solution probably works, but it is dependent on Guvnor 5.x. If you switch to jBPM 6 I'm pretty sure you wont be able to carry it over. You could ask Designer itself what the UUID is that it has currently open which is compatible across versions (2.4 and the upcoming 6.0):
- locate the frame that Designer is opened in and ask for ORYX.UUID which contains that value, for example: window.frames[4].ORYX.UUID

Designer has a very good public JS api from which you can get a lot more than just the UUID (you can get the process json, svg, bpmn2 etc etc).

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/824554#824554]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...