-
1. Re: API first cut available for jBPM3
thomas.diesler Nov 18, 2008 4:29 AM (in response to thomas.diesler)Here a few notes on differences and limitations
ProcessInstance => Process
In Java an object instance is commonly called Foo not FooInstance. The standard talks about an "instance of a Process" rather than a ProcessInstance
Execution => Token
We agreed that an 'Execution' is not the same as a 'ProcessInstance' and should therefore exist as two separate entities in the API. Token is the concept that is known to jBPM3 users already and also appears under this name in the standards.
Tokens may have a parent child relationship, Process' do not.
A Process can be started, a Token cannot.
A Process has structure (i.e. child Nodes), a Token has not.
I didn't (yet) adapt the XML marshalling layer. Currently this is implementation detail of the dialect that is actually used in combination with the CTS and does neither effect CTS test cases nor API signatures. In other words, if the dialect is pluggable anyway it does not matter much what the actual XML will look like.
This becomes however important as soon as XML snippets enter the documentation. My mid Dec this should be settled so that we can start posting process definitions in XML -
2. Re: API first cut available for jBPM3
thomas.diesler Nov 18, 2008 5:06 AM (in response to thomas.diesler)Ah ... forgot to say
Feedback on on individual API signature details and specific test cases is of course welcome.
The discussion around these details should start rather sooner than later to give folks the chance to work productively with snapshots that are reasonable stable. -
3. Re: API first cut available for jBPM3
kukeltje Nov 18, 2008 7:16 AM (in response to thomas.diesler)Nice progress, I did not ecpect this. Will have a look at it, the comming days. You have some valid arguments for already having it available for jBPM 3.
-
4. Re: API first cut available for jBPM3
thomas.diesler Nov 18, 2008 7:32 AM (in response to thomas.diesler)Here is the current home of the CTS test classes
http://fisheye.jboss.com/browse/JbpmSvn/projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts?%40hideEmptyDirectories=Y -
5. Re: API first cut available for jBPM3
kukeltje Nov 18, 2008 9:23 AM (in response to thomas.diesler)"thomas.diesler@jboss.com" wrote:
ProcessInstance => Process
In Java an object instance is commonly called Foo not FooInstance. The standard talks about an "instance of a Process" rather than a ProcessInstance
Hmm... semantics? imo this is not about the intstance of a Process (Java) object but of an instance of the Process as a business object as compared to the definition. Your argument is kind of still valid than (about removing the Instance part) just in another context. Otoh, it makes it kind of clear that it is *not* a definition."thomas.diesler@jboss.com" wrote:
What about the relation between processes and subprocesses? Are those only visible via the definition? It might make sense to have a method in the api that says Process.hasRunningChildProcesses() or something like that.
Tokens may have a parent child relationship, Process' do not.
A Process can be started, a Token cannot.
A Process has structure (i.e. child Nodes), a Token has not. -
6. Re: API first cut available for jBPM3
thomas.diesler Nov 18, 2008 10:35 AM (in response to thomas.diesler)
Otoh, it makes it kind of clear that it is *not* a definition.
The distinction to ProcessDefinition is still there.
The API would have ProcessDefinition
http://jbpm.dyndns.org/jbpm-spec/jbpm-spec-api/apidocs/org/jbpm/api/model/ProcessDefinition.html
and Process
http://jbpm.dyndns.org/jbpm-spec/jbpm-spec-api/apidocs/org/jbpm/api/model/Process.html
What about the relation between processes and subprocesses? Are those only visible via the definition?
They would be visible on both the ProcessDefinition and the Process. The ProcessDefinition is the immutable instance that defines the structure. The Process is the runtime copy of that structure that is mutable to some degree. (i.e. to associate state with individual Node instances)
A running Sub-Process would probably be a reference to a Process, but this definitely needs to be revisited when we come to the point when Sub-Processes appear on the API roadmap, which should be early next year.
Thanks for your feedback -
7. Re: API first cut available for jBPM3
thomas.diesler Nov 18, 2008 10:38 AM (in response to thomas.diesler)Please also note, that both Process and ProcessDefinition share common functionality from ProcessStructure
http://jbpm.dyndns.org/jbpm-spec/jbpm-spec-api/apidocs/org/jbpm/api/model/ProcessStructure.html
ProcessStructure would however never appear in user code and can probably be moved to internal -
8. Re: API first cut available for jBPM3
tom.baeyens Nov 18, 2008 10:41 AM (in response to thomas.diesler)i replied on the mailing list instead of the forum:
The scope of jBPM 3 work is already way beyond the resources we have for it. We should focus on the necessary work to put jBPM 3 in maintenance rather then introducing a new API on it.
We said in the meeting in the context of the migration debate that no API will be introduced in jBPM 3. A new API will be introduced in jBPM 4.
Apart from that, using the term process to indicate a process instance would be highly confusing. -
9. Re: API first cut available for jBPM3
estaub Nov 18, 2008 10:57 AM (in response to thomas.diesler)"thomas.diesler@jboss.com" wrote:
Otoh, it makes it kind of clear that it is *not* a definition.
The distinction to ProcessDefinition is still there.
FWIW (bikeshed) - in my experience with business-analysts and other non-Java-heads, people informally use the term "Process" to refer to a Definition more often than they use it to refer to an Instance. When we talk about, say, "designing a business process", we're clearly talking about a definition, not an instance. This is an odd case where English has a word for the definition, but not for instances of that definition. So "Process" doesn't obviously mean "Process Instance".
-Ed Staub -
10. Re: API first cut available for jBPM3
kukeltje Nov 18, 2008 11:51 AM (in response to thomas.diesler)The distinction to ProcessDefinition is still there.
I know that there is a Process and a ProcessDefinition, but to many people the difference might not be clear.Apart from that, using the term process to indicate a process instance would be highly confusing.
This is indeed what I meant.
And reading Ed's comment he thinks the same. Might be the difference between the (up to now) more theoretical people and the ones with dirty hands ;-) -
11. Re: API first cut available for jBPM3
thomas.diesler Nov 18, 2008 12:08 PM (in response to thomas.diesler)Thanks for your comments, but what should it actually be?
#1
ProcessDefinition + Process
#2
ProcessDefinition + ProcessInstance
#3
something else completely
Please also consider the usage of these artefactsProcessDefinitionService pdService = engine.getService(ProcessDefinitionService.class); ProcessDefinition procDef = pdService.createProcessDefinition(XML); Process proc = procDef.newProcess(); Token tok = proc.startProcess();
vs.ProcessDefinitionService pdService = engine.getService(ProcessDefinitionService.class); ProcessDefinition procDef = pdService.createProcessDefinition(XML); ProcessInstance procInst = procDef.newProcessInstance(); Token tok = procInst.startProcessInstance();
Generally, please come up with an alternative suggestion if a given proposal is no good for some reason i.e. I don't like Foo because ... Instead I propose Bar -
12. Re: API first cut available for jBPM3
benhu Nov 18, 2008 3:22 PM (in response to thomas.diesler)is this already included in jBPM 3.3.0 GA?
-
13. Re: API first cut available for jBPM3
benhu Nov 18, 2008 3:26 PM (in response to thomas.diesler)"thomas.diesler@jboss.com" wrote:
Thanks for your comments, but what should it actually be?
#1
ProcessDefinition + Process
#2
ProcessDefinition + ProcessInstance
#3
something else completely
Please also consider the usage of these artefactsProcessDefinitionService pdService = engine.getService(ProcessDefinitionService.class); ProcessDefinition procDef = pdService.createProcessDefinition(XML); Process proc = procDef.newProcess(); Token tok = proc.startProcess();
vs.ProcessDefinitionService pdService = engine.getService(ProcessDefinitionService.class); ProcessDefinition procDef = pdService.createProcessDefinition(XML); ProcessInstance procInst = procDef.newProcessInstance(); Token tok = procInst.startProcessInstance();
Generally, please come up with an alternative suggestion if a given proposal is no good for some reason i.e. I don't like Foo because ... Instead I propose Bar
I think #1 works fine. From my point of view, even for business people when they mention "Process", they can mean both. Because for business people, they do not differentiate between definition and "instance". They think that they draw a diagram and the process is up like magic. -
14. Re: API first cut available for jBPM3
kukeltje Nov 18, 2008 4:26 PM (in response to thomas.diesler)"benhu" wrote:
is this already included in jBPM 3.3.0 GA?
No, it is a separate package in alpha (or even pre-alpha) state. Lot's of changes can and probably will take place as you can see about the discussion (of which we had some very constructive ones during the team meeting). Reading Tom's arguments, it is currently there to get feedback on it, e.g. by using it in combination with jBPM 3.3 AS EXPERIMENT. So do not rely on it for production.