Package org.amplafi.flow

Examples of org.amplafi.flow.FlowActivityImplementor


        Map<String, FlowTransition> transitions = flowState.getProperty(key, Map.class);
        String finishKey = flowState.getFinishKey();
        if ( isNotEmpty(transitions) && isNotBlank(finishKey)) {
            FlowTransition flowTransition = transitions.get(finishKey);
            if ( flowTransition != null ) {
                FlowActivityImplementor currentActivity = flowState.getCurrentActivity();
                String flowType = currentActivity.resolveIndirectReference(flowTransition.getNextFlowType());
                if (isNotBlank(flowType)) {
                    nextFlowState = this.createFlowState(flowType, flowState.getExportedValuesMap(), false);
                    FlowUtils.INSTANCE.copyMapToFlowState(nextFlowState, flowTransition.getInitialValues());
                }
            }
View Full Code Here


        FlowImpl inst = new FlowImpl(this);
        inst.activities = new ArrayList<FlowActivityImplementor>();

        if ( CollectionUtils.isNotEmpty(this.activities)) {
            for(FlowActivityImplementor activity: this.activities) {
                FlowActivityImplementor fa = activity.createInstance();
                if ( isActivatable() ) {
                    fa.setActivatable(true);
                }
                inst.addActivity(fa);
            }
            // need to always be able to start!
            inst.activities.get(0).setActivatable(true);
View Full Code Here

            exportProperties(exportValueMap, flowPropertyDefinitions, null, clearFrom);
        }

        int size = this.size();
        for (int i = 0; i < size; i++) {
            FlowActivityImplementor activity = getActivity(i);
            exportProperties(exportValueMap, activity.getPropertyDefinitions().values(), activity, clearFrom);
        }
        // TODO should we clear all non-global namespace values? We have slight leak through when undefined properties are set on a flow.
        return exportValueMap;
    }
View Full Code Here

                                            + "\nOriginal Flow FlowActivities : " + originalFAs
                                            + "\nNext Flow FlowActivities : " + nextFAs);
        }

        // complete the current FA in the current Flow
        FlowActivityImplementor currentFAInOriginalFlow = getCurrentFlowActivityImplementor();
        // So the current FlowActivity does not try to do validation.
        passivate(false, FlowStepDirection.inPlace);

        // morph and initialize to next flow
        setFlowTypeName(morphingToFlowTypeName);
        INSTANCE.copyMapToFlowState(this, initialFlowState);
        this.setCurrentActivityIndex(0);
        // new flow will have different flow activities (and properties ) that needs to be
        initializeFlow();
        begin();

        FlowActivityImplementor targetFAInNextFlow = getTargetFAInNextFlow(currentFAInOriginalFlow,
                                                                originalFAs, nextFAs);

        // No common FAs, No need to run nextFlow at all, just return
        if (targetFAInNextFlow != null) {
View Full Code Here

            }
            if ( flowPropertyProvider instanceof FlowPropertyValueChangeListener) {
                newValue = ((FlowPropertyValueChangeListener)flowPropertyProvider).propertyChange(flowPropertyProvider, namespace, flowPropertyDefinition, newValue, oldValue);
            }

            FlowActivityImplementor activity = getActivity(namespace);
            if ( activity == flowPropertyProvider || !(activity instanceof FlowPropertyValueChangeListener)) {
                activity = getCurrentFlowActivityImplementor();
            }
            if ( activity instanceof FlowPropertyValueChangeListener && activity != flowPropertyProvider) {
                newValue = ((FlowPropertyValueChangeListener)activity).propertyChange(flowPropertyProvider, namespace, flowPropertyDefinition, newValue, oldValue);
View Full Code Here

TOP

Related Classes of org.amplafi.flow.FlowActivityImplementor

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.