[jBPM Users] - IdentityService
by TejJBPM
I am successfully able to create users, groups and memberships.
But I dont find any api calls to update user-group relationship.
So i tried to use the deletemembership and createmembership to reestablish the relationships.But the problem is the deleteMembership() method does not seem to work. Has anybody tried it? What am i doing wrong? The api says I can pass null for role
| identityService.deleteMembership(identityService.findUserById("testuser")),
| identityService.findGroupById("testgroup").getId(),null); // userid,groupid,roleid
It returns the following error
java.lang.IllegalArgumentException: attempt to create delete event with null entity
| at org.hibernate.event.DeleteEvent.<init>(DeleteEvent.java:47)
| at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:771)
| at org.jbpm.pvm.internal.identity.impl.IdentitySessionImpl.deleteMembership(IdentitySessionImpl.java:197)
| at org.jbpm.pvm.internal.identity.cmd.DeleteMembershipCmd.execute(DeleteMembershipCmd.java:48)
| at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
| at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
| at org.jbpm.pvm.internal.svc.IdentityServiceImpl.deleteMembership(IdentityServiceImpl.java:111)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267488#4267488
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267488
16 years, 4 months
[jBPM Users] - Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u
by dejanmr
Thanks for the answer kukeltje,
"kukeltje" wrote : By making a big 'typo' in it, you can see if it is or not.
This is exactly what I tried with:
anonymous wrote : 1) When I put dummy class name, I got error on process deployment, so it looks like my change is being processed in some way.
When I got my class deployed successfully, I guess they is is processed somehow.
anonymous wrote :
| Could also be that the specific config us not picked up contrary to what you expect
How can I know it?
1) I have custom jbpm.cfg.xml on classpath in my ear, and the same one is in database (blob field) which got there on depoy, so I guess this means it seems t be "picked up".
2) This is not the same jbpm.cfg.xml which is within \jbpm\jbpm-service.sar\! Why? If I put custom jbpm.cfg.xml, my custom class could not be located.
Is this proper way of doing it, and if it is not can you give me a hint how to fix it?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267474#4267474
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267474
16 years, 4 months
[jBPM Users] - Groovy in Script activity works, but lang attribute seems to
by bgoetzmann
After some search, I've found how to proceed. The class to use is org.codehaus.groovy.jsr223.GroovyScriptEngineFactory.
- I added this declaration (in bold) in the jbpm.cfg.xml:
<script-manager default-expression-language="groovy"
default-script-language="groovy">
<script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
<script-language name="groovy" factory="org.codehaus.groovy.jsr223.GroovyScriptEngineFactory" />
</script-manager>
- You have to have the groovy-all-....jar in your libs
So you use Groovy in a script activity; for example:
<script name="display hello world" lang="groovy"
expr="println 'Salut !'">
But with some test, I see that the lang attribute value is not take in account; and the only way to have Groovy to be executed is to set it as default as I do it above in script-manager XML element.
Is it a bug?
Cheers,
Bertrand.
"bgoetzmann" wrote : Hello,
|
| The jBPM says a little on how to use another script language in a Script activity.
| It seems you have to add something like this, as child element of the script-manager XML element in the jbpm.cfg.cml file:
|
| <script-language name="..." factory="..."/>
|
| for the language you want.
|
| How can I define Groovy? And what interface the class defined in factory attribute is supposed to support?
|
| Thank you,
|
|
| Bertrand.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267458#4267458
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267458
16 years, 4 months