/** * Returns the store entry for the given store. * Will throw a StoreException if the store is not present. */ protected StoreEntry getStore (final String storeName) throws StoreException { StoreEntry result = (StoreEntry)this.storeMap.get(storeName); if (result != null) return result; throw new StoreException ("There is no store named '"+storeName+"' here."); }
/** * retrieve work item by FlowExpressionId. * * @param storeName TODO : this parameter is not used ... * @param fei * @return * @throws StoreException */ public InFlowWorkItem retrieveWorkItem(final String storeName, final FlowExpressionId fei) throws StoreException { if (log.isDebugEnabled()) { log.debug("starting retrieve work item. this = " + this); log.debug("retrieve work item for ID = " + fei.toParseableString()); } Content ct = getWorkItemById(fei); if (ct == null) { throw new StoreException("cannot find workitem " + fei); } try { return loadWorkItem(ct); } catch (Exception e) { throw new StoreException("load work item form xml failed", e); } }
throw new StoreException ("Failed to loadHeaders from store '"+getName()+"'", wle);
throw new StoreException ("Couldn't instantiate query "+query, qe); throw new StoreException ("Query (validation) failure", qe);
/** * This method is public for the SqlWorkItemStore : so that ActionDaemons * implemented by third parties may access it. */ public void removeWorkItem (final FlowExpressionId fei) throws StoreException { try { SqlWorkItemCoder.removeWorkItem (fei, getContext(), getParams()); } catch (Exception e) { throw new StoreException ("Failed to remove workitem", e); } }
throw new StoreException ("WorkItem is not locked. No need to release it."); throw new StoreException ("WorkItem is locked by someone else.");
throw new StoreException ("Failed to store workitem in file '"+fileName+"'", e);
protected void storeWorkItem (final InFlowWorkItem wi) throws StoreException { log.debug("storeWorkItem() "+wi.getLastExpressionId()); try { getCoder().encode (wi, getContext(), getParams()); } catch (CodingException ce) { throw new StoreException ("Failed to store workitem", ce); } }
throw new StoreException ("WorkItem is not locked. No need to release it."); throw new StoreException ("WorkItem is locked by someone else.");
protected InFlowWorkItem retrieveWorkItem (final Subject s, final FlowExpressionId fei) throws StoreException { try { return (InFlowWorkItem)getCoder() .decode(fei, getContext(), getParams()); } catch (CodingException ce) { throw new StoreException ("Failed to retrieve workitem "+fei, ce); } }
throw new StoreException ("You cannot remove a workitem when there "+ "is no lock on it."); throw new StoreException ("WorkItem '"+expressionId+ "' is already locked by someone else.");
throw new StoreException ("Could not resolve query-map at "+sUrl, mue);
throw new StoreException ("You cannot remove a workitem when there "+ "is no lock on it. Use 'getAndLock()'"); throw new StoreException ("WorkItem '"+expressionId+ "' is already locked by someone else.");
throw new StoreException ("Failed to loadHeaders from store '"+getName()+"'", wle);
"' from '"+fileName+"'", t); throw new StoreException ("failed to load workitem '"+fei+ "' from '"+fileName+"'", t); throw new StoreException ("Empty workitem '"+fei+"' in '"+fileName+"'");
("Failed to list workitems in "+getName(), e); throw new StoreException ("Failed to list workitems in "+getName(), e);
throw new StoreException ("WorkItem '"+id+ "' is already locked by someone else."); throw new StoreException ("Cannot save workitem : you have no lock on it.");
throw new StoreException ("WorkItem '"+id+ "' is already locked by someone else."); throw new StoreException ("Cannot save workitem : you have no lock on it.");
protected int doCountWorkItems (final Subject s) throws StoreException { OwfeDataSource ds = null; try { ds = SqlUtils.lookupDataSource (getContext(), getParams()); return SqlWorkItemCoder.countWorkItems(ds); } catch (Exception e) { throw new StoreException ("Failed to count workitems in store", e); } finally { ds.releaseConnection(); } }
throw new StoreException ("Cannot delegate to unknown participant '"+ participantName+"'"); throw new StoreException ("Failed to delegate to participant '"+participantName+"'", t);