本文整理汇总了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();
}
示例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();
}
}
}
示例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();
}
}
示例4: cleanUp
import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
@After
public void cleanUp() {
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
if (processEngine != null) {
processEngine.close();
}
}
示例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();
}
示例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;
}
});
}
示例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();
}
示例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);
}
}
示例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();
}
}
}
}
示例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();
}
}
}
}
示例11: getDefaultProcessEngine
import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
@Override
public ProcessEngine getDefaultProcessEngine() {
return ProcessEngines.getDefaultProcessEngine();
}
示例12: getDefaultProcessEngine
import org.camunda.bpm.engine.ProcessEngines; //导入方法依赖的package包/类
public ProcessEngine getDefaultProcessEngine() {
return ProcessEngines.getDefaultProcessEngine();
}