protected String buildWorkItemSql (final Long workitemId, final InFlowWorkItem wi) { // // generate batch statements for inserting core workitem data final java.util.List values = new java.util.ArrayList(WORKITEM_COLS.length); values.add(workitemId.toString()); values.add(wi.getParticipantName()); values.add(wi.getDispatchTime()); values.add(wi.getLastModified()); final String sInsert = SqlUtils.buildInsertString (WORKITEM_TABLE, WORKITEM_COLS, values); log.debug("buildWorkItemSql() "+sInsert ); return sInsert; }
public java.util.List listWorkItems (final Subject s, final int limit) throws StoreException { //final String userName = BasicPrincipal.getBasicPrincipal(s).getName(); final String userName = BasicPrincipal.getBasicPrincipal(s).getOwfePrincipalName(); if (log.isDebugEnabled()) log.debug("listWorkItems() for '"+userName+"'"); final java.util.List items = super.listWorkItems(s, limit); if (isAdmin(userName)) return items; final java.util.List results = new java.util.ArrayList(items.size()); final java.util.Iterator it = items.iterator(); while (it.hasNext()) { final InFlowWorkItem item = (InFlowWorkItem)it.next(); //if (item.getParticipantName().equals(userName)) if (this.equals(item.getParticipantName(), userName)) results.add(item); } return results; }
public void consume (WorkItem wi) throws Exception { //System.out.print(this.getRegex()+" "); System.out.print (((InFlowWorkItem)wi).getParticipantName()+" "); if (wi.getAttributes().hasKey(F_INPUT)) { System.out.print (wi.getAttributes().sget(F_INPUT)+" "); } //System.out.flush(); replyToEngine((InFlowWorkItem)wi); } });
System.out.println("Participant: " + wi.getParticipantName()); System.out.println("Engine: " + feId.getEngineId()); System.out.println("WF def name: " + feId.getWorkflowDefinitionName());
(elt, PARTICIPANT_NAME, wi.getParticipantName()); WicUtils.setAttribute (elt, DISPATCH_TIME, wi.getDispatchTime());
return; String parName = ((InFlowWorkItem) (wi)).getParticipantName();
log.debug ("use() received workitem for participant '"+ ifwi.getParticipantName()+"'");
result.setParticipantName(workItem.getParticipantName()); result.setLastModified(workItem.getLastModified());
ifwi, History.EVT_DISPATCH, ifwi.getParticipantName(), this.getClass().getName());
newc.createNodeData(WorkflowConstants.NODEDATA_PARTICIPANT, vf.createValue(wi.getParticipantName()));
/** * Takes care of handling the workitem (reply) to the expression pool. */ protected void reply (final InFlowWorkItem wi) throws ReplyException { //if (log.isDebugEnabled()) // log.debug("reply() to "+wi.getLastExpressionId()); final History h = Definitions.getHistory(getContext()); if (h != null) { h.log (wi.getLastExpressionId(), wi, History.EVT_INCOMING, wi.getParticipantName(), ""); } Definitions.getExpressionPool(getContext()) .reply(wi.getLastExpressionId(), wi); }
/** * Produces an exact replica of this InFlowWorkItem */ public Object clone () { InFlowWorkItem clone = new InFlowWorkItem (); clone.setAttributes((StringMapAttribute)getAttributes().clone()); if (getId() != null) clone.setId(getId().copy()); clone.setParticipantName(Utils.copyString(getParticipantName())); clone.setDispatchTime(Utils.copyString(getDispatchTime())); clone.setLastModified(Time.toIsoDate()); clone.setFilter(getFilter()); clone.setHistory(HistoryItem.copyHistoryList(this.history)); return clone; }