AnsweredAssumed Answered

activiti rest

Question asked by jaikrishna on Sep 2, 2015
Latest reply on Oct 3, 2015 by vasile.dirla
I am able to run my JUnit test ..
This is my Junit test ..

package org.activiti.designer.test;
import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;

import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.impl.util.json.JSONArray;
import org.activiti.engine.impl.util.json.JSONException;
import org.activiti.engine.impl.util.json.JSONObject;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.test.ActivitiRule;
import org.activiti.engine.test.Deployment;
import org.junit.Rule;
import org.junit.Test;

public class ProcessTestMyProcess {
     private String filename = ".\\src\\main\\resources\\diagrams\\SimpleLeaveProcess.bpmn";
   public ActivitiRule activitiRule = new ActivitiRule("activiti.cfg.xml");
   public void startProcess() throws Exception {
      RepositoryService repositoryService = activitiRule.getRepositoryService();
      RuntimeService runtimeService = activitiRule.getRuntimeService();
      FileInputStream  fis = new FileInputStream(filename);
      Map<String,Object> variableMap = new HashMap<String,Object>();
      variableMap.put("Empname", "J");
      ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess", variableMap);
      System.out.println("id " + processInstance.getId() + " "
            + processInstance.getProcessDefinitionId());

But When I login to localhost:8080/activiti-explorer ,and check the table act_re_deployment , i do not see any entries ..
Is it actually getting deployed ??
I used h2 jar in eclipse project ..

entries in act_Re_Deployments is not matching with the entries I am getting when i run the url :

http:localhost:8080/activiti-rest/service/repository/deployments ,

in act_Re_deployments , there are two entries : demo processes with id 23 and demo reports with id 41 .

But when i run the rest service url in rest client ,
i am getting :
data: [1]
0:  {
id: "20"
name: "Demo processes"
deploymentTime: "2015-09-02T18:05:43.967+05:30"
category: null
url: "http://localhost:8080/activiti-rest/service/repository/deployments/20"
tenantId: ""
total: 1
start: 0
sort: "id"
order: "asc"
size: 1
From where is this data coming ? And why I am not getting data which is there in act_Re_deployments