public Object getParameter(String name) { return delegate.getParameter(name); }
String command = (String) workItem.getParameter("command"); String callbacks = (String) workItem.getParameter("callbacks"); this.execKey = workItem.getName() + "_" + workItem.getProcessInstanceId() + "_" + workItemId + "@sessionId="+this.sessionId; CommandContext ctx = new CommandContext(); Long requestId = this.executor.scheduleRequest(command, ctx); workItem.getParameters().put("requestId", requestId); String sWaitTillComplete = (String) workItem.getParameter("waitTillComplete"); Boolean waitTillComplete = sWaitTillComplete == null ? null : Boolean.valueOf(sWaitTillComplete); if (waitTillComplete == null || !waitTillComplete.booleanValue()) {
public void executeWorkItem(WorkItem wi, WorkItemManager wim) { Patient patient = (Patient) wi.getParameter("invoice_patient"); BigDecimal finalAmount = (BigDecimal) wi.getParameter("invoice_finalAmount"); List<ConceptCode> concepts = (List<ConceptCode>) wi.getParameter("invoice_concepts"); boolean patientNotified = false; InsuranceService client = getClient(); patientNotified = client.notifyAndChargePatient(patient, finalAmount, concepts); System.out.println(" >>> Patient Notified = " + patientNotified); Map<String, Object> result = new HashMap<String, Object>(); result.put("invoice_patientNotified", patientNotified); wim.completeWorkItem(wi.getId(), result); }
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { connect(); Task task = new Task(); String locale = (String) workItem.getParameter("Locale"); if (locale == null) { locale = "en-UK"; String taskName = (String) workItem.getParameter("TaskName"); if (taskName != null) { List<I18NText> names = new ArrayList<I18NText>(); String comment = (String) workItem.getParameter("Comment"); if (comment == null) { comment = ""; String priorityString = (String) workItem.getParameter("Priority"); int priority = 0; if (priorityString != null) { taskData.setSkipable(!"false".equals(workItem.getParameter("Skippable"))); Long parentId = (Long) workItem.getParameter("ParentId"); if (parentId != null) { taskData.setParentId(parentId); String subTaskStrategiesCommaSeparated = (String) workItem.getParameter("SubTaskStrategies"); if (subTaskStrategiesCommaSeparated != null && !subTaskStrategiesCommaSeparated.equals("")) { String[] subTaskStrategies = subTaskStrategiesCommaSeparated.split(","); String actorId = (String) workItem.getParameter("ActorId");
public void abortWorkItem(WorkItem workItem, WorkItemManager manager) { Long requestId = (Long) workItem.getParameter("requestId"); executor.cancelRequest(requestId); String sWaitTillComplete = (String) workItem.getParameter("waitTillComplete"); Boolean waitTillComplete = sWaitTillComplete == null ? null : Boolean.valueOf(sWaitTillComplete); if (waitTillComplete == null || !waitTillComplete.booleanValue()) { manager.abortWorkItem(workItem.getId()); } }
String locale = (String) workItem.getParameter("Locale"); if (locale == null) { locale = "en-UK"; String taskName = (String) workItem.getParameter("TaskName"); if (taskName != null) { List<I18NText> names = new ArrayList<I18NText>(); String comment = (String) workItem.getParameter("Comment"); if (comment == null) { comment = ""; String priorityString = (String) workItem.getParameter("Priority"); int priority = 0; if (priorityString != null) { taskData.setSkipable(!"false".equals(workItem.getParameter("Skippable"))); Long parentId = (Long) workItem.getParameter("ParentId"); if (parentId != null) { taskData.setParentId(parentId); String subTaskStrategiesCommaSeparated = (String) workItem.getParameter("SubTaskStrategies"); if (subTaskStrategiesCommaSeparated != null && !subTaskStrategiesCommaSeparated.equals("")) { String[] subTaskStrategies = subTaskStrategiesCommaSeparated.split(","); String actorId = (String) workItem.getParameter("ActorId"); if (actorId != null && actorId.trim().length() > 0) { String[] actorIds = actorId.split(",");
public void executeWorkItem(WorkItem wi, WorkItemManager wim) { String patientId = (String) wi.getParameter("company_patientName"); BigDecimal finalAmount = BigDecimal.ZERO; InsuranceService client = getClient(); //Fixed rate for insured patients finalAmount = client.notifyInsuranceCompany("Company 1", patientId, new BigDecimal(100)); Map<String, Object> result = new HashMap<String, Object>(); result.put("company_finalAmount", finalAmount); List<ConceptCode> concepts = new ArrayList<ConceptCode>(1); concepts.add(new ConceptCode("CO-9999", finalAmount, " Insured Flat Rate", 1)); result.put("company_concepts", concepts); wim.completeWorkItem(wi.getId(), result); }
public void executeWorkItem(WorkItem wi, WorkItemManager wim) { String patientId = (String) wi.getParameter("rates_patientName"); BigDecimal finalAmount = BigDecimal.ZERO; //Mock Data List<ConceptCode> concepts = new ArrayList<ConceptCode>(2); concepts.add(new ConceptCode("CO-123", new BigDecimal(125), "Dialy Hospital Bed Rate", 4)); concepts.add(new ConceptCode("CO-123", new BigDecimal(100), "Nurse Service", 1)); InsuranceService client = getClient(); //Fixed rate for insured patients finalAmount = client.calculateHospitalRates(patientId, concepts); Map<String, Object> result = new HashMap<String, Object>(); result.put("rates_finalAmount", finalAmount); result.put("rates_concepts", concepts); wim.completeWorkItem(wi.getId(), result); }
public void executeWorkItem(WorkItem wi, WorkItemManager wim) { Car car = (Car)wi.getParameter("carInput"); System.out.println("Defining Car Price"+car); StatelessKnowledgeSession session = createStatelessSession(); session.execute(car); Map<String, Object> params = new HashMap<String, Object>(); params.put("carOutput", car); wim.completeWorkItem(wi.getId(), params); }
public void executeWorkItem(WorkItem wi, WorkItemManager wim) { Car car = (Car)wi.getParameter("carInput"); System.out.println("Ranking Car"+car); StatelessKnowledgeSession session = createStatelessSession(); session.execute(car); Map<String, Object> params = new HashMap<String, Object>(); params.put("carOutput", car); wim.completeWorkItem(wi.getId(), params); }
public void executeWorkItem(WorkItem wi, WorkItemManager wim) { String patientId = (String) wi.getParameter("insured_patientName"); boolean isPatientInsured = false; InsuranceService client = getClient(); isPatientInsured = client.isPatientInsured(patientId); Map<String, Object> result = new HashMap<String, Object>(); result.put("insured_isPatientInsured", isPatientInsured); wim.completeWorkItem(wi.getId(), result); }
public void executeWorkItem(WorkItem wi, WorkItemManager wim) { String patientId = (String) wi.getParameter("gatherdata_patientName"); Patient patientData = null; InsuranceService client = getClient(); patientData = client.getPatientData(patientId); Map<String, Object> result = new HashMap<String, Object>(); result.put("gatherdata_patient", patientData); wim.completeWorkItem(wi.getId(), result); }
public void executeWorkItem(WorkItem workItem, WorkItemManager workItemManager) { this.workItemId = workItem.getId(); this.workItemManager = workItemManager; currentEmergency = (Emergency) workItem.getParameter("emergency"); currentEmergency.setRevision(currentEmergency.getRevision() + counter); }
public void executeWorkItem(WorkItem workItem, WorkItemManager workItemManager) { this.workItemId = workItem.getId(); currentEmergency = (Emergency) workItem.getParameter("emergency"); currentEmergency.setRevision(currentEmergency.getRevision() + counter); }
public void executeWorkItem(WorkItem workItem, WorkItemManager workItemManager) { this.workItemId = workItem.getId(); this.workItemManager = workItemManager; currentEmergency = (Emergency) workItem.getParameter("emergency"); currentEmergency.setRevision(currentEmergency.getRevision() + counter); }