[Design of JBoss jBPM] - Re: various questions
by david.lloyd@jboss.com
"alex.guizar(a)jboss.com" wrote : Adding a "businessKey" property to the ProcessInstance class is not the way to go, because its name and type would not be defined by the user anymore. Further, composite business keys would not be possible anymore.
|
| (...complex explaination...)
Alex, I think you're missing the point here - this is not a mandatory field. This is a field that can be used by simple applications (which I believe will be the majority). Applications for which this field is not useful need not use it, and thus are unaffected.
"tom.baeyens(a)jboss.com" wrote : let me see if i get your point by proposing a solution:
|
| ProcessInstances gets an new 'businessKey' property of type String. This property is added to the constructors. Such a business key is optional, but the combination (processDefinition, businessKey) must be unique if the businessKey is not null. (not sure if DB's support such a unique constraint)
All databases that I know of support multi-column unique constraints that include nullable columns - that said, I'm not sure that it should be unique by default. That is something that the user could decide.
"tom.baeyens(a)jboss.com" wrote : Often the business key is a reference to some other object. So on the process definition you could specify a Converter that converts the String based business key into the referred object.
Maybe... that might be feature overkill though. Users should be able to handle manipulating a String.
"tom.baeyens(a)jboss.com" wrote : The business key can be used in queries. I'm not sure if HQL can support the type differences between the text based reference and the typical number based PK of the referred table.
It shouldn't matter - the user can just query as if it is text. It wouldn't be a real key from the database's perspective, just a column that is indexed for efficient queries. I think it is important to emphasize that database keys should never, ever have business meaning.
Business keys often tend to be strings anyway: think of JIRA issue keys, or account numbers that are issued by banks, telephone companies, etc., which tend to be mixed letters and numbers.
"tom.baeyens(a)jboss.com" wrote : I think that even in this case, you could have multiple types of processes in 1 single process definition. Suppose that you have change orders and customer orders all being processed by the same process definition. In that case you could compose the business key like this:
|
| "customerorder["+customerOrderId+"]" for customer orders and
| "changeorder["+changeOrderId+"]" for change orders.
|
| that makes the business key unique and still you can specify custom code to convert these business keys into the proper referred objects.
Exactly.
People, I think we just need to add a single, optional, indexed text field to ProcessInstance (and maybe Token and TaskInstance too). I think that such a field would be handy in a variety of situations, and I also think that we don't need to add a ton of other features or complexity to make it useful.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017704#4017704
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017704
19 years, 1 month
[Design of JBoss jBPM] - Re: various questions
by brittm
I really like the idea of having the ability to retrieve the actual business object from a ProcessInstance. That is a nice touch.
anonymous wrote : ...the combination (processDefinition, businessKey) must be unique ...
Actually, while this doesn't address part of the scenario I constructed (one business object being represented by multiple processes), it is workable as long as the various processes can be 'wrapped' in a single parent process that represents the business object one-to-one.
However, in that scenario, it would be much easier if the developer could simply declare in each process definition exaclty which business concept is being represented rather than go through the excercise of creating a single parent process and the logic to select one of several sub-process.
Of course, in my solution, a single process doesn't readily serve multiple business objects, but I'm having a hard time thinking of a case in which one would.
Thanks,
Britt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017699#4017699
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017699
19 years, 1 month
[Design of JBoss internal QA (Test Suite)] - Re: testcases overwritten
by bstansberry@jboss.com
The run-junit target takes a param "junit.configuration" which if set will be appended to the report name. All the places in the testsuite where this is called should set a value for this parameter. Places where the tests are executed not via run-junit (see tests-clustering-unit target) should include this kind of stuff in the call to junit:
| <!-- definition of the property for keeping results between configuration -->
| <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
| <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="${junit.formatter.usefile}" extension="-${jboss-junit-configuration}.xml" />
|
Here ${jboss.junit.configuration} is passed in by the target that calls this one. If that kind of indirection isn't used (e.g. in tests-security-manager), the use of ${jboss.junit.configuration} could skipped and the value set directly.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017630#4017630
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017630
19 years, 1 month