Chris Melas [
http://community.jboss.org/people/melc] created the discussion
"Re: Can i get the entire process image which shows the current node?"
To view the discussion, visit:
http://community.jboss.org/message/610064#610064
--------------------------------------------------------------
Hello,
If you use gwt-console-server then you can call its web services and a little html and
javascript to achieve that. The following two do the job,
1). To get the image call
http://10.1.3.26:8082/gwt-console-server/rs/process/definition/com.sample...
http://{your-address}/gwt-console-server/rs/process/definition/{your-process-id}/image
2). To get the coordinates in the diagram of the active node in json call
http://10.1.3.26:8082/gwt-console-server/rs/process/instance/109/activeNo...
http://{your-address}/gwt-console-server/rs/process/instance/{your-process-instance-id}/activeNodeInfo
Then with javascript you can place an image relative to the coordinates. The
gwt-console-server uses the following,
images/icons/play_red_big.png and subtracts 8px from the value of x and value of y for
example,
For example,
this is the json
[{"width":932,"height":541,"activeNode":{"name":"id\u003d2","x":96,"y":56,"width":135,"height":48}}]
this is the html
<div class="bpm-graphView-activityImage"
style="position:absolute;top:48px;left:88px;width:50px;height:50px;
z-index:1000;background-image:
url(images/icons/play_red_big.png);background-repeat:no-repeat;"></div>
notice,
top = 48px which is 56px-8px
left = 88px which is 96px-8px
so with js you can manipulate the visibility of the div and the left and top values.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/610064#610064]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]