public boolean isResolveable(String name) { return workItem.getResult(name) != null; }
public VariableResolver getVariableResolver(String name) { return new SimpleValueResolver(workItem.getResult(name)); }
public boolean isResolveable(String name) { return workItem.getResult(name) != null; }
public Object getResult(String name) { return delegate.getResult(name); }
// Submit the work WorkItem workItem = workManager.startWork(new MyWork()); // Wait for the work to be done for up to 60s ArrayList<WorkItem> items = new ArrayList<WorkItem>(); boolean workFinished = workManager.join(items, WorkManager.JOIN_AND, 60*1000); if(workFinished) try { MyWork work = workItem.getResult(); // if we get here, the work completed without errors } catch(WorkException e) { throw e.getCause(); // this will be the exception thrown by your Work impl } else { // the Work did not finish in 60s }
public VariableResolver getVariableResolver(String name) { return new SimpleValueResolver(workItem.getResult(name)); }