Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jbpm.process.workitem.google.calendar;
 
 
 public class GoogleCalendarWorkItemHandler implements WorkItemHandler {
 	
 	private String userName = "drools.demo@gmail.com";
	private String password = "pa$$word";
	public void executeWorkItem(WorkItem workItemWorkItemManager manager) {
		try {
			String userName = (StringworkItem.getParameter("UserName");
			if (userName == null) {
				userName = this.;
			}
			String password = (StringworkItem.getParameter("Password");
			if (password == null) {
				password = this.;
			}
			String title = (StringworkItem.getParameter("Title");
			String content = (StringworkItem.getParameter("Content");
			String start = (StringworkItem.getParameter("Start");
			String end = (StringworkItem.getParameter("End");
//			GoogleCalendarUtils.insertEntry(userName, password, title, content, start, end);
			manager.completeWorkItem(workItem.getId(), null);
catch (Throwable t) {
			manager.abortWorkItem(workItem.getId());
		}
	}
	public void abortWorkItem(WorkItem workItemWorkItemManager manager) {
		// Do nothing
	}
	public void setUserName(String userName) {
		this. = userName;
	}
	public void setPassword(String password) {
		this. = password;
	}
New to GrepCode? Check out our FAQ X