Examples of FlowActivity


Examples of org.amplafi.flow.FlowActivity

            return null;
        }
        // used to help determine if the flow is not altering which FlowActivity is current. ( refresh case )
        int originalIndex = getCurrentActivityIndex();
        int next = newActivity;
        FlowActivity currentActivity;
        // if true, currentActivity indicated that it has finished processing and the FlowState should immediately advanced. Used primarily for invisible FlowActivities.
        boolean lastFlowActivityActivateAutoFinished;
        FlowStepDirection flowStepDirection = FlowStepDirection.get(originalIndex, newActivity);
        // based on the flowStepDirection. if true, then there another FlowActivity in the same direction as the current flowActivity
        boolean canContinue;
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

     */
    @Override
    public void saveChanges() {
        LapTimer.sLap(this.getActiveFlowLabel()," beginning saveChanges()");
        for (int i = 0; i < this.size(); i++) {
            FlowActivity flowActivity = getActivity(i);
            FlowValidationResult flowActivityValidationResult  = flowActivity.getFlowValidationResult(FlowActivityPhase.saveChanges, FlowStepDirection.forward);
            FlowValidationException.valid(flowActivityValidationResult);
            flowActivity.saveChanges();
            // activity.refresh(); -- commented out because saves default values back to the flowState
            LapTimer.sLap(flowActivity.getFlowPropertyProviderFullName(), ".saveChanges() completed");
        }
        LapTimer.sLap(this.getActiveFlowLabel()," end saveChanges()");
    }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

        }
    }

    @Override
    public FlowValidationResult passivate(boolean verifyValues, FlowStepDirection flowStepDirection) {
        FlowActivity currentActivity = getCurrentActivity();
        if ( currentActivity != null ) {
            currentActivity.refresh();
            return currentActivity.passivate(verifyValues, flowStepDirection);
        }
        return null;
    }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

            return this.getAfterPage();
        }
        String pageName = getProperty(FSPAGE_NAME);
        if (isBlank(pageName)) {
            if (isActive()) {
                FlowActivity flowActivity = getCurrentActivity();
                pageName = flowActivity.getPageName();
            }
            if (isBlank(pageName)) {
                pageName = this.getFlow().getPageName();
            }
        }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

     * @see org.amplafi.flow.FlowState#isFinishable()
     */
    @Override
    public boolean isFinishable() {
        if ( !isCompleted()) {
            FlowActivity currentActivity = this.getCurrentActivity();
            // may not have been started
            if ((currentActivity != null && currentActivity.isFinishingActivity()) || !hasVisibleNext()) {
                // explicitly able to finish.
                // or last visible step, which must always be able to finish.
                return true;
            } else {
                // all remaining activities claim they have valid data.
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

    @Deprecated
    public Long getLong(String key) {
        return getRawLong(null, key);
    }
    public FlowValidationResult getCurrentActivityFlowValidationResult(FlowActivityPhase flowActivityPhase, FlowStepDirection flowStepDirection) {
        FlowActivity currentActivity = this.getCurrentActivity();
        if (currentActivity == null) {
            return null;
        } else {
            if (FlowActivityPhase.advance == flowActivityPhase && flowStepDirection == FlowStepDirection.forward) {
                // TODO temp hack
                return currentActivity.getFlowValidationResult();
            } else {
                return currentActivity.getFlowValidationResult(flowActivityPhase, flowStepDirection);
            }
        }
    }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

    @SuppressWarnings("unchecked")
    @Override
    public <T> T getProperty(String key, Class<? extends T> expected) {
        if (isActive()) {
            FlowActivity currentActivity = getCurrentActivity();
            return currentActivity.getProperty(key, expected);
        } else {
            FlowPropertyDefinition flowPropertyDefinition = getFlowPropertyDefinitionWithCreate(key, expected, null);
            return (T) getPropertyWithDefinition(this, flowPropertyDefinition);
        }
    }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

     */
    @SuppressWarnings("unchecked")
    @Override
    public <T> void setProperty(String key, T value) {
        if (isActive()) {
            FlowActivity currentActivity = getCurrentActivity();
            currentActivity.setProperty(key, value);
        } else {
            Class<T> expected = (Class<T>) (value == null?null:value.getClass());
            FlowPropertyDefinitionImplementor flowPropertyDefinition = getFlowPropertyDefinitionWithCreate(key, expected, value);
            setPropertyWithDefinition(null, flowPropertyDefinition, value);
        }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

            }
            int activity = flow.getCurrentActivityIndex();
            String blockName = FlowWebUtils.getBlockName(activity);
            IComponent comp = getComponentSafe(blockName);
            if(comp==null) {
                FlowActivity flowActivity = flow.getCurrentActivity();
                if(flowActivity == null){
                    String message = getStartErrorMessage(flow) + "' but current activity (#" + activity + ") is null. Flow state: " + flow.getFlowStateLifecycle() + "; Values: " + flow.getFlowValuesMap() ;
                    throw new IllegalStateException(message);
                } else {
                    String message = getStartErrorMessage(flow) + "' but there is no component named '" + blockName + "'. This should be the block containing the FlowActivity named '" + flowActivity.getFlowPropertyProviderName() + "' (activity #" + activity + ") ";
                    if ( flowActivity.isInvisible() ) {
                        throw new IllegalStateException(message+" -- this is an invisible activity");
                    } else {
                        throw new IllegalStateException(message+" -- flow activity claims it is supposed to be visible. Are you sure this flow is defined on this page?");
                    }
                }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

            return attachedFlowState.getVisibleActivities();
        }
    }

    public String getActivityTitle() {
        FlowActivity flowActivity = getCurrentActivity();
        String title = flowActivity.getActivityTitle();
        if (title==null) {
            title = getUnnamedActivity();
        }
        return processLabel(title, null);
    }
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.