@Override
  public DecisionType extractDecision(Map<String, Object> variables) {
    DecisionType decision = new DecisionType();

    decision.setResultAsString(
        (String) variables.get(CommonProcessVariableNames.FORM_FIELD_DECISION));
    decision.setApproved(ApprovalUtils.approvalBooleanValue(decision.getResultAsString()));
    decision.setComment((String) variables.get(CommonProcessVariableNames.FORM_FIELD_COMMENT));

    // TODO - what with other fields (approver, dateTime)?

    return decision;
  }
 @Override
 public List<ObjectReferenceType> prepareApprovedBy(ProcessEvent event) {
   List<ObjectReferenceType> retval = new ArrayList<ObjectReferenceType>();
   if (!ApprovalUtils.isApproved(getAnswer(event.getVariables()))) {
     return retval;
   }
   List<Decision> allDecisions = event.getVariable(ProcessVariableNames.ALL_DECISIONS, List.class);
   for (Decision decision : allDecisions) {
     if (decision.isApproved()) {
       retval.add(
           MiscSchemaUtil.createObjectReference(
               decision.getApproverOid(), SchemaConstants.C_USER_TYPE));
     }
   }
   return retval;
 }