当前位置: 首页>>代码示例>>Java>>正文


Java ProcessEngines.getDefaultProcessEngine方法代码示例

本文整理汇总了Java中org.camunda.bpm.engine.ProcessEngines.getDefaultProcessEngine方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessEngines.getDefaultProcessEngine方法的具体用法?Java ProcessEngines.getDefaultProcessEngine怎么用?Java ProcessEngines.getDefaultProcessEngine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.camunda.bpm.engine.ProcessEngines的用法示例。


在下文中一共展示了ProcessEngines.getDefaultProcessEngine方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateUsers

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
public void updateUsers() {
    ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
    Set<User> currentUsers = this.orgStructure.getUsers();
    Set<User> firedUsers = this.orgStructure.getFiredUsers(currentUsers);
    Set<User> newUsers = this.orgStructure.getNewUsers(currentUsers);
    firedUsers.forEach(user -> deleteUser(user, processEngine));
    Map<String, String> userPass = this.orgStructure.getUserPass(newUsers);
    newUsers.forEach(user -> createUser(user, userPass, processEngine));
    this.orgStructure.update();
}
 
开发者ID:IntegrityVision,项目名称:Purchase-order-process-template,代码行数:11,代码来源:ResourcesAuthorization.java

示例2: placeInquiry

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
public void placeInquiry() {
	if (!EmailValidator.validate(email)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Invalid Email format"));
	} else {
		Map<String, Object> variables = new HashMap<String, Object>();
		variables.put("customerFirstname", firstname);
		variables.put("customerSurname", lastname);
		variables.put("customerCompanyName", companyName);
		variables.put("customerEmail", email);
		variables.put("customerPhoneNumber", phoneNumber);
		variables.put("customerDateOfBirth", dateOfBirth);
		variables.put("customerStreet", street);
		variables.put("customerHouseNumber", houseNumber);
		variables.put("customerPostcode", postcode);
		variables.put("customerCity", city);
		variables.put("customerCountry", country);
		variables.put("fleet", fleetRental);
		variables.put("pickUpDate", pickupDate);
		variables.put("returnDate", returnDate);
		variables.put("pickUpLoc", pickupLocation);
		variables.put("returnStore", returnLocation);
		variables.put("insuranceType", insuranceType);
		variables.put("car", car);
		variables.put("inquiryText", comment);
		variables.put("priceCars", priceCars);
		variables.put("priceInsurance_expected", priceInsurance_expected);
		ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
		RuntimeService runtimeService = processEngine.getRuntimeService();
		ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("contracting", variables);
		System.out.println(WebUrls.getUrl(WebUrls.ORDER_SUBMITTED, false, false));
		try {
			FacesContext.getCurrentInstance().getExternalContext()
					.redirect(WebUrls.getUrl(WebUrls.ORDER_SUBMITTED, false, false));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
 
开发者ID:derursm,项目名称:bvis,代码行数:39,代码来源:PlaceInquiryBackingBean.java

示例3: placeInquiry2

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
/**
 * Method for placing inquiries when already logged in
 */
public void placeInquiry2() {
	long cid = sessionBean.getUid();
	Customer customer = customerService.getCustomer(cid);
	Map<String, Object> variables = new HashMap<String, Object>();
	variables.put("customerID", customer.getCustomerID());
	variables.put("fleet", fleetRental);
	variables.put("pickUpDate", pickupDate);
	variables.put("returnDate", returnDate);
	variables.put("pickUpLoc", pickupLocation);
	variables.put("returnStore", returnLocation);
	variables.put("insuranceType", insuranceType);
	variables.put("car", car);
	variables.put("inquiryText", comment);
	variables.put("priceCars", priceCars);
	variables.put("priceInsurance_expected", priceInsurance_expected);
	ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
	RuntimeService runtimeService = processEngine.getRuntimeService();
	ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("contracting", variables);
	System.out.println(WebUrls.getUrl(WebUrls.ORDER_SUBMITTED, false, false));
	try {
		FacesContext.getCurrentInstance().getExternalContext()
				.redirect(WebUrls.getUrl(WebUrls.ORDER_SUBMITTED, false, false));
	} catch (IOException e) {
		e.printStackTrace();
	}
}
 
开发者ID:derursm,项目名称:bvis,代码行数:30,代码来源:PlaceInquiryBackingBean.java

示例4: cleanUp

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
@After
public void cleanUp() {
  ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
  if (processEngine != null) {
    processEngine.close();
  }
}
 
开发者ID:holisticon,项目名称:skill-based-routing,代码行数:8,代码来源:ShowcaseSetupTest.java

示例5: starts_process_engine

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
@Test
public void starts_process_engine() {
  manager.start();

  final ProcessEngine defaultProcessEngine = ProcessEngines.getDefaultProcessEngine();
  assertThat(defaultProcessEngine).isNotNull();
  assertThat(defaultProcessEngine.getName()).isEqualTo(ProcessEngines.NAME_DEFAULT);

  manager.stop();
}
 
开发者ID:camunda,项目名称:camunda-bpm-dropwizard,代码行数:11,代码来源:ProcessEngineManagerTest.java

示例6: main

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
public static void main(String[] args) {
  ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
  CommandExecutor commandExecutor = processEngine.getProcessEngineConfiguration().getCommandExecutorTxRequired();
  commandExecutor.execute(new Command<Object> (){
    public Object execute(CommandContext commandContext) {
      commandContext
        .getSession(PersistenceSession.class)
        .dbSchemaPrune();
      return null;
    }
  });
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:13,代码来源:DbSchemaPrune.java

示例7: main

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
public static void main(String[] args) {
  ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
  CommandExecutor commandExecutor = processEngine.getProcessEngineConfiguration().getCommandExecutorTxRequired();
  commandExecutor.execute(new Command<Object> (){
    public Object execute(CommandContext commandContext) {
      commandContext
        .getSession(PersistenceSession.class)
        .dbSchemaDrop();
      return null;
    }
  });
  processEngine.close();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:14,代码来源:DbSchemaDrop.java

示例8: getDefaultProcessEngine

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
@Override
public ProcessEngine getDefaultProcessEngine() {
  ProcessEngine defaultProcessEngine = BpmPlatform.getDefaultProcessEngine();
  if(defaultProcessEngine != null) {
    return defaultProcessEngine;
  } else {
    return ProcessEngines.getDefaultProcessEngine(false);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:10,代码来源:ContainerManagedProcessEngineProvider.java

示例9: reportDamage

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
public void reportDamage() {
	if (!orderService.orderExists(orderID)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Invalid order ID"));
	}
	else if (!orderService.vehicleExistsForOrder(orderID, vehicleID)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Specified car not part of the order"));
	}
	else if (!insuranceService.insuranceExists(party1Insurance)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Specified insurance does not exist"));			
	}
	else if (!EmailValidator.validate(party1EMail)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Invalid Email format"));
	}
	else {
		RentalOrder order = orderService.getOrder(orderID);
		Date begin = order.getPick_up_date();

		Date end = order.getReturn_date();
		// increment end date by one
		Calendar c = Calendar.getInstance();
		c.setTime(end);
		c.add(Calendar.DATE, 1);  // number of days to add
		end = c.getTime();
		if (!((this.damageDate.after(begin) || this.damageDate.equals(begin)) && 
				(this.damageDate.before(end) || this.damageDate.equals(end)))) {
			FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Damage date must be in the rental period"));
		}
		else {
			Map<String, Object> variables = new HashMap<String, Object>();
			variables.put("orderID", orderID);
			variables.put("damageDescription", damageDescription);
			variables.put("damageDate", damageDate);
			variables.put("vehicleID", vehicleID);
			// set to true per default, since this bean method is only invoked if the damage is reported by customer
			reportedByCustomer = true;
			variables.put("reportedByCustomer", reportedByCustomer);
			variables.put("towingServiceNeeded", towingServiceNeeded);
			variables.put("party1Firstname", party1Firstname);
			variables.put("party1Surname", party1Surname);
			variables.put("party1Street", party1Street);
			variables.put("party1HouseNo", party1HouseNo);
			variables.put("party1Country", party1Country);
			variables.put("party1ZIP", party1ZIP);
			variables.put("party1City", party1City);
			variables.put("party1Company", party1Company);
			variables.put("party1Insurance", party1Insurance);
			variables.put("party1Phone", party1Phone);
			variables.put("party1EMail", party1EMail);
			variables.put("party1Birthday", party1Birthday);
			ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
			RuntimeService runtimeService = processEngine.getRuntimeService();
			ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("claimHandling", variables);	
			try {
				FacesContext.getCurrentInstance().getExternalContext().redirect(WebUrls.getUrl(WebUrls.DAMAGE_REPORT_SUBMITTED, false, false));
			} catch (IOException e) {
				e.printStackTrace();
			}		
		}
	}
}
 
开发者ID:derursm,项目名称:bvis,代码行数:61,代码来源:DamageReportBackingBean.java

示例10: reportDamageCamunda

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
public void reportDamageCamunda() {
	if (!orderService.orderExists(orderID)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Invalid order ID"));
	}
	else if (!orderService.vehicleExistsForOrder(orderID, vehicleID)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Specified car not part of the order"));
	}
	else if (!insuranceService.insuranceExists(party1Insurance)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Specified insurance does not exist"));
	}
	else if (!EmailValidator.validate(party1EMail)) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Invalid Email format"));
	}
	else {
		RentalOrder order = orderService.getOrder(orderID);
		Date begin = order.getPick_up_date();
		Date end = order.getReturn_date();
		// increment end date by one
		Calendar c = Calendar.getInstance();
		c.setTime(end);
		c.add(Calendar.DATE, 1);  // number of days to add
		end = c.getTime();
		if (!((this.damageDate.after(begin) || this.damageDate.equals(begin)) && 
				(this.damageDate.before(end) || this.damageDate.equals(end)))) {
			FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Damage date must be in the rental period"));
		}
		else {
			Map<String, Object> variables = new HashMap<String, Object>();
			variables.put("orderID", orderID);
			variables.put("damageDescription", damageDescription);
			variables.put("damageDate", damageDate);
			variables.put("vehicleID", vehicleID);
			variables.put("reportedByCustomer", reportedByCustomer);
			variables.put("towingServiceNeeded", towingServiceNeeded);
			variables.put("party1Firstname", party1Firstname);
			variables.put("party1Surname", party1Surname);
			variables.put("party1Street", party1Street);
			variables.put("party1HouseNo", party1HouseNo);
			variables.put("party1Country", party1Country);
			variables.put("party1ZIP", party1ZIP);
			variables.put("party1City", party1City);
			variables.put("party1Company", party1Company);
			variables.put("party1Insurance", party1Insurance);
			variables.put("party1Phone", party1Phone);
			variables.put("party1EMail", party1EMail);
			variables.put("party1Birthday", party1Birthday);
			ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
			RuntimeService runtimeService = processEngine.getRuntimeService();
			ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("claimHandling", variables);

			try {
				FacesContext.getCurrentInstance().getExternalContext().redirect("/camunda/app/tasklist/default/#/");
			} catch (IOException e) {
				e.printStackTrace();
			}				
		}
	}
}
 
开发者ID:derursm,项目名称:bvis,代码行数:59,代码来源:DamageReportBackingBean.java

示例11: getDefaultProcessEngine

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
@Override
public ProcessEngine getDefaultProcessEngine() {
  return ProcessEngines.getDefaultProcessEngine();
}
 
开发者ID:camunda,项目名称:camunda-bpm-spring-boot-starter,代码行数:5,代码来源:SpringBootProcessEngineProvider.java

示例12: getDefaultProcessEngine

import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
public ProcessEngine getDefaultProcessEngine() {
    return ProcessEngines.getDefaultProcessEngine();
}
 
开发者ID:camunda,项目名称:camunda-bpm-dropwizard,代码行数:4,代码来源:RestProcessEngineProvider.java


注:本文中的org.camunda.bpm.engine.ProcessEngines.getDefaultProcessEngine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。