[jbpm-dev] [Design of JBoss jBPM] - Re: task and swimlane roles
tom.baeyens@jboss.com
do-not-reply at jboss.com
Tue Feb 17 05:33:59 EST 2009
so the 2 options are:
long taskDbid = ...;
|
| taskService.addTaskRole(taskDbid, IdentityType.USER, "johndoe", Role.ROLENAME_CANDIDATE_USER);
|
or
long taskDbid = ...;
|
| taskService.addTaskRole(taskDbid, new User("johndoe"), Role.ROLENAME_CANDIDATE_USER);
|
where
public interface Identity {
| getId();
| }
|
| public class User implements Identity {
| public User(String userId) {...}
| ...
| }
|
| public class Group implements Identity {
| public Group(String groupId) {...}
| ...
| }
both are acceptable to me. but working with objects in a session facade can lead to confusion. so i am leaning a bit more towards first option with identityType = IdentityType.USER and identityId = "johndoe"
WDYT ?
do these 2 options reflect the choice correctly ? or do you see other diffs as well ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210628#4210628
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210628
More information about the jbpm-dev
mailing list