public void sendGCM(String registration_id, String message, int badge) throws IOException {

    Object[] workflowInput = new Object[] {registration_id, message, badge};
    DataConverter converter = new JsonDataConverter();
    StartWorkflowExecutionRequest startWorkflowExecutionRequest =
        new StartWorkflowExecutionRequest();
    startWorkflowExecutionRequest.setInput(converter.toData(workflowInput));
    startWorkflowExecutionRequest.setDomain("MobMonkey");
    TaskList tasks = new TaskList();
    tasks.setName("Gcm");
    startWorkflowExecutionRequest.setTaskList(tasks);
    WorkflowType workflowType = new WorkflowType();
    workflowType.setName("GcmWorkflow.sendNotification");
    workflowType.setVersion("1.12");
    startWorkflowExecutionRequest.setWorkflowType(workflowType);
    startWorkflowExecutionRequest.setWorkflowId(UUID.randomUUID().toString());
    this.swfClient().startWorkflowExecution(startWorkflowExecutionRequest);
  }
 public void sendAPNS(String eMailAddress, String[] deviceIds, String message, int badge)
     throws IOException {
   Object[] workflowInput = new Object[] {eMailAddress, deviceIds, message, badge};
   DataConverter converter = new JsonDataConverter();
   StartWorkflowExecutionRequest startWorkflowExecutionRequest =
       new StartWorkflowExecutionRequest();
   startWorkflowExecutionRequest.setInput(converter.toData(workflowInput));
   startWorkflowExecutionRequest.setDomain("MobMonkey");
   TaskList tasks = new TaskList();
   tasks.setName("Apns");
   startWorkflowExecutionRequest.setTaskList(tasks);
   WorkflowType workflowType = new WorkflowType();
   workflowType.setName("ApnsWorkflow.sendNotification");
   workflowType.setVersion("1.10");
   startWorkflowExecutionRequest.setWorkflowType(workflowType);
   startWorkflowExecutionRequest.setWorkflowId(UUID.randomUUID().toString());
   this.swfClient().startWorkflowExecution(startWorkflowExecutionRequest);
 }