Examples of finishFlow()


Examples of org.amplafi.flow.FlowActivity.finishFlow()

        FlowValidationException.valid(flowValidationResult);
        FlowState currentNextFlowState = getFlowManagement().transitionToFlowState(this, FSFLOW_TRANSITIONS);
        int size = this.size();
        for (int i = 0; i < size; i++) {
            FlowActivity activity = getActivity(i);
            FlowState returned = activity.finishFlow(currentNextFlowState);
            // activity.refresh(); -- commented out because saves default values back to the flowState
            // avoids lose track of FlowState if another FA later in the Flow
            // definition returns a null. ( this means that a FA cannot override a previous decision ).
            if (returned != null && currentNextFlowState != returned) {
                currentNextFlowState = returned;
View Full Code Here

Examples of org.amplafi.flow.FlowState.finishFlow()

        invokeIfNotNull(cycle, getFinishListener(), getEndListener());

        FlowState currentFlowState = getAttachedFlowState();
        try {
            String page = currentFlowState.finishFlow();
            // because the new active flow can be very different
            FlowState newCurrentFlow = getFlowManagement().getCurrentFlowState();
            if ( newCurrentFlow != null ) {
                page = newCurrentFlow.getCurrentPage();
            } else {
View Full Code Here

Examples of org.amplafi.flow.FlowState.finishFlow()

                }
                String changed = "chg_"+name;
                flowState.setProperty(name, changed);
            }
        }
        flowState.finishFlow();
        FlowValuesMap<FlowValueMapKey, CharSequence> finalMap = flowState.getExportedValuesMap();
        // now make sure that only the properties allowed to be set externally are set.
        for (PropertyScope propertyScope: PropertyScope.values()) {
            for(PropertyUsage propertyUsage: PropertyUsage.values()) {
                String name= propertyScope+"_"+propertyUsage;
View Full Code Here

Examples of org.amplafi.flow.FlowState.finishFlow()

        flowActivity.addPropertyDefinitions(flowPropertyDefinition);
        String flowTypeName = flowTestingUtils.addFlowDefinition(flowActivity);
        FlowState flowState = flowTestingUtils.getFlowManagement().startFlowState(flowTypeName, false, null, null);
        flowState.setProperty("not-a-property", true);
        flowState.setProperty("testProp", true);
        flowState.finishFlow();
        FlowValuesMap exportedMap = flowState.getExportedValuesMap();
        assertEquals(exportedMap.get("testProp"), "true");
        assertFalse(exportedMap.containsKey("not-a-property"));
        assertEquals(exportedMap.size(), 1);
    }
View Full Code Here

Examples of org.amplafi.flow.FlowState.finishFlow()

        try {
            // should this be a force situation and ignore any errors? seems unlikely as Amplafi would want user to be able to save any half-finished changes.
            if (finishFlowId != null ) {
                flowState = getFlowManagement().getFlowState(finishFlowId);
                if ( flowState != null && !flowState.isCompleted()) {
                    pageName = flowState.finishFlow();
                }
            }
            if ( flowLauncher != null) {
                flowLauncher.setFlowManagement(getFlowManagement());
                if (flowLauncher instanceof StartFromDefinitionFlowLauncher) {
View Full Code Here

Examples of org.amplafi.flow.impl.FlowStateImpl.finishFlow()

    private FlowStateImpl newFlowState() {
        FlowTestingUtils flowTestingUtils = new FlowTestingUtils();
        String flowTypeName = flowTestingUtils.addFlowDefinition(new FlowActivityImpl());
        FlowManagement flowManagement = flowTestingUtils.getFlowManagement();
        FlowStateImpl flowState = flowManagement.startFlowState(flowTypeName, true, null, null);
        flowState.finishFlow();
        return flowState;
    }
    private JSONWriter getJsonWriter() {
        MapJsonRenderer mapJsonRenderer = new MapJsonRenderer();
        JSONWriter jsonWriter = new JSONStringer();
View Full Code Here

Examples of org.amplafi.flow.impl.FlowStateImplementor.finishFlow()

        flowState.next();
        assertEquals(flowState.getCurrentActivity().getFlowPropertyProviderName(), "FA-2");
        flowState.setPropertyWithDefinition(fa1,morphFlowFPD,false);
        flowState.next();
        assertEquals(flowState.getCurrentActivity().getFlowPropertyProviderName(), "FA-3");
        flowState.finishFlow();
        assertNull(flowManagement.getCurrentFlowState(), "there shouldn't be a flow running");
    }

    /**
     * Test no common FAs
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.