[jboss-user] [jBPM] - Re: Can i get the entire process image which shows the current node?

Chris Melas do-not-reply at jboss.com
Tue Jun 14 04:32:11 EDT 2011


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.evaluation/image 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/activeNodeInfo 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&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110614/9d242053/attachment-0001.html 


More information about the jboss-user mailing list