Discussion:
[jboss-user] [jBPM] - Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'.
Ted Pan
2012-11-04 18:58:51 UTC
Permalink
Ted Pan [https://community.jboss.org/people/ted.pan] created the discussion

"Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'."

To view the discussion, visit: https://community.jboss.org/message/774673#774673

--------------------------------------------------------------
you need to add the user to takservice by using the following code
|
|
|
| Properties userGroups = new Properties(); |
|
|
|
| userGroups.setProperty("john", "user"); |
|
|
|
| UserGroupCallbackManager manager = UserGroupCallbackManager.getInstance(); |
|
|
|
| manager.setCallback(new DefaultUserGroupCallbackImpl(userGroups)); |

*or* implement a an UserGroupCallback. Then


        UserGroupCallbackManager manager = UserGroupCallbackManager
                .getInstance();
        if (!manager.existsCallback()) {
            UserGroupCallback userGroupCallback = new JBPMUserGroupCallback();
            manager.setCallback(userGroupCallback);
        }


this is the callback implementation:

public class JBPMUserGroupCallback implements UserGroupCallback {

    @Override
    public boolean existsGroup(String groupId) {
        return true;
    }

    @Override
    public boolean existsUser(String userId) {
        return true;
    }

    @Override
    public List<String> getGroupsForUser(String userId, List<String> groupIds,
            List<String> allExistingGroupIds) {
         if(groupIds != null) {

                List<String> retList = new ArrayList<String>(groupIds);

                // merge all groups

                if(allExistingGroupIds != null) {

                    for(String grp : allExistingGroupIds) {

                        if(!retList.contains(grp)) {

                            retList.add(grp);

                        }

                    }

                }

                return retList;

            } else {
                    //
                // return empty list by default
//please note: there are different return value for different version of jPBM
                 //List<String> retList = new ArrayList<String>();

                 //retList.add("user");
                 //return retList;
                //return new ArrayList<String>();   //for jBPM5.3.0.Final
                return null;      //for jBPM5.4.0.CR1

            }

    }

}
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/774673#774673]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
franco80
2012-11-04 20:50:09 UTC
Permalink
franco80 [https://community.jboss.org/people/franco80] created the discussion

"Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'."

To view the discussion, visit: https://community.jboss.org/message/774696#774696

--------------------------------------------------------------
great, it works ! :)

thank you
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/774696#774696]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Jozef Chocholáček
2013-02-27 16:48:01 UTC
Permalink
Jozef Chocholáček [https://community.jboss.org/people/jchocholacek] created the discussion

"Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'."

To view the discussion, visit: https://community.jboss.org/message/799931#799931

--------------------------------------------------------------
Just hit that... min. 3 hours lost. Why heck is the message "Could not commit transaction" when in fact the UserGroupCallback is missing?! This should be handled better!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799931#799931]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Balaji Subramaniam
2013-03-18 02:07:25 UTC
Permalink
Balaji Subramaniam [https://community.jboss.org/people/balajiora] created the discussion

"Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'."

To view the discussion, visit: https://community.jboss.org/message/803157#803157

--------------------------------------------------------------
AWESOME :) .  It works like GEM
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/803157#803157]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...