Examples of Escalation


Examples of org.jbpm.bpmn2.core.Escalation

                    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.jbpm.process.instance.context.exception.ExceptionScopeInstance scopeInstance = (org.jbpm.process.instance.context.exception.ExceptionScopeInstance) ((org.jbpm.workflow.instance.NodeInstance) kcontext.getNodeInstance()).resolveContextInstance(org.jbpm.process.core.context.exception.ExceptionScope.EXCEPTION_SCOPE, \"" + faultName + "\");" + EOL +
                        "if (scopeInstance != null) {" + EOL +
                        "  scopeInstance.handleException(\"" + faultName + "\", null);" + EOL +
                        "} else {" + EOL +
View Full Code Here

Examples of org.jbpm.bpmn2.core.Escalation

                    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

Examples of org.jbpm.task.Escalation

   
    public static List<Escalation> readEscalationList(ObjectInput in) throws IOException, ClassNotFoundException  {
        int size = in.readInt();
        List<Escalation> list = new ArrayList<Escalation>(size);
        for ( int i = 0; i < size; i++ ) {
            Escalation item = new Escalation();
            item.readExternal( in );
            list.add( item );
        }
        return list;
    }   
View Full Code Here

Examples of org.jbpm.task.Escalation

        docs.add( new I18NText( "en-DK",
                                "Start Termin Dokumentation" ) );

        List<Escalation> escalations = new ArrayList<Escalation>();
        deadline.setEscalations( escalations );
        Escalation escalation = new Escalation();
        escalations.add( escalation );
        escalation.setName( "My Start Escalation" );

        List<BooleanExpression> constraints = new ArrayList<BooleanExpression>();
        escalation.setConstraints( constraints );
        constraints.add( new BooleanExpression( "mvel",
                                                "true" ) );

        List<Notification> notifications = new ArrayList<Notification>();
        escalation.setNotifications( notifications );

        Notification notification = new Notification();
        notifications.add( notification );
        notification.setPriority( 1000 );
        docs = new ArrayList<I18NText>();
        notification.setDocumentation( docs );
        docs.add( new I18NText( "en-UK",
                                "Start Notification documentation" ) );
        docs.add( new I18NText( "en-DK",
                                "Start Anmeldung Dokumentation" ) );

        businessAdmin = new ArrayList<OrganizationalEntity>();
        notification.setBusinessAdministrators( businessAdmin );
        businessAdmin.add( users.get( "bruce" ) );
        businessAdmin.add( users.get( "peter" ) );

        recipients = new ArrayList<OrganizationalEntity>();
        notification.setRecipients( recipients );
        recipients.add( users.get( "tony" ) );
        recipients.add( users.get( "darth" ) );

        names = new ArrayList<I18NText>();
        notification.setNames( names );
        subjects = new ArrayList<I18NText>();
        notification.setSubjects( subjects );
        descriptions = new ArrayList<I18NText>();
        notification.setDescriptions( descriptions );

        names.add( new I18NText( "en-UK",
                                 "This is my start notification name" ) );
        names.add( new I18NText( "en-DK",
                                 "Dies ist mein start anmeldung Name" ) );

        subjects.add( new I18NText( "en-UK", "This is my start notification subject" ) );
        subjects.add( new I18NText( "en-DK", "Das ist mein start anmeldung Thema" ) );

        descriptions.add( new I18NText( "en-UK", "This is my start notification description" ) );
        descriptions.add( new I18NText( "en-DK", "Das ist mein start anmeldung Beschreibung" ) );

        List<Reassignment> reassignments = new ArrayList<Reassignment>();
        escalation.setReassignments( reassignments );
        Reassignment reassignment = new Reassignment();
        reassignments.add( reassignment );

        docs = new ArrayList<I18NText>();
        reassignment.setDocumentation( docs );
        docs.add( new I18NText( "en-UK", "Start Reassignment documentation" ) );
        docs.add( new I18NText( "en-DK", "Start Neuzuweisung Dokumentation" ) );

        potentialOwners = new ArrayList<OrganizationalEntity>();
        reassignment.setPotentialOwners( potentialOwners );
        potentialOwners.add( users.get( "bobba" ) );
        potentialOwners.add( users.get( "luke" ) );
       
        List<Deadline> endDeadlines = new ArrayList<Deadline>();
        deadlines.setEndDeadlines( endDeadlines );
        deadline = new Deadline();
        deadline.setEscalated( true );
        endDeadlines.add( deadline );
        deadline.setDate( new Date( 10000000 ) );
        docs = new ArrayList<I18NText>();
        deadline.setDocumentation( docs );
        docs.add( new I18NText( "en-UK",
                                "End Deadline documentation" ) );
        docs.add( new I18NText( "en-DK",
                                "Ende Termin Dokumentation" ) );

        escalations = new ArrayList<Escalation>();
        deadline.setEscalations( escalations );
        escalation = new Escalation();
        escalations.add( escalation );
        escalation.setName( "My End Escalation" );

        constraints = new ArrayList<BooleanExpression>();
        escalation.setConstraints( constraints );
        constraints.add( new BooleanExpression( "mvel",
                                                "true" ) );

        notifications = new ArrayList<Notification>();
        escalation.setNotifications( notifications );

        notification = new Notification();
        notifications.add( notification );
        notification.setPriority( 1000 );
        docs = new ArrayList<I18NText>();
        notification.setDocumentation( docs );
        docs.add( new I18NText( "en-UK",
                                "End Notification documentation" ) );
        docs.add( new I18NText( "en-DK",
                                "Ende Anmeldung Dokumentation" ) );

        businessAdmin = new ArrayList<OrganizationalEntity>();
        notification.setBusinessAdministrators( businessAdmin );
        businessAdmin.add( users.get( "bobba" ) );
        businessAdmin.add( users.get( "darth" ) );

        recipients = new ArrayList<OrganizationalEntity>();
        notification.setRecipients( recipients );
        recipients.add( users.get( "liz" ) );
        recipients.add( users.get( "jane" ) );

        names = new ArrayList<I18NText>();
        notification.setNames( names );
        subjects = new ArrayList<I18NText>();
        notification.setSubjects( subjects );
        descriptions = new ArrayList<I18NText>();
        notification.setDescriptions( descriptions );

        names.add( new I18NText( "en-UK",
                                 "This is my end notification name" ) );
        names.add( new I18NText( "en-DK",
                                 "Dies ist mein ende anmeldung Name" ) );

        subjects.add( new I18NText( "en-UK", "This is my end notification subject" ) );
        subjects.add( new I18NText( "en-DK", "Das ist mein ende anmeldung Thema" ) );

        descriptions.add( new I18NText( "en-UK", "This is my end notification description" ) );
        descriptions.add( new I18NText( "en-DK", "Das ist mein ende anmeldung Beschreibung" ) );

        reassignments = new ArrayList<Reassignment>();
        escalation.setReassignments( reassignments );
        reassignment = new Reassignment();
        reassignments.add( reassignment );

        docs = new ArrayList<I18NText>();
        reassignment.setDocumentation( docs );
View Full Code Here

Examples of org.lightfish.business.escalation.entity.Escalation

    public void notifyEscalationListeners() {
        for (BrowserWindow browserWindow : escalationBrowsers) {
            String channel = browserWindow.getChannel();
            try {
                if (channel != null && !channel.isEmpty()) {
                    Escalation snapshot = this.escalations.get(channel);

                    if (snapshot != null) {
                        sendToWindow(browserWindow, snapshot);
                    } else {
                        browserWindow.nothingToSay();
View Full Code Here

Examples of org.lightfish.business.escalation.entity.Escalation

                            LOG.error("Cannot evaluate script: " + script, scriptException);
                        }
                        if (canBeConvertedToTrue(retVal)) {
                            String basicMessage = messageProcessor.processBasicMessage(script.getBasicMessage(), current);
                            String richMessage = messageProcessor.processRichMessage(script.getRichMessage(), current);
                            Escalation escalation = new Escalation.Builder()
                                    .channel(script.getName())
                                    .basicMessage(basicMessage)
                                    .richMessage(richMessage)
                                    .snapshot(current)
                                    .build();
View Full Code Here

Examples of org.lightfish.business.escalation.entity.Escalation

        BrowserWindow window = mock(BrowserWindow.class);

        Writer writer = mock(Writer.class);
        when(window.getWriter()).thenReturn(writer);

        Escalation escalation = new Escalation();
        escalation.setChannel(escalationChannel);
        when(window.getChannel()).thenReturn(escalationChannel);

        this.cut.onEscalationBrowserRequest(window);
        this.cut.addEscalation(escalation);
        verify(window, never()).send();
View Full Code Here

Examples of org.lightfish.business.escalation.entity.Escalation

    @Test
    public void broadcastChannelNofified() {
        final String escalationChannel = "duke";
        BrowserWindow window = mock(BrowserWindow.class);
        when(window.getChannel()).thenReturn("");
        Escalation escalation = new Escalation();
        escalation.setChannel(escalationChannel);
        this.cut.onEscalationBrowserRequest(window);
        this.cut.addEscalation(escalation);
        verify(window, never()).send();
        this.cut.notifyEscalationListeners();
        verify(window).send();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.