Package org.activiti.engine

Examples of org.activiti.engine.ProcessEngineInfo


  @Get
  public ProcessEngineInfoResponse getEngineInfo() {
    if(authenticate() == false) return null;
   
    ProcessEngineInfo engineInfo = ActivitiUtil.getProcessEngineInfo();
    ProcessEngineInfoResponse response = new ProcessEngineInfoResponse();
    response.setName(engineInfo.getName());
    response.setResourceUrl(engineInfo.getResourceUrl());
    response.setException(engineInfo.getException());
    response.setVersion(ProcessEngine.VERSION);
    return response;
  }
View Full Code Here


  @RequestMapping(value="/management/engine", method = RequestMethod.GET, produces = "application/json")
  public ProcessEngineInfoResponse getEngineInfo() {
    ProcessEngineInfoResponse response = new ProcessEngineInfoResponse();
   
    try {
      ProcessEngineInfo engineInfo = ProcessEngines.getProcessEngineInfo(engine.getName());
      if (engineInfo != null) {
        response.setName(engineInfo.getName());
        response.setResourceUrl(engineInfo.getResourceUrl());
        response.setException(engineInfo.getException());
      } else {
        // Revert to using process-engine directly
        response.setName(engine.getName());
      }
    } catch (Exception e) {
View Full Code Here

      }
      return new LoginResponse().setSuccess(true);
   
    } else {
      String message;
      ProcessEngineInfo pei = ActivitiUtil.getProcessEngineInfo();
      if (pei != null) {
        message = pei.getException();
      }
      else {
        message = "Can't find process engine which is needed to authenticate username and password.";
        List<ProcessEngineInfo> processEngineInfos = ProcessEngines.getProcessEngineInfos();
        if (processEngineInfos.size() > 0) {
View Full Code Here

  public void testProcessEngineInfo() {

    List<ProcessEngineInfo> processEngineInfos = ProcessEngines.getProcessEngineInfos();
    assertEquals(1, processEngineInfos.size());

    ProcessEngineInfo processEngineInfo = processEngineInfos.get(0);
    assertNull(processEngineInfo.getException());
    assertNotNull(processEngineInfo.getName());
    assertNotNull(processEngineInfo.getResourceUrl());

    ProcessEngine processEngine = ProcessEngines.getProcessEngine(ProcessEngines.NAME_DEFAULT);
    assertNotNull(processEngine);
  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.ProcessEngineInfo

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.