Feeding automatically jBPM with a .bpmn file generated by another software

119 views
Skip to first unread message

Andrea Marrella

unread,
Apr 2, 2015, 5:02:33 AM4/2/15
to jbpm-...@googlegroups.com
Hi all,

Since I found this great forum, I write here to explain a problem I'm having with jBPM usage.

I wrote a software which is able to translate Petri Nets in BPMN 2.0 compliant processes. 
My software generates a file with extension ".bpmn", which can be opened and viewed by traditional Process Modeler softwares (for example, Bizagi Modeler).
Processes are very simple, since they contain just parallel/exclusive gateways and tasks.

What I'd like to do is to open such a .bpmn file with the jBPM workbench, in a way that the process model is visible through jBPM.
I need to do such a task in an automated way. Hence, once my software has generated the .bpmn file with the process, I have to write a script which 
copies such a file inside a specific folder of jBPM (which folder?), then launch jBPM in order to see and navigate (and possibly modify) the loaded process model.
I do not need to execute the process, only to see/modify its structure through the jBPM workbench.

To be more precise, my questions are the follows:

(i) Is it enough to have a .bpmn file to allow jBPM to see the process, or the .bpmn file must be associated with other auxiliary files?
(ii) In which folder I have to copy the above .bpmn file to allow jBPM to see it?

The complexity here is that I have to do everything in an automated way. Therefore, given a .bpmn file, I have to find a way to make it visible through the jBPM workbench.

Thanks in advance to who will help me.
Andrea

Mauricio Salatino

unread,
Apr 2, 2015, 5:12:59 AM4/2/15
to Andrea Marrella, jbpm-...@googlegroups.com
Hi Andrea,
that should be quite simple. If you have an installation of the KIE Workbench in your local environment, what you need to do in your script is to clone the Git repository that is hosting the project repository and if you have a default project to use as a placeholder for all your processes, you will only need to copy the bpmn file to that working copy of the git repository and then push your changes so they are available to the tool instance. 

Take a look at the documentation on how to clone the GIT repository to have a working copy that you can use. 

HTH

Regards

--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/4b4dc986-34f7-4c5b-800a-8f183004704e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
 - MyJourney @ http://salaboy.com
 - Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -

Andrea Marrella

unread,
Apr 2, 2015, 7:20:13 PM4/2/15
to jbpm-...@googlegroups.com
Hi Mauricio,
Thank you for the fast reply. I got the point, but I have still some problem.

What I have now is the installation of JBPM with the demo setup. Consider that I'm running jBPM under CentOS (v.6.x) in a virtual machine (VMWare Player) and the network is not configured (I can not currently surf on the web with CentOS). When I use the workbench on localhost:8080 I can create new repo and projects under "demo". For example, I created the repo "TestRepo" and the project "TestProject" in that repo. When the new project is ready, through the feature "Project Authoring" I can see the exact git address where the repository should be located. In my case the address is git://localhost:9198/testproject

The first question is: how is it possible that exists a git repo for the project since I do not have any connection to the network and I do not have any local installation of the git server?

Now, if I'm not wrong, I should push the .bpmn file created by another software into the above git repository.
However, the problem is that I'm not able to see the content of the above git repo (I'm using the bit client for Linux) nor to push any process inside it.

I' m sorry if the question may seem stupid, but I got lost when using git…have I to use some specific git command to copy the file inside the git repo? Maybe I'm missing some step....

Thanks in advance for the reply.

Ciao,
Andrea

Mauricio Salatino

unread,
Apr 3, 2015, 5:11:50 AM4/3/15
to Andrea Marrella, jbpm-...@googlegroups.com
Hi Andrea,
The KIE Workbench hosts a GIT Server  (git bare repository) internally where you can connect and clone repositories as in github or any other public service. 
So you can use that with the normal git commands to clone, commit, push, etc. your changes .. then is just matter of creating a script that works in CentOS to move the files around and commit and push the changes to the KIE Workbench GIT server. 


Andrea

--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Andrea Marrella

unread,
Apr 3, 2015, 11:59:05 AM4/3/15
to jbpm-...@googlegroups.com, a.mar...@gmail.com
Hi Mauricio,

OK, I'm coming closer to a solution, but I have still a little problem. I hope to disturb you on this topic for the last time.

I cloned locally the git repository where the BPMN processes are situated.
In my case, the original git repository (created with the user Krisv) is: git://localhost:9418/TESTrep 

Therefore, through the command git clone git://localhost:9418/TESTrep  I'm able to generate a local copy of the repository, which is saved in the folder TESTrep.

Now, when I insert a new file in the local copy of the repository - let's say that the new file is called process.bpmn - I track it (through the command  git add process.bpmn ) and I commit it (through the command git commit -a -m 'Added Process' ).

At this point, I need to push the new file inside the git repository hosted by JBPM. 

However, when I try to invoke the push command (let's say, for example, git push origin master), I receive every time the same reply from the shell:

>> localhost[0: ::1]: errno=Connection refused
>> fatal: The remote end hung up unexpectedly

I guess I have no permission to write inside the original repository. Since the repository has been created by the user krisv in jBPM, also the git repository associated to TESTrep is owned by krisv?

Consider also that if i call the remote function ( git remote -v ), it seems that the original repository is setted correctly, since I have back:

origin git://localhost:9418/TESTrep (fetch)
origin git://localhost:9418/TESTrep (push)

Since I'm missing something when I try to invoke the push command, can you suggest me a solution (also in form of GIT code) to overcome it?

Thank you very much in advance,
Andrea 

Salaboy

unread,
Apr 3, 2015, 12:34:52 PM4/3/15
to Andrea Marrella, jbpm-...@googlegroups.com
It seems that you are missing to provide the correct credential to the remote server,  have you checked the docs? 

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages