[JBoss Seam] - jbpm, AssignmentHandler and bijection
by szaccaria
Hallo to all,
I need some help about assignmenthandler in to my proccess...
The definition is
| <process-definition
| name="controllodate">
|
| <start-state name="start">
| <transition to="controllo"/>
| </start-state>
|
| <task-node name="controllo">
| <task name="innerchek" description="Controllo documento da interno azienda">
| <assignment class="AssignmentToActorOrPooledActors" config-type="bean"/>
| </task>
| <transition to="confermato" name="terminato"/>
| <transition to="controllo" name="rinuncia"/>
| <transition name="richiesta" to="fornitore"></transition>
| </task-node>
|
|
| <task-node name="fornitore">
| <task name="controlladata" description="Controllo data da fornitore">
| <assignment actor-id="#{doc.clifor}"></assignment>
| </task>
| <transition name="proposta" to="controllo"></transition>
| </task-node>
|
| <end-state name="confermato"/>
|
| </process-definition>
|
and the class handler is
| @Stateless
| @Name("assignment")
| public class AssignmentToActorOrPooledActors implements AssignmentHandler {
|
| @In
| org.jbpm.taskmgmt.exe.TaskInstance taskInstance;
|
| @Logger
| private Log log;
|
| private static final long serialVersionUID = 1L;
|
| public void assign(Assignable arg0, ExecutionContext arg1) throws Exception {
|
| if( taskInstance == null ){
| arg0.setPooledActors(new String[]{"commerciale"});
| return;
| }
|
| Object obj = taskInstance.getVariable("responsabile");
| if( obj != null ){
| arg0.setActorId((String)obj);
| } else {
| arg0.setPooledActors(new String[]{"commerciale"});
| }
|
| }
|
| }
|
I hoped that the magic of bijection worked also with the AssignmentHandler? but therefore it does not seem being.
Infact I get the java.lang.NullPointerException error when i try to use the seam componet like @loger or @in...
Bjiection not wotk with bpm?
I want to assign a task to a actor or a pooled-actors to second from who it assigns the task.
Es: I'm a actor of a pooled-actors, get a task from the pooled-actors list taskinstace, than valutate the task and bypass to another person that make something with this, so the person return to me this task... but i want to be assign to me and not to entire pooled-actors list.
Thanks in advantage
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059259#4059259
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059259
17Â years, 5Â months
[JBoss Seam] - Test fails with Seam 2.0
by tim.shaw
Hi,
Using Seam 2.0, Ant 1.7, TestNG 5.6 and Java 6
I created a seam-gen project and wrote a quick test for the Authenticator class just to get up and running.
The initial project deploys and runs fine but I get the below exception when running 'ant test'
I presume I'm missing something ...
Thanks
tim
| test:
| [testng] [TestNGAntTask] TESTNG PASSED @/tmp/testng63206 WHICH CONTAINS:
| [testng] [TestNGAntTask] -d
| [testng] [TestNGAntTask] /home/tim/development/source/seam2-projects/dovecore/test-report
| [testng] [TestNGAntTask] -suitename
| [testng] [TestNGAntTask] Ant suite
| [testng] [TestNGAntTask] -testname
| [testng] [TestNGAntTask] Ant test
| [testng] [TestNGAntTask] /home/tim/development/source/seam2-projects/dovecore/test-build/testng.unittests.xml
| [testng] [Parser] Running:
| [testng] /home/tim/development/source/seam2-projects/dovecore/test-build/testng.unittests.xml
| [testng]
| [testng] WARN 29-06 17:36:13,654 [org.jboss.mx.loading.UnifiedLoaderRepository3.addClassLoader():675] Tried to add non-URLClassLoader. Ignored
| [testng] ERROR 29-06 17:36:14,043 [org.jboss.dependency.plugins.AbstractController.incrementState():456] Error installing to Instantiated: name=DeploymentFilter state=Described
| [testng] java.lang.IllegalStateException: Class not found: [Ljava.lang.String;
| [testng] at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:174)
| [testng] at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:125)
| [testng] at org.jboss.metadata.spi.signature.Signature.getParametersTypes(Signature.java:292)
| [testng] at org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(AnnotatedElementMetaDataLoader.java:138)
| [testng] at org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:280)
| [testng] at org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(MetaDataRetrievalToMetaDataBridge.java:159)
| [testng] at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.methodHasAnnotations(AOPConstructorJoinpoint.java:202)
| [testng] at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.hasMethodMetaData(AOPConstructorJoinpoint.java:172)
| [testng] at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.hasInstanceOrJoinpointMetaData(AOPConstructorJoinpoint.java:152)
| [testng] at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:99)
| [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
| [testng] at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:52)
| [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
| [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
| [testng] at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| [testng] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
| [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
| [testng] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
| [testng] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
| [testng] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
| [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:289)
| [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
| [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:302)
| [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:272)
| [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:119)
| [testng] at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
| [testng] at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:150)
| [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:162)
| [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
| [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
| [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:919)
| [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:856)
| [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| [testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| [testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| [testng] at java.lang.reflect.Method.invoke(Method.java:597)
| [testng] at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
| [testng] at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
| [testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
| [testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
| [testng] at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
| [testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
| [testng] at org.testng.TestRunner.runWorkers(TestRunner.java:678)
| [testng] at org.testng.TestRunner.privateRun(TestRunner.java:624)
| [testng] at org.testng.TestRunner.run(TestRunner.java:495)
| [testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
| [testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
| [testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
| [testng] at org.testng.SuiteRunner.run(SuiteRunner.java:190)
| [testng] at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
| [testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
| [testng] at org.testng.TestNG.run(TestNG.java:699)
| [testng] at org.testng.TestNG.privateMain(TestNG.java:824)
| [testng] at org.testng.TestNG.main(TestNG.java:802)
| [testng] Caused by: java.lang.ClassNotFoundException: [Ljava.lang.String;
| [testng] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| [testng] at java.security.AccessController.doPrivileged(Native Method)
| [testng] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| [testng] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
| [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| [testng] at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:170)
| [testng] ... 54 more
| [testng] FAILED CONFIGURATION: @BeforeClass init
| [testng] org.jboss.deployers.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
| [testng]
| [testng] *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
| [testng]
| [testng] ResourcesToDeploy
| [testng] -> DeploymentFilter{Configured:**ERROR**}
| [testng]
| [testng] ResourcesToDeploy2
| [testng] -> DeploymentFilter{Configured:**ERROR**}
| [testng]
| [testng] ResourcesToDeploy3
| [testng] -> DeploymentFilter{Configured:**ERROR**}
| [testng] -> jboss.kernel:service=Kernel{Configured:**ERROR**}
| [testng]
| [testng]
| [testng] *** CONTEXTS IN ERROR: Name -> Error
| [testng]
| [testng] DeploymentFilter -> java.lang.ClassNotFoundException: [Ljava.lang.String;
| [testng]
| [testng] jboss.kernel:service=Kernel -> **ERROR**
| [testng]
| [testng]
| [testng] at org.jboss.embedded.Bootstrap.checkIncomplete(Bootstrap.java:144)
| [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:169)
| [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
| [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
| [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:919)
| [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:856)
| [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| [testng] ... Removed 22 stack frames
| [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
| [testng] SKIPPED CONFIGURATION: @AfterMethod end
| [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
| [testng] SKIPPED: testAuthenticatorComponent
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059256#4059256
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059256
17Â years, 5Â months
[JBoss Seam] - Re: Seam & Maven2
by viviansteller
first of all, thanks guys - especially fers! great work! I really like being able to work with maven (and just with maven;)
Two questions:
1)
I tried the seam archetype from http://software.softeu.cz/seam/ . Seems that this configuration does not work with the current jboss 4.2.0.ga stable release because of the dependency to MyFaces. Are there any plans/ways to switch to JSF RI 1.2?
I already tried the work around as described in http://wiki.jboss.org/wiki/Wiki.jsp?page=JBoss5AndMyFaces which did not work. There appear more errors concerning listeners afterwards:(
2)
something general about using mavenized seam: I want to head start a new seam/ejb/facelets/jsf1.2 enabled webapp. is it possible to create a "normal" webapp with the maven webapp archetype and than just "bundle" ONLY ONE dependency for the whole seam thing? lateron I would just switch to another version of i.e. seam-ejb and would get newest seam version?
and related to the first question: howto exclude a dependency of i.e. seam-ejb if the container already ships with those jars (i.e. JSF RI)?
Thanks for any answers.
Best regards and keep on the great work!
vivian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059250#4059250
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059250
17Â years, 5Â months