Sandra Renaud [
https://community.jboss.org/people/joploya] created the discussion
"Re: UserGroupCallbackManager: Not returning callback"
To view the discussion, visit:
https://community.jboss.org/message/803642#803642
--------------------------------------------------------------
Hello,
At the creation of the knowledge session I use this code to register my usergroupcallback
:
// By Setting the jbpm.usergroup.callback property with the call
// back class full name, task service will use this to validate the
// user/group exists and its permissions are ok.
InputStream usergroupsin =
KnowledgeSessionProducer.class.getResourceAsStream(
"/jbpm.usergroup.callback.properties" );
if(usergroupsin != null) {
Properties callbackproperties = new Properties();
try {
callbackproperties.load(usergroupsin);
UserGroupCallbackManager.getInstance().setCallbackFromProperties(callbackproperties);
log.debug("Task service registered usergroup
callback ...");
} catch (Exception e) {
log.debug("Task service unable to register
usergroup callback ...");
}
}
if(UserGroupCallbackManager.getInstance().existsCallback()){
System.out.println("userGroupCallBack exists ! :)");
}else{
System.out.println("userGroupCallBack don't exist !
:(");
}
and I create a file name : jbpm.usergroup.callback.properties in src/main/resources
that contain this line :
jbpm.usergroup.callback=com.st.ams.task.management.AMSUserGroupCallbackImpl
This is the associated log :
17:06:45,137 DEBUG
[com.st.ams.jbpm.knowledge.KnowledgeSessionProducer] (http--127.0.0.1-8080-3) init of
KnowledgeSessionProducer ...
17:06:45,152 DEBUG [com.st.ams.task.management.AMSUserGroupCallbackImpl]
(http--127.0.0.1-8080-3) Starting AMSUserGroupCallbackImpl ...
17:06:45,153 INFO [org.jbpm.task.identity.UserGroupCallbackManager]
(http--127.0.0.1-8080-3) UserGroupCallback registered from properties file:
com.st.ams.task.management.AMSUserGroupCallbackImpl
17:06:45,154 DEBUG [com.st.ams.jbpm.knowledge.KnowledgeSessionProducer]
(http--127.0.0.1-8080-3) Task service registered usergroup callback ...
17:06:45,155 INFO [stdout] (http--127.0.0.1-8080-3) userGroupCallBack exists ! :)
I hope it will help you.
Regards,
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/803642#803642]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]