[JBoss jBPM] - Re:
by kukeltje
anonymous wrote : Let's take an example, I have an "Approval task node" that handles the approval from two departments: HR and Accounting. When I design this by using the GPD, I will create two Tasks and at runtime one Task instance will be created for each Task.
|
That is indeed an option
anonymous wrote : Now if I want to do this at runtime by using a rule file (or a delegation class), one way would be to create a default Task definition for this node when designing my process and then at runtime my rules will create two Task instances (one for HR and one for Accounting) for the same Task definition.
Correct, again, an option
anonymous wrote :
| For the same idea, which is 2 Tasks one for HR and one for Accounting (at least in the BA point of view) I'm not using the same objects of my domain model to implement it. I'm just wondering if this is ok.... ? Yes, the implementation works fine in both cases but what if one day I'm stuck because I found out I can do some specific reporting in one case but not in the other case since the implementation is different ?
Then you have the same api at you disposal and you can 'migrate' the tasks or the complete processes by deploying a new processdefinition (or changing the existing one as you found out is also possible) and place the part of the tokens in the new tasknodes. Since you obviously want to minimize that and have clear e.g. swimlanes, make sure in advance (design time) things are split.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215551#4215551
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215551
17 years, 1 month
[JBoss jBPM] - Re:
by AlClientView
I agree it's easy to create task instances at runtime and that's the way I'm using when the implementation requires such feature. But it's a bit different... I was talking about Task (not task instance). Also the default implementation of the Task instance is that its properties are copied from the Task definition when it is created... I know we don't have to follow the default implementation, JBPM is flexible enough for that. But my point is more about the logic of domain model.
Let's take an example, I have an "Approval task node" that handles the approval from two departments: HR and Accounting. When I design this by using the GPD, I will create two Tasks and at runtime one Task instance will be created for each Task.
Now if I want to do this at runtime by using a rule file (or a delegation class), one way would be to create a default Task definition for this node when designing my process and then at runtime my rules will create two Task instances (one for HR and one for Accounting) for the same Task definition.
For the same idea, which is 2 Tasks one for HR and one for Accounting (at least in the BA point of view) I'm not using the same objects of my domain model to implement it. I'm just wondering if this is ok.... ? Yes, the implementation works fine in both cases but what if one day I'm stuck because I found out I can do some specific reporting in one case but not in the other case since the implementation is different ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215546#4215546
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215546
17 years, 1 month
[JBoss AOP] - Re: Log Messages Not Showing with Compile Time Weaving
by stale.pedersen@jboss.org
hi, please take a look at the pom.xml file in the method-execution example provided in the distro; jboss-aop-2.0.0.GA/docs/aspect-framework/examples/method-execution/pom.xml. there you'll see an example of a 2-step process where the classes are compile time woven, and then executed with the jboss-aop.xml referenced in the run step.
<plugin>
| <groupId>org.jboss.maven.plugins</groupId>
| <artifactId>maven-jbossaop-plugin</artifactId>
| <version>${jboss.aop.plugin.version}</version>
| <executions>
| <execution>
| <id>compile</id>
| <configuration>
| <aoppaths>
| <aoppath>jboss-aop.xml</aoppath>
| </aoppaths>
| </configuration>
| <goals>
| <goal>compile</goal>
| </goals>
| </execution>
| <execution>
| <id>run</id>
| <configuration>
| <aoppaths>
| <aoppath>jboss-aop.xml</aoppath>
| </aoppaths>
| <executable>Driver</executable>
| </configuration>
| <goals>
| <goal>run</goal>
| </goals>
| </execution>
| </executions>
| </plugin>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215539#4215539
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215539
17 years, 1 month
[EJB 3.0] - Enumtransfer between entities, one without EnumType.STRING
by cdebergh
Hello,
I have a application running on Jboss AS 4.2.2 that uses entities with enum attributes. I noticed an occurrence while stepping through a method that got me curious. After a get/set of an enum value from one entity to the other, the object being set contained the same null value it previously held. No exception was throw nor debug log printed. The entity getting from had an annotation for that field that stated @Enumerated(EnumType.STRING) while the entity being set did not have this annotation. However, as expected, an exception was encountered when the entity, that was set, was committed to the database.
I don't understand why the value was not transferred, or at least why no exception was thrown or error logged.
Here is some code to illustrate:
|
| public enum ColorEnum {
| BLONDE("Blonde"),
| RED("Red"),
| TAN("Tan");
| }
|
| @Entity
| @Table(name = "DOG")
| public class Dog {
| @Column(name = "COAT_COLOR"
| @Enumerated(EnumType.STRING)
| ColorEnum coatColor;
|
| public void setCoatColor(ColorEnum coatColor) {
| this.coatColor = coatColor;
| }
|
| public ColorEnumgetCoatColor() { return this.coatColor; }
| }
|
| @Entity
| @Table(name = "CAT")
| public class Cat {
| @Column(name = "COAT_COLOR"
| ColorEnum coatColor;
|
| public void setCoatColor(ColorEnum coatColor) {
| this.coatColor = coatColor;
| }
|
| public ColorEnumgetCoatColor() { return this.coatColor; }
| }
|
|
| public void newCatWithDogCoat() {
| ...
| // cat.getCoatColor() returns null
| // dog.getCoatColor() returns red
| cat.setCoatColor(dog.getCoatColor());
| ...
| // cat.getCoatColor() still returns null (no errors/exceptions)
| }
|
After adding @Enumerated(EnumType.STRING) to the Cat class, cat.getCoatColor() returns red
So why are there no exceptions/errors until it fails to save to the database?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215533#4215533
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215533
17 years, 1 month