Package org.activiti.engine.impl.util.json

Examples of org.activiti.engine.impl.util.json.JSONObject


  public String getType() {
    return TYPE;
  }
 
  public void execute(JobEntity job, String configuration, ExecutionEntity execution, CommandContext commandContext) {
    JSONObject cfgJson = new JSONObject(configuration);
    String processDefinitionId = job.getProcessDefinitionId();
    boolean activateProcessInstances = getIncludeProcessInstances(cfgJson);
   
    ActivateProcessDefinitionCmd activateProcessDefinitionCmd =
            new ActivateProcessDefinitionCmd(processDefinitionId, null, activateProcessInstances, null, job.getTenantId());
View Full Code Here


  public String getType() {
    return TYPE;
  }
 
  public void execute(JobEntity job, String configuration, ExecutionEntity execution, CommandContext commandContext) {
    JSONObject cfgJson = new JSONObject(configuration);
    String processDefinitionId = job.getProcessDefinitionId();
    boolean suspendProcessInstances = getIncludeProcessInstances(cfgJson);
   
    SuspendProcessDefinitionCmd suspendProcessDefinitionCmd =
            new SuspendProcessDefinitionCmd(processDefinitionId, null, suspendProcessInstances, null, job.getTenantId());
View Full Code Here

    gridLayout.setSpacing(true);
    addComponent(gridLayout);
   
    InputStream contentStream = taskService.getAttachmentContent(attachment.getId());
    // TODO: Error handling
    JSONObject emailJson = new JSONObject(new JSONTokener(new InputStreamReader(contentStream)));

    String html = emailJson.getString(Constants.EMAIL_HTML_CONTENT);
    String subject = emailJson.getString(Constants.EMAIL_SUBJECT);
    String recipients = emailJson.getString(Constants.EMAIL_RECIPIENT);
    String sentDate = emailJson.getString(Constants.EMAIL_SENT_DATE);
    String receivedDate = emailJson.getString(Constants.EMAIL_RECEIVED_DATE);
   
    // Add subject
    addSimpleRow(Messages.EMAIL_SUBJECT, subject);
    addSimpleRow(Messages.EMAIL_RECIPIENTS, recipients);
    addSimpleRow(Messages.EMAIL_SENT_DATE, sentDate);
View Full Code Here

    gridLayout.setSpacing(true);
    addComponent(gridLayout);
   
    InputStream contentStream = taskService.getAttachmentContent(attachment.getId());
    // TODO: Error handling
    JSONObject emailJson = new JSONObject(new JSONTokener(new InputStreamReader(contentStream)));

    String html = emailJson.getString(Constants.EMAIL_HTML_CONTENT);
    String subject = emailJson.getString(Constants.EMAIL_SUBJECT);
    String recipients = emailJson.getString(Constants.EMAIL_RECIPIENT);
    String sentDate = emailJson.getString(Constants.EMAIL_SENT_DATE);
    String receivedDate = emailJson.getString(Constants.EMAIL_RECEIVED_DATE);
   
    // Add subject
    addSimpleRow(Messages.EMAIL_SUBJECT, subject);
    addSimpleRow(Messages.EMAIL_RECIPIENTS, recipients);
    addSimpleRow(Messages.EMAIL_SENT_DATE, sentDate);
View Full Code Here

    throw new ActivitiException("not yet implemented");
  }

  public JSONObject toJsonObject(Task task) {
    TaskEntity taskEntity = (TaskEntity) task;
    JSONObject jsonObject = new JSONObject();
    jsonObject.put("id", taskEntity.getId());
    jsonObject.put("dbversion", taskEntity.getRevision());
    jsonObject.put("assignee", taskEntity.getAssignee());
    jsonObject.put("name", taskEntity.getName());
    jsonObject.put("priority", taskEntity.getPriority());     
    jsonObject.put("createTime", taskEntity.getCreateTime());
    if (taskEntity.getExecutionId()!=null) {
      jsonObject.put("activityInstance", taskEntity.getExecutionId());
    }
    if (taskEntity.getProcessDefinitionId()!=null) {
      jsonObject.put("processDefinition", taskEntity.getProcessDefinitionId());
    }
    return jsonObject;
  }
View Full Code Here

*/
public class JsonProcessEngineInfoConverter extends JsonObjectConverter<ProcessEngineInfo> {

  public JSONObject toJsonObject(ProcessEngineInfo processEngineInfo) {
    ProcessEngineInfoImpl processEngineInfoImpl = (ProcessEngineInfoImpl) processEngineInfo;
    JSONObject jsonObject = new JSONObject();
    jsonObject.put("name", processEngineInfoImpl.getName());
    jsonObject.put("resourceUrl", processEngineInfoImpl.getResourceUrl());
    jsonObject.put("exception", processEngineInfoImpl.getException());
    return jsonObject;
  }
View Full Code Here

public abstract class TimerChangeProcessDefinitionSuspensionStateJobHandler implements JobHandler {
 
  private static final String JOB_HANDLER_CFG_INCLUDE_PROCESS_INSTANCES = "includeProcessInstances";
 
  public static String createJobHandlerConfiguration(boolean includeProcessInstances) {
    JSONObject json = new JSONObject();
    json.put(JOB_HANDLER_CFG_INCLUDE_PROCESS_INSTANCES, includeProcessInstances);
    return json.toString();
  }
View Full Code Here

*/
public class JsonProcessDefinitionConverter extends JsonObjectConverter<ProcessDefinition> {

  public JSONObject toJsonObject(ProcessDefinition processDefinition) {
    ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) processDefinition;
    JSONObject jsonObject = new JSONObject();
    jsonObject.put("id", processDefinitionEntity.getId());
    if (processDefinitionEntity.getKey()!=null) {
      jsonObject.put("key", processDefinitionEntity.getKey());
    }
    if (processDefinitionEntity.getDeploymentId()!=null) {
      jsonObject.put("deploymentId", processDefinitionEntity.getDeploymentId());
    }
    return jsonObject;
  }
View Full Code Here

  public String getType() {
    return TYPE;
  }
 
  public void execute(JobEntity job, String configuration, ExecutionEntity execution, CommandContext commandContext) {
    JSONObject cfgJson = new JSONObject(configuration);
    String processDefinitionId = job.getProcessDefinitionId();
    boolean activateProcessInstances = getIncludeProcessInstances(cfgJson);
   
    ActivateProcessDefinitionCmd activateProcessDefinitionCmd =
            new ActivateProcessDefinitionCmd(processDefinitionId, null, activateProcessInstances, null);
View Full Code Here

  public String getType() {
    return TYPE;
  }
 
  public void execute(JobEntity job, String configuration, ExecutionEntity execution, CommandContext commandContext) {
    JSONObject cfgJson = new JSONObject(configuration);
    String processDefinitionId = job.getProcessDefinitionId();
    boolean suspendProcessInstances = getIncludeProcessInstances(cfgJson);
   
    SuspendProcessDefinitionCmd suspendProcessDefinitionCmd =
            new SuspendProcessDefinitionCmd(processDefinitionId, null, suspendProcessInstances, null);
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.util.json.JSONObject

Copyright © 2018 www.massapicom. 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.