Mauricio Salatino [
https://community.jboss.org/people/salaboy21] created the discussion
"Re: jBPM noob questions"
To view the discussion, visit:
https://community.jboss.org/message/826092#826092
--------------------------------------------------------------
Hi Viktor,
About your questions:
1) I always discourage the use of script nodes because you are basically writing java
inside an xml file, which will make your life more difficult when you do refactorings, it
doesn't provide any syntax checking, etc, etc. But if the code that you want to put
there is simple enough and it will not cause you troubles in the future you can go ahead
knowing the risks.
2) Data Objects are defined in the BPMN2 specification and helps you to define from where
your data is comming from, I usually mention Data Objects as quite advanced structures. As
far as I know they are supported in jBPM but I would prefer to work with process variables
directly. From the technical point of view it's easier at least. If you take a look at
the BPMN2 specification you will see that Data Objects are exactly the same as Process
Variable, but the later doesn't have a graphical representation in the process
diagram.
3) About persistence, if you are planning to use persistence you will need to demarcate
your transactions. This is not difficult, because it just means that you will need to
decide which Activities inside your process will be asynchrnous (will end the current
transaction) and which will be sync (will be executed inside the current transaction) . If
you have all the Activities in your process as Sync activities the process state will not
be persisted between each of them.
4) About user transactions.. This is a complicated topic to explain in a couple of
sentences, but I will try to make it short. jBPM will handle internally the transaction
for the resources that are configured within jBPM. If you have your own external databases
and if you are configuring your own databases outside jbpm you will be in charge of
handling transactions. So how the transactions are propagated its completely up to you. In
the other hand, if you configure your databases as transactional resources within jbpm,
jbpm will define when to start and end the transactions based on the safe points of the
processes (Sync and Async activities) .
I hope this helps!
Cheers
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/826092#826092]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]