I want to represent a business process that I will have from an XML file and represent it in a JPanel, and I need also to visualize its evolution in time by changing colors (for example).
Do you know from where I should start, or if jBPMN can be connected to java and represented in my interface.
Any help will be appreciated.
The jBPM web designer can generate a PNG or SVG from an XML file (either by exporting as PNG or you can automatically save the SVG next to the process in the workbench repository when you save the process in designer. Your JPanel could retrieve this process PNG or SVG, and annotate it by first querying the current state of your process (from the engine or the audit tables directly) and using that to highlight certain nodes for example.
For the next version of jBPM we're working on a REST call that would automate all of that for you.
I think I am going to use JGraphix to draw my bpm, because as I saw, it give the possibility to draw shapes like bpmn ones.
I didn't see if it allows to change the color of the task case after x minut, but I guess it's going to be possible, and it's going to be the way to represent the evolution of the process at run time.
Do you think it's an Ok idea ?
Related
We are trying to develop a website for tracking the progress of pipeline and assets. I want to link progress data entered from forms developed in Java to GIS. We will be capturing all the lat and longs of pipeline stretch and lat and log of progress of work.
I need help in developing shapefile dynamically based on the progress and also to view that shape file in my webpage
The javascript API does have functionality for uploading shapefiles form your desktop into the browser, but you will need another tool to create those shapefiles based on the progress.
For uploading the shapefiles, see the example here: https://developers.arcgis.com/javascript/3/jssamples/portal_addshapefile.html
There may be more examples available at https://developers.arcgis.com/javascript/3/.
For creating the shapefiles dynamically, you could use ArcMap or ArcPro if you have those, or one of many python libraries to help write shapefiles. There may even be some Java libraries to help with this as well but I only work on the front end so I cannot help you there.
For something simple in context, the complexity of what kind of workflow to best suite your needs can range depending on these questions (and probably others I'm not thinking of):
Do you absolutely need to create a shapefile for this? Why can't you just push the form to a spatial database (e.g. PostGIS) and then return the XYs of the points or the string of XYs for line features, etc.?
Where is the source of the data & what is the format? Is it a PDF, text on an HTML page, a .csv file downloadable from a page, etc.? You may need to implement scraping (from a site) or download and update, or your data could be live streaming - these are all different workflows and you need to establish these boundaries before setting up your workflow.
If your end game are points, all you need is XYs in a table format to display in GIS software. If they are lines or polygons, it'd be a little different. Again - what output type are they and what are you trying to do with it (e.g. import into QGIS)?
Without these answers, it doesn't make sense for anyone to suggest something to you that could be totally impossible for you to execute. Please answer these and think through your workflow from beginning to end and/or visa versa.
Cheers,
Shawn
Is it possible using java to create a dynamic graphs that update itself automatically when it receives values from outside?
I would create an application that check automatically the statistics of a server (data in,data out,etc...) drawing those values on the graph dynamically when those change.
I found JFreeChart but I don't know if it make those things
Go to JFreeChart demo's page, Download the jnlp and launch it via Java Web start. There are plenty of JFreeChart examples with source code. In the samples directory tree, under "Miscellaneous -> Dynamic charts" you'll find what you need
I have just started working with GWT. I was wondering how I can dynamically move widgets on fly (at web page on client browser) for example to move a row of table up and down, or upload a excel file and display its content right away....something like a dashboard I am talking about. Are there any comprehensive tutorial to refer.
Have a look at the gwt-dnd lib:
http://code.google.com/p/gwt-dnd/
GWT is made for doing the kind of things you are describing. To move widgets you can either set their position or dynamically modify their css. To move rows around in a table look at the api of whatever table class you are using. To upload an excel file do a google search for 'gwt upload' and there will be some instructions - but to display the file you will need to convert it (probably to xml). Converting the file on the server will depend on which server you are using - I also have seen a 3rd party widget that will do that for you.
If youre looking for transition effects or animations , than check out gwtquery. Its really similar to jquery and has pretty simple good examples to start with.
Can anybody tell me how I could do the following:
I want my Java code to generate a drawing that has multiple connected shapes. Perhaps hundreds of shapes--not huge. I'd like to generate this and save it as a standard file format that somebody could open in a viewer or an editor. I do not want to implement viewing or editing logic--generation only.
I'd like the user to be able to take my generated file, open it in a WYSIWYG editor, and move the shapes around with the lines that connect the shapes staying connected to the shapes as they move. That way, my generation code does not have to be super smart about making sure that connectors don't overlap.
Can anybody suggest a combination of file format, Java library, editor (or some subset of those three) that would work well for this task?
Thoughts so far:
yEd allows this editing behavior and uses graphml as the format. However, I'm not sure how widely used graphml is, and I'm concerned about availability of glyphs.
Inkscape and SVG are widely used, but I'm a complete novice, and so far I haven't been able to get lines to stay connected to other shapes using Inkscape when I move them around.
I'm open to other options...
I have a requirement to create a "mimic" display of a complex electrical system. I have access to real-time status information and system block diagrams in Visio.
Is this a viable approach:
Create an SVG drawing from the system block diagram
Tag the SVG elements of interest with SVG attributes
load the SVG DOM into java
locate the tagged elements and modify them according to system status info (make the element RED if its "in alarm", for example)
render the SVG to PNG for display using BATIK (use a the swing component: JSVGCanvas)
A key requirement is flex ability to modify the SVG after the app is deployed. The app capable of flexibly pulling in different "datapoints" based on the tags in the SVG.
Anyone have success using a similar strategy?
What pitfalls should I expect?
What is out there in the way of SVG editing tools?
I've done something similar for a state of health display. I actually annotated the data objects and had them push their state into a dumb SVG file but the machinery should be roughly the same just reversed.
Benefits:
Makes complex, dynamic diagrams insanely easy to render.
Diagram maintenance is a breeze compared to everything else I've ever used.
Ability to target a web app either directly via SVG or an indirectly via server-rendered images delivered to the client.
Pitfalls:
Data binding can be painful depending on how complex you want your visualization to be. If you want to annotate the SVG to pull data into itself, this will probably end up being the hard part.
You'll need a good grasp of XPath to do anything even slightly tricky. It's never hard but is often tedious to debug XPath expressions.
Editors:
Inkscape. There's a few other vector graphics editors out there that can do SVG, either directly or as an export target, but none of the ones I've seen come close to Inkscape. It doesn't support every feature in the current SVG spec but it sounds like it'll be enough for most if not all of what you want. It's also pretty good about not blasting hand-edits to SVG files for when you need to something it doesn't support.
You should have also a look at SVG Salamander, I have not used it myself but some of the features are:
"An index of all named shapes in the SVG graph is easily accessible. "
"Direct access to the scene graph tree. You can use Java commands to manipulate it directly."