[JBoss jBPM] - Re: Does AssignmentHandler work within the start node??
by ardavan
Thank you for your reply Martin.
I checked the javadoc - I believed that at the creation of my TaskInstance object, the actorID parameter would be null
but that because this assertion is true:
| TaskInstance taskInstance = createNewProcessInstance();
| assertEquals("taskSubmission", taskInstance.getName());
|
which shows that I am in the "taskSubmission" node
| <task name="taskSubmission">
| <assignment class="jbpm.taskmgmt.EmiliAssignmentHandler"></assignment>
| </task>
|
my jbpm.taskmgmt.EmiliAssignmentHandler would set the null actorId to "emili".
Nevertheless now this is the way that I am doing it:
| public void testSubmissionTask3(){
| GraphSession graphSession = jbpmContext.getGraphSession();
| ProcessDefinition processDefinition =
| graphSession.findLatestProcessDefinition("test");
| processInstance =
| new ProcessInstance(processDefinition);
| contextInstance = processInstance.getContextInstance();
| Task t = processInstance.getTaskMgmtInstance().getTaskMgmtDefinition().getTask("taskSubmission");
| TaskInstance ti = processInstance.getTaskMgmtInstance().createTaskInstance(t,processInstance.getRootToken());
| assertEquals("emili", ti.getActorId());
| }
|
I hope it is correct
Danke schoen
Ardavan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192505#4192505
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192505
17 years, 5 months
[Management, JMX/JBoss] - Problem registering @Management interface for @Service class
by Renen
Hello,
I would very much appreciate some assistance.
I am trying to create a"service" - effectively a singleton that is loaded on start-up.
This worked in JBoss 4x. I am now trying to port the code to jboss-5.0.0.CR2...
My code is as follows:
| public interface ProcessManager {
|
| public void create() throws Exception;
| public int getID();
|
|
| }
|
And:
| @Service (objectName="121:service=processManager")
| @Management(ProcessManager.class)
| @TransactionAttribute( TransactionAttributeType.NOT_SUPPORTED )
| public class ProcessManagerMBean implements ProcessManager {
|
| @Override
| public void create() throws Exception {
| System.out.println("Process create");
| }
|
| @Override
| public int getID() {
| return 2;
| }
|
|
| }
|
However, when this is deployed, JBoss complains:
| Problem registering @Management interface for @Service class
|
| 13:34:06,137 INFO [EJBContainer] STARTED EJB: za.co.oneTwoOne.services.ProcessManagerMBean ejbName: ProcessManagerMBean
| 13:34:06,155 INFO [JBossASKernel] installing bean: 121:service=processManager
| 13:34:06,155 INFO [JBossASKernel] with dependencies:
| 13:34:06,155 INFO [JBossASKernel] and demands:
| 13:34:06,155 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
| 13:34:06,155 INFO [JBossASKernel] and supplies:
| 13:34:06,155 INFO [JBossASKernel] jndi:121/ProcessManagerMBean/local
| 13:34:06,155 INFO [JBossASKernel] Class:za.co.oneTwoOne.services.ProcessManager
| 13:34:06,155 INFO [JBossASKernel] jndi:121/ProcessManagerMBean/remote
| 13:34:06,155 INFO [JBossASKernel] jndi:121/ProcessManagerMBean/local-za.co.oneTwoOne.services.ProcessManager
| 13:34:06,155 INFO [JBossASKernel] Installing bean(121:service=processManager) into kernel
| 13:34:06,163 ERROR [STDERR] java.lang.RuntimeException: Problem registering @Management interface for @Service class za.co.oneTwoOne.services.ProcessManagerMBean
| 13:34:06,163 ERROR [STDERR] at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:629)
| 13:34:06,163 ERROR [STDERR] at org.jboss.ejb3.service.ServiceContainer.lockedStart(ServiceContainer.java:228)
| 13:34:06,163 ERROR [STDERR] at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:858)
| 13:34:06,163 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 13:34:06,163 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 13:34:06,163 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 13:34:06,163 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 13:34:06,163 ERROR [STDERR] at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(Ref
|
What am I doing wrong?
Also, why does it demand an "EJBTimerService"?
Thank you very much for your time.
Renen.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192458#4192458
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192458
17 years, 5 months