jBPM6 - embed web designer in existing application - embed

Are you aware of any guide / tutorial / example project that might help me embed the jBPM web designer in an existing web application?
Namely:
Which are the maven libraries I need to include?
Is it possible to deploy the designer specific components in the main application WAR (this is after all what embedded means)?
How can I access the designer? Is there a specific URL for it?
Thanks in advance for any hint.

I finally found out how to do it.
What you need is a running instance of the KIE workbench (seems this was once formerly called Drools Guvnor). You can get a demo system up and running very fast using the jBPM installer. A written guide on how to do it can be found here. In my case I downloaded the jbpm-6.1.0.Final-installer-full.zip from here.
As soon as you have the JBoss AS/WildFly with the KIE workbench running you can access it through http://localhost:8080/jbpm-console/.
Now each BPMN process saved in the KIE workshop seems to have a unique path which is also a Git repository URL. When you open a diagram and go to the metadata tab this path is listed as URI.
To display this BPMN process inside a custom-built web application with the jBPM Designer BPMN 2 editor, just create an iframe HTML element with that URL in it like the following example:
<html>
<head>
<title>Test</title>
</head>
<body>
<h1>Test</h1>
<p>Editor frame below:</p>
<iframe height='800' src='http://localhost:8080/jbpm-console?standalone=&path=git://master#jbpm-playground/HR/src/main/resources/hiring.bpmn2' width='1000'></iframe>
</body>
</html>
As soon as you load that page, the editor will be embedded into the page via that iframe. This works even with a static HTML page without a web server, so it should be quite versatile and your web application surely doesn't need to run inside the same JBoss AS/WildFly instance and doesn't even need to be written in Java.
What I did not figure out so far is how to create new BPMN processes via some kind of API, which could then be edited within the standalone web application. Also I don't know how access control is supposed to work yet.

Related

my wepApi giving error when I try open my psd html file

I Have wepApi project but I want to use it with adobe photoshop.So I design to web site with adobe and after I convert to html file.But When I try to open it with localhost it's giving me error.But it's working on live server.
enter image description here
I never used before abode but I have to for one project.So maybe someone know what is the solution?
There are several potential causes for this problem. Here are a few potential answers:
Ensure that your local machine is running a web server. The HTML file won't be able to connect to your API without a web server.
Ensure that the URL you are using to access the HTML file is correct. The format should be "http://localhost/path/to/file.html."
Make sure your web server is operational and properly configured if you use one.
Make sure your HTML file is free of syntax mistakes. To check for issues, you can use a tool like the W3C Markup Validation Service.
I hope this is useful.

Creating a server / service client

I have been developing an app that has to access a DB and return data has charts in a web page. since it is to be added to another software i had to create it as a local server / servce, using self host web api, returning the data as json so i can read it in my html file and create the charts.
The server / service works, but my problem remains on the client. I don't know if i have to create another project for my html or if i just add a folder with my html and all css and javascript.
Basically when i run it i have to display my html file.
I have been looking the web for examples / solutions but i can't seem to find one that will help me, i've checked:
creating help pages with T4, but it includes all my css and js files in my html and when i want to change something i have to remove the include, debug and include it again;
create a web app but when i run it it creates me 2 servers, the one i've created and the web page server, although my web page will access it using angularjs, i can't have the second server;
I'm a little lost on how i will do it.
Can someone give me some help?
I'm using VS2010, self-host WebApi, console app, entity framework, angularjs, nvd3 and d3.
thk
If you have developed your project using MVC4 you can create view/controller related to report in webapi project.Point add html files to this view.This won't create 2 servers.

Filemaker Using Web Viewer to build Database Navigation Menu Using Callback URLs

