fluid-api/src/main/java/com/fluidbpm/program/api/vo/flow/FlowItemExecuteResult.java
@Override
    public JSONObject toJsonObject() throws JSONException
    {
        JSONObject returnVal = super.toJsonObject();

        //Fluid Item...
        if(this.getFluidItem() != null)
        {
            returnVal.put(JSONMapping.FLUID_ITEM,
                    this.getFluidItem().toJsonObject());
        }

        //Flow Step Rule...
        if(this.getFlowStepRule() != null)
        {
            returnVal.put(JSONMapping.FLOW_STEP_RULE,
                    this.getFlowStepRule().toJsonObject());
        }

        //Assignment Rule...
        if(this.getAssignmentRuleValue() != null)
        {
            returnVal.put(JSONMapping.ASSIGNMENT_RULE_VALUE,
                    this.getAssignmentRuleValue());
        }

        //Statement Result as String...
        if(this.getStatementResultAsString() != null)
        {
            returnVal.put(JSONMapping.STATEMENT_RESULT_AS_STRING,
                    this.getStatementResultAsString());
        }

        //Execute per Fluid Item Query...
        if(this.getExecutePerFluidItemQuery() != null)
        {
            returnVal.put(JSONMapping.EXECUTE_PER_FLUID_ITEM_QUERY,
                    this.getExecutePerFluidItemQuery());
        }

        //Fluid Item Query...
        if(this.getFluidItemQuery() != null)
        {
            returnVal.put(JSONMapping.FLUID_ITEM_QUERY,
                    this.getFluidItemQuery());
        }

        //Execution Result...
        if(this.getExecutionResult() != null)
        {
            returnVal.put(JSONMapping.EXECUTION_RESULT,
                    this.getExecutionResult());
        }

        //Progress to next phase...
        if(this.getProgressToNextPhase() != null)
        {
            returnVal.put(JSONMapping.PROGRESS_TO_NEXT_PHASE,
                    this.getProgressToNextPhase());
        }
        
        //Fluid Items...
        if(this.getFluidItems() != null && !this.getFluidItems().isEmpty())
        {
            JSONArray jsonArray = new JSONArray();

            for(FluidItem item : this.getFluidItems())
            {
                jsonArray.put(item.toJsonObject());
            }

            returnVal.put(JSONMapping.FLUID_ITEMS, jsonArray);
        }

        //Execute Users...
        if(this.getExecuteUsers() != null && !this.getExecuteUsers().isEmpty())
        {
            JSONArray jsonArray = new JSONArray();

            for(User item : this.getExecuteUsers())
            {
                jsonArray.put(item.toJsonObject());
            }

            returnVal.put(JSONMapping.EXECUTE_USERS, jsonArray);
        }

        //Mail Messages To Send...
        if(this.getMailMessagesToSend() != null &&
                !this.getMailMessagesToSend().isEmpty())
        {
            JSONArray jsonArray = new JSONArray();

            for(MailMessage item : this.getMailMessagesToSend())
            {
                jsonArray.put(item.toJsonObject());
            }

            returnVal.put(JSONMapping.MAIL_MESSAGES_TO_SEND, jsonArray);
        }

        return returnVal;
    }
@Override
    public JSONObject toJsonObject() throws JSONException
    {
        JSONObject returnVal = super.toJsonObject();

        //Fluid Item...
        if(this.getFluidItem() != null)
        {
            returnVal.put(JSONMapping.FLUID_ITEM,
                    this.getFluidItem().toJsonObject());
        }

        //Flow Step Rule...
        if(this.getFlowStepRule() != null)
        {
            returnVal.put(JSONMapping.FLOW_STEP_RULE,
                    this.getFlowStepRule().toJsonObject());
        }

        //Assignment Rule...
        if(this.getAssignmentRuleValue() != null)
        {
            returnVal.put(JSONMapping.ASSIGNMENT_RULE_VALUE,
                    this.getAssignmentRuleValue());
        }

        //Statement Result as String...
        if(this.getStatementResultAsString() != null)
        {
            returnVal.put(JSONMapping.STATEMENT_RESULT_AS_STRING,
                    this.getStatementResultAsString());
        }

        //Execute per Fluid Item Query...
        if(this.getExecutePerFluidItemQuery() != null)
        {
            returnVal.put(JSONMapping.EXECUTE_PER_FLUID_ITEM_QUERY,
                    this.getExecutePerFluidItemQuery());
        }

        //Fluid Item Query...
        if(this.getFluidItemQuery() != null)
        {
            returnVal.put(JSONMapping.FLUID_ITEM_QUERY,
                    this.getFluidItemQuery());
        }

        //Execution Result...
        if(this.getExecutionResult() != null)
        {
            returnVal.put(JSONMapping.EXECUTION_RESULT,
                    this.getExecutionResult());
        }

        //Progress to next phase...
        if(this.getProgressToNextPhase() != null)
        {
            returnVal.put(JSONMapping.PROGRESS_TO_NEXT_PHASE,
                    this.getProgressToNextPhase());
        }
        
        //Fluid Items...
        if(this.getFluidItems() != null && !this.getFluidItems().isEmpty())
        {
            JSONArray jsonArray = new JSONArray();

            for(FluidItem item : this.getFluidItems())
            {
                jsonArray.put(item.toJsonObject());
            }

            returnVal.put(JSONMapping.FLUID_ITEMS, jsonArray);
        }

        //Execute Users...
        if(this.getExecuteUsers() != null && !this.getExecuteUsers().isEmpty())
        {
            JSONArray jsonArray = new JSONArray();

            for(User item : this.getExecuteUsers())
            {
                jsonArray.put(item.toJsonObject());
            }

            returnVal.put(JSONMapping.EXECUTE_USERS, jsonArray);
        }

        //Mail Messages To Send...
        if(this.getMailMessagesToSend() != null &&
                !this.getMailMessagesToSend().isEmpty())
        {
            JSONArray jsonArray = new JSONArray();

            for(MailMessage item : this.getMailMessagesToSend())
            {
                jsonArray.put(item.toJsonObject());
            }

            returnVal.put(JSONMapping.MAIL_MESSAGES_TO_SEND, jsonArray);
        }

        return returnVal;
    }
Conversion to {@code JSONObject} from Java Object.

@return {@code JSONObject} representation of {@code FlowItemExecuteResult}
@throws JSONException If there is a problem with the JSON Body.

@see ABaseFluidJSONObject#toJsonObject()