Package org.drools.bpmn2.legacy.beta1

Examples of org.drools.bpmn2.legacy.beta1.StartEventHandler


                    Map<String, Escalation> escalations = (Map<String, Escalation>)
                    ((ProcessBuildData) parser.getData()).getMetaData("Escalations");
                if (escalations == null) {
                    throw new IllegalArgumentException("No escalations found");
                }
                Escalation escalation = escalations.get(escalationRef);
                if (escalation == null) {
                    throw new IllegalArgumentException("Could not find escalation " + escalationRef);
                }
                faultNode.setFaultName(escalation.getEscalationCode());
                }
            }
            xmlNode = xmlNode.getNextSibling();
        }
    }
View Full Code Here


                    Map<String, Escalation> escalations = (Map<String, Escalation>)
                    ((ProcessBuildData) parser.getData()).getMetaData("Escalations");
                if (escalations == null) {
                    throw new IllegalArgumentException("No escalations found");
                }
                Escalation escalation = escalations.get(escalationRef);
                if (escalation == null) {
                    throw new IllegalArgumentException("Could not find escalation " + escalationRef);
                }
                String faultName = escalation.getEscalationCode();
                    actionNode.setAction(new DroolsConsequenceAction("java",
                        "org.drools.process.instance.context.exception.ExceptionScopeInstance scopeInstance = (org.drools.process.instance.context.exception.ExceptionScopeInstance) ((org.drools.workflow.instance.NodeInstance) kcontext.getNodeInstance()).resolveContextInstance(org.drools.process.core.context.exception.ExceptionScope.EXCEPTION_SCOPE, \"" + faultName + "\");" + EOL +
                        "if (scopeInstance != null) {" + EOL +
                        "  scopeInstance.handleException(\"" + faultName + "\", null);" + EOL +
                        "} else {" + EOL +
View Full Code Here

    List<Interface> interfaces = (List<Interface>) buildData.getMetaData("Interfaces");
        if (interfaces == null) {
            interfaces = new ArrayList<Interface>();
            buildData.setMetaData("Interfaces", interfaces);
        }
        Interface i = new Interface(id, name);
        interfaces.add(i);
    return i;
  }
View Full Code Here

    parser.startElementBuilder(localName, attrs);

    String id = attrs.getValue("id");
    String name = attrs.getValue("name");
   
    Interface i = (Interface) parser.getParent();
        Operation operation = i.addOperation(id, name);
    return operation;
  }
View Full Code Here

    parser.startElementBuilder(localName, attrs);

    String id = attrs.getValue("id");
    String name = attrs.getValue("name");
   
    Interface i = (Interface) parser.getParent();
        Operation operation = i.addOperation(id, name);
    return operation;
  }
View Full Code Here

    List<Interface> interfaces = (List<Interface>) buildData.getMetaData("Interfaces");
        if (interfaces == null) {
            interfaces = new ArrayList<Interface>();
            buildData.setMetaData("Interfaces", interfaces);
        }
        Interface i = new Interface(id, name);
        interfaces.add(i);
    return i;
  }
View Full Code Here

        }
        Message message = messages.get(messageId);
        if (message == null) {
            throw new IllegalArgumentException("Could not find message " + messageId);
        }
        Operation operation = (Operation) parser.getParent();
        operation.setMessage(message);
    return parser.getCurrent();
  }
View Full Code Here

        List<Interface> interfaces = (List<Interface>)
            ((ProcessBuildData) parser.getData()).getMetaData("Interfaces");
        if (interfaces == null) {
            throw new IllegalArgumentException("No interfaces found");
        }
        Operation operation = null;
        for (Interface i: interfaces) {
            operation = i.getOperation(operationRef);
            if (operation != null) {
                break;
            }
        }
        if (operation == null) {
            throw new IllegalArgumentException("Could not find operation " + operationRef);
        }
        workItemNode.getWork().setParameter("Interface", operation.getInterface().getName());
        workItemNode.getWork().setParameter("Operation", operation.getName());
        workItemNode.getWork().setParameter("ParameterType", operation.getMessage().getType());
    }
View Full Code Here

    String id = attrs.getValue("id");
    String name = attrs.getValue("name");
   
    Interface i = (Interface) parser.getParent();
        Operation operation = i.addOperation(id, name);
    return operation;
  }
View Full Code Here

        }
        Message message = messages.get(messageId);
        if (message == null) {
            throw new IllegalArgumentException("Could not find message " + messageId);
        }
        Operation operation = (Operation) parser.getParent();
        operation.setMessage(message);
    return parser.getCurrent();
  }
View Full Code Here

TOP

Related Classes of org.drools.bpmn2.legacy.beta1.StartEventHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.