[JBoss jBPM] - STDERR in JBoss startup with jBPM 4.0
by showmanlkz
Hi all,
I am new to jBPM, just tried to installed jBPM 4.0, after the installation, I started JBoss 5, it output lots of ERROR:
| 22:35:13,234 ERROR [STDERR] 63 [main] WARN org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap - The use of javax.ws.rs.core.Applica
| tion is deprecated, please use javax.ws.rs.Application as a context-param instead
| 22:35:13,250 ERROR [STDERR] 79 [main] INFO org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap - Adding listed @Provider class org.j
| boss.bpm.report.FileWriter
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Added built in provider DataSourceProvider
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Added built in provider DefaultTextPlain
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Added built in provider org.jboss.resteasy.plugins.provide
| rs.StringTextStar
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Added built in provider org.jboss.resteasy.plugins.provide
| rs.InputStreamProvider
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Added built in provider org.jboss.resteasy.plugins.provide
| rs.ByteArrayProvider
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Added built in provider org.jboss.resteasy.plugins.provide
| rs.FormUrlEncodedProvider
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Added built in provider org.jboss.resteasy.plugins.provide
| rs.FormUrlEncodedProvider
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Added built in provider org.jboss.resteasy.plugins.provide
| rs.StreamingOutputProvider
| 22:35:13,265 ERROR [STDERR] 94 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in provider org.jboss.resteasy.plugins.provid
| ers.multipart.MultipartReader
| 22:35:13,281 ERROR [STDERR] 110 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in provider org.jboss.resteasy.plugins.provi
| ders.multipart.ListMultipartReader
| 22:35:13,281 ERROR [STDERR] 110 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in provider org.jboss.resteasy.plugins.provi
| ders.multipart.MultipartFormDataReader
| 22:35:13,281 ERROR [STDERR] 110 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in provider org.jboss.resteasy.plugins.provi
| ders.multipart.MapMultipartFormDataReader
| 22:35:13,281 ERROR [STDERR] 110 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in providerorg.jboss.resteasy.plugins.provid
| ers.multipart.MultipartWriter
| 22:35:13,296 ERROR [STDERR] 125 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in providerorg.jboss.resteasy.plugins.provid
| ers.multipart.MultipartFormDataWriter
| 22:35:13,296 ERROR [STDERR] 125 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in providerorg.jboss.resteasy.plugins.provid
| ers.multipart.ListMultipartWriter
| 22:35:13,296 ERROR [STDERR] 125 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in providerorg.jboss.resteasy.plugins.provid
| ers.multipart.MapMultipartFormDataWriter
| 22:35:13,296 ERROR [STDERR] 125 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in provider org.jboss.resteasy.plugins.provi
| ders.multipart.MultipartFormAnnotationReader
| 22:35:13,296 ERROR [STDERR] 125 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in providerorg.jboss.resteasy.plugins.provid
| ers.multipart.MultipartFormAnnotationWriter
| 22:35:13,296 ERROR [STDERR] 125 [main] INFO org.jboss.resteasy.plugins.providers - Adding built in provider org.jboss.resteasy.plugins.provi
| ders.IIOImageProvider
|
The jBPM user guide says
anonymous wrote : And you can surf to the jBPM console You can login as one of the following users:
It points to the URL http://localhost:8080/gwt-console, but I was given 404 when tried to open it.
Any idea?
Thanks
Derrick
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4243532#4243532
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243532
16 years, 8 months
[JBoss jBPM] - Variable missing in assignment handler
by lpiccoli
hi all,
my swimlane assignment handler is unable to retrieve variables that have been previous set in both root token and local token.
the test involves a forkhandler, sub process and swimlane assignment handler.
When inside the SwimlaneAssignmentHandler getVariable() returns null which is not what i was expecting
| public void assign(Assignable assignable, ExecutionContext executionContext) {
|
| assertNotNull("shouldnt be null", executionContext.getVariable(IDENTIFIER));
| String expression = (String)executionContext.getVariable(EXPRESSION);
| assertNotNull( "shouldnt be null", expression );
|
as it was set in the previous ActivityForkActionHandler.execute()
| public void execute(final ExecutionContext executionContext) throws Exception {
| .....stuff
| Token(rootToken, "ITP" + item.getId()); //TODO -lp
| newToken.setTerminationImplicit(true);
| executionContext.getJbpmContext().getSession().save(newToken);
| final ExecutionContext newExecutionContext = new ExecutionContext(newToken);
| newExecutionContext.getContextInstance().createVariable(
| EXPRESSION,
| item.getResponsibleExpression(),
| newToken);
|
|
I am not sure if the problem is with my process definition of the swimlan assignment
| <swimlane name='responsible' >
| <assignment class='com.asteriski.itpflow.action.ActivityForkActionHandlerTest$SwimlaneAssignmentHandler'/>
| </swimlane>
|
or with how i am setting the local variables against token in the forkHandler above
i have a attached the entire test case below. It is a bit tedious but i needed to include all the handler code.
any help is most appreciated.
| public class ActivityForkActionHandlerTest extends AbstractJbpmTestCase {
|
| static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("jbpm.test.cfg.xml");
|
| public void testForkHandlerAndSubProcess() throws Exception {
|
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
|
| ProcessDefinition subProcessDefinition = ProcessDefinition.parseXmlString(
| "<process-definition name='sub'>" +
| " <start-state>" +
| " <transition to='wait' />" +
| " </start-state>" +
| " <swimlane name='responsible' >" +
| " <assignment class='com.asteriski.itpflow.action.ActivityForkActionHandlerTest$SwimlaneAssignmentHandler' />" +
| " </swimlane>" +
| " <task-node name='wait' >" +
| " <description>'just waiting'</description>" +
| " <task name='task-waiting' signal='block' swimlane='responsible'>"+
| " </task>" +
| " <transition to='end_sub'></transition>" +
| " </task-node>" +
| " <end-state name='end_sub' />" +
| "</process-definition>"
| );
| jbpmContext.deployProcessDefinition(subProcessDefinition);
|
| ProcessDefinition superProcessDefinition = ProcessDefinition.parseXmlString(
| "<process-definition" +
| " name='super'>" +
| "<start-state name='start'> " +
| "<transition name='to_state' to='forkActivities'>" +
| "</transition>" +
| "</start-state>" +
| " <node name='forkActivities'>" +
| " <action class='com.asteriski.itpflow.action.ActivityForkActionHandlerTest$ActivityForkActionHandler' config-type='bean' name='ActivityForkActionHandler'></action>" +
| " <description>" +
| " find all activities that have no blocking state and generate a testign request"+
| " </description>" +
| " <transition to='Sub Process'></transition>" +
| " </node>" +
| "<process-state name='Sub Process'>" +
| "<sub-process name='sub'/>" +
| "<transition to='task-node1'></transition>" +
| "</process-state>" +
| "<task-node name='task-node1'> " +
| " <task name='task1'>" +
| " </task>" +
| " <transition to='end' name='to_end'> " +
| " </transition>" +
| "</task-node>" +
| "<end-state name='end'></end-state> " +
| "</process-definition>");
|
|
| jbpmContext.deployProcessDefinition(superProcessDefinition);
| ProcessInstance processInstance = jbpmContext.newProcessInstance("super");
|
| ProcessState processState = (ProcessState) superProcessDefinition.getNode("Sub Process");
| processState.setSubProcessDefinition(subProcessDefinition);
|
| processInstance.getContextInstance().createVariable(Constant.ITP_ID_JBPM_CONTEXT_IDENTIFIER, 1);
|
| // After construction, the process execution has one main path
| // of execution (=the root token).
| Token rootToken = processInstance.getRootToken();
|
| assertEquals(
| "start",
| rootToken.getNode().getName());
|
|
| // Move the process instance to the task
| rootToken.signal();
| assertEquals(
| "Sub Process",
| rootToken.getNode().getName());
|
| //get the sub process
| ProcessInstance subProcessInstance = rootToken.getSubProcessInstance();
| assertSame(subProcessDefinition, subProcessInstance.getProcessDefinition());
| Token subToken = subProcessInstance.getRootToken();
|
|
| // Move the process instance to the task
| subToken.signal();
| assertEquals(
| "end_sub",
| subToken.getNode().getName());
|
|
| }
|
| public static class SwimlaneAssignmentHandler implements AssignmentHandler {
|
| Logger log = Logger.getLogger(ResponsibleSwimlaneAssignmentHandler.class);
|
| private static final long serialVersionUID = 1L;
|
| public void assign(Assignable assignable, ExecutionContext executionContext) {
|
|
| assertNotNull("shouldnt be null", executionContext.getVariable(Constant.ITP_ID_JBPM_CONTEXT_IDENTIFIER));
| String expression = (String)executionContext.getVariable(Constant.ASSIGNMENT_RESPONSIBLE_EXPRESSION_JBPM_CONTEXT_IDENTIFIER);
| assertNotNull( "shouldnt be null", expression );
|
| assignable.setPooledActors( expression );
| }
| }
|
|
| public static class ActivityForkActionHandler implements ActionHandler, Constant {
|
| Logger log = Logger.getLogger( ActivityForkActionHandler.class );
|
|
| /**
| * Create a new child token for each item in list.
| *
| * @param executionContext
| * @throws Exception
| */
| @SuppressWarnings("unchecked")
| public void execute(final ExecutionContext executionContext) throws Exception {
|
| log.debug("execute");
| long id =Long.valueOf( executionContext.getContextInstance().getVariable(ITP_ID_JBPM_CONTEXT_IDENTIFIER).toString() );
| log.debug("execute itp d:" + id);
|
| Collection<ITPItem> activities = getActivities( id );
|
| if( activities != null ){
| final Token rootToken = executionContext.getToken();
| final Node node = executionContext.getNode();
| log.debug( "node name:" + node.getName() );
| log.debug( "node getDescription:" + node.getDescription() );
| log.debug( "node getDefaultLeavingTransition:" + node.getDefaultLeavingTransition().getName() );
| final Transition transition = (Transition) node.getLeavingTransitions().get(0); //TODO must work out which transition to use
|
| log.debug( "transition name:" + transition.getName() );
|
| Collection<ExecutionContext> newContextList = new ArrayList<ExecutionContext>();
|
| //newExecutionContext.getContextInstance().createVariable(as, item, newToken);
| //
|
| for (Iterator iterator = activities.iterator(); iterator.hasNext();) {
|
| ITPItem item = (ITPItem) iterator.next();
| log.debug( "item id:" + item.getId() );
|
| final Token newToken = new Token(rootToken, "ITP" + item.getId()); //TODO -lp
| newToken.setTerminationImplicit(true);
| executionContext.getJbpmContext().getSession().save(newToken);
| final ExecutionContext newExecutionContext = new ExecutionContext(newToken);
| newExecutionContext.getContextInstance().createVariable(
| ASSIGNMENT_RESPONSIBLE_EXPRESSION_JBPM_CONTEXT_IDENTIFIER,
| item.getResponsibleExpression(),
| newToken);
| log.debug("execute getVariable:" + newExecutionContext.getVariable(ASSIGNMENT_RESPONSIBLE_EXPRESSION_JBPM_CONTEXT_IDENTIFIER));
|
| newContextList.add(newExecutionContext);
| }
|
| // Now, let each new token leave the node.
| //
| for (Iterator<ExecutionContext> iterator = newContextList.iterator(); iterator.hasNext();) {
| ExecutionContext context = iterator.next();
| //go via transition
| node.leave(context, transition);
|
| }
| }
|
| log.debug("leaving node" );
| executionContext.leaveNode();
| }
|
| /**
| * TODO the test version needs to be mocked somehow
| * @param id
| * @return
| */
| public Collection<ITPItem> getActivities( long id) {
|
| log.trace("getActivities");
| Collection<ITPItem> items = new ArrayList<ITPItem>();
|
| ITPItem itp1 = new ITPItem();
| itp1.setId(1);
| itp1.setResponsibleExpression("hello1");
| ITPItem itp2 = new ITPItem();
| itp2.setId(2);
| itp2.setResponsibleExpression("hello2");
| ITPItem itp3 = new ITPItem();
| itp3.setId(3);
| itp3.setResponsibleExpression("hello3");
|
| items.add(itp1);
| items.add(itp2);
| items.add(itp3);
| return items;
|
| }
| }
| }
|
-lp
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4243475#4243475
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243475
16 years, 8 months