[jboss-user] [JBoss jBPM] - Re: Token.signal() throws Exception from FieldInstantiator
SidKennedy
do-not-reply at jboss.com
Tue Nov 6 17:44:51 EST 2007
I can't remove the xmlns because an exception is thrown otherwise.
Here's the code of the JpdlExecutionInvoker:
| public class JpdlExecutionInvoker implements ActionHandler {
|
| public void execute(ExecutionContext executionContext) throws Exception {
| try {
| // very project-specific statements
| Date startDate = executionContext.getProcessInstance().getStart();
| DataContainerManager dcManager = DataContainerManager
| .getInstanceFor(startDate);
| System.out.println(executionContext.getNode().getAction().getActionExpression());
| TTool toolXML = Tool.unmarshal(new StringReader(executionContext
| .getNode().getAction().getActionDelegation()
| .getConfiguration()));
|
| Display disp = Display.getCurrent();
| if (disp == null) {
| disp = new Display();
| }
| // execute Tool
| ITool tool = ToolFactory.createTool(toolXML);
|
| tool.execute(dcManager);
| IStatus status = tool.getExecutionStatus();
|
| // dependent on status, signal outgoing transition
| if (status.equals(IStatus.SUCCESS)) {
| String transition;
| if (status instanceof JPDLStatus) {
| transition = ((JPDLStatus) status).getTransition();
| } else {
| transition = "success";
| }
| executionContext.getToken().signal(transition);
| return;
| } else if (status.equals(IStatus.FAIL)) {
| String transition;
| if (status instanceof JPDLStatus) {
| transition = ((JPDLStatus) status).getTransition();
| } else {
| transition = "failure";
| }
| executionContext.getToken().signal(transition);
| return;
| } else {
| throw new IllegalArgumentException(
| "Unknown tool execution status " + status);
| }
| } catch (Exception e) {
| e.printStackTrace();
| throw e;
| }
| }
| }
| anonymous wrote :
| |
| | does it help you to locate my fault?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102363#4102363
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102363
More information about the jboss-user
mailing list