I would like to use the Filemaker web viewer to build and style a database navigation menu. I have found a handful of samples and I have played with the code but the problem that I am having is that it launches in another window (Note that I also have several versions of Filemaker on my desktop and it also tries to launch the pop up in Filemaker 13 when I am building in Filemaker 12).
The goal is to call the script inside of the current database and current application so that it functions as a system navigation menu. In straight HTML in a site environment I would add target="_blank" or target="_parent" to the href but I can't seem to get the syntax right to try it in the web viewer and I'm not sure if this would be the solution. Can any angel from tech heaven assist or offer any advice? Here is the sample code that I currently have that calls a Filemaker script in a local system for a google map interface. I'll be using the script differently but the structure will be the same.
"data:text/html," &"
<html>
<body>
<a href='"&"FMP://" &
Case(
IsEmpty(Get(HostIPAddress)); Get(SystemIPAddress);
not IsEmpty(Get(HostIPAddress)); Get(HostIPAddress);
)
&"/"& Get ( FileName )& "?script=Open-Detail-Map&param=" & Data::ID_Data&"'>View Map
Detail</a>
</body>
</html>"
This works for me, and it opens it in the same window. I'd recommend using FileMaker 13 for development, or uninstalling it. It launches in 13 because the URL protocol handler (FMP) is the same for both versions, so your OS uses the newest version of FileMaker to handle the URL call.
Note that triggering scripts using a URL will not work in standalone files in FileMaker Pro, only hosted files or FileMaker Go.
It is possible to call the script from another file directly in FileMaker, rather than trying to do it from a webviewer. Can you clarify why you're trying to create your navigation menu in a webviewer?
If a webviewer is not compulsory, I would recommend:
creating an External Data Source that points at the other file
Adding FileMaker buttons for your navigation
Right-click on the button you want to trigger the script, and choose "Button Setup", then choose "Perform a Script" and specify the script you want to run from the other file.
Honestly, this makes no real sense to do. I get what you are trying and it seems interesting, but build your navigation in FileMaker and display your banner ads in a web viewer. The other option, which is always available, is to just build out the solution as a PHP site using the FMP PHP API.
I realize that this is an answer for a rather old question, but I think it warrants pointing out what the solution here is...at least in modern versions of FileMaker. I don't recall exactly when this was fixed...13.05 or .06? It was present in earlier versions but wouldn't work for locally opened files, only hosted files; now it works in both.
You need to use the 'currently open file' reference in the FMP URL: "$". So your URL string should look like this:
"fmp://$/fileName?script=AScriptName&param=..."
In your code:
<a href='"&"FMP://" &
If ( IsEmpty(Get(HostIPAddress)); "$"; Get(HostIPAddress) )
&"/"& Get ( FileName )& "?script=Open-Detail-Map&param=" & Data::ID_Data&"'>View Map Detail</a>

How can I use a console application with my website in Visual Studio?

Please read the following in the Visual Studio 2012 context:
I have two projects--one is a website (File --> New Website) and another is a console application (File --> New Project --> Windows --> Console Application). I am the author of the former.
The standalone app fakes the input by hardcoding it, runs through some code, and creates an output. It uses dlls from a local installation of software that I have installed on my machine to generate this output.
I read on MSDN that I cannot add a console app to a website solution in a useful manner. So, if I compile the console app to output a dll instead of an exe, can I reference that dll in my website? How can I do this exactly? I would need to pass the input value from the website to the dll, and return meaningful results from the dll. Is this possible?
Yes, you describe a feasible way to solve this. You need to create a class library project, add source code from console application to it, except the the class that has static Main method and modify (add to) that source code such that there is a class that you will be able instantiate from the code in your web application after you add the class library assembly to the web application as a reference. This class will have a method with appropriate parameters, that you will call. All this assuming that the task that console application code performs is fast and will not create noticeable delay in the web application response. If the task takes a long time, you will either have to run it in a background thread or move it outside the web application - the latter is significantly more involved.

How to create HTML5 100% offline applications?

Sometimes I need to write a small program just to represent some data in a chart, or similar stuff. I have been wanting to do this kind of things through the browser, with HTML5. I think it would be nice to use its canvas to create a nice UI for simple apps.
I have read some articles related to offline applications with HTML5, but they focus on downloading all the data you need and save it to the cache to use it offline later. You even need to set up an Apache server (or similar) to create your app.
I don't need my app to be online, just in my computer. I just want to create a simple application, nothing to do with internet at all.
How can I do this? Is it even possible or worthy? Is there any "Hello world!" tutorial about this around there?
Something like Mozilla Prism would be good for displaying the content as an application.
There's no need to have a web server like Apache for just displaying HTML5/Javascript in a browser. You can just have it all in a folder on your desktop and then load it in the browser with the file:// protocol.
For example file://C:/Documents and Settings/YourUser/Desktop/YourApp/index.html would open an HTML file in a folder called YourApp on your user's desktop.
If you ever find you need to read static HTML+Javascript files locally then I'd recommend using this python command in the console:
python -m SimpleHTTPServer
It launches a simple HTTP server (who'd of guessed) that serves files from the current working directory. Effectively, it's the same as launching an apache webserver, putting some static assets in /var/www/... etc. etc.
You could also just browse to the assets at file:///some/folder; however, most browsers will prevent javascript from using AJAX when files are loaded in that way, which will manifest as a bunch of bugs when you go to load it.