package org.museautomation.core.task.state;

import org.museautomation.core.*;

/**
 * @author Christopher L Merrill (see LICENSE.txt for license details)
 */
public class StateTransitionResult
    {
    public StateTransitionResult(String failure_message)
        {
        _success = false;
        _failure_message = failure_message;
        }

    public StateTransitionResult(TaskResult task_result, InterTaskState output_state)
        {
        _success = true;
        _task_result = task_result;
        _output_state = output_state;
        }

    public InterTaskState outputState()
        {
        return _output_state;
        }

    public TaskResult taskResult()
        {
        return _task_result;
        }

    public boolean transitionSuccess()
        {
        return _success;
        }

    public String getFailureMessage()
        {
        return _failure_message;
        }

    private boolean _success;
    private String _failure_message;
    private TaskResult _task_result = null;
    private InterTaskState _output_state = null;
    }
@@ -333,32 +333,432 @@
 age;%0A        %7D%0A%0A
+    public StateTransitionResult(TaskResult task_result)%0A        %7B%0A        _success = task_result.isPass();%0A        if (!task_result.isPass())%0A            %7B%0A            if (task_result.getFailures().size() %3E 0)%0A                _failure_message = task_result.getFailures().get(0).getDescription();%0A            else%0A                _failure_message = task_result.getSummary();%0A            %7D%0A        %7D%0A%0A
     public State
@@ -1312,16 +1312,22 @@
 private 
+final 
 boolean 

add another constructor for StateTransitionResult