/** * Fill the common activity info from an event. * @param info * @param event */ private void fill(TActivityInfo info, ActivityEvent event) { info.setName(event.getActivityName()); info.setType(event.getActivityType()); info.setAiid(""+event.getActivityId()); info.setScope(TScopeRef.Factory.newInstance()); info.getScope().setModelId("" + event.getScopeDeclarationId()); info.getScope().setName(event.getScopeName()); info.getScope().setSiid("" + event.getScopeId()); }
private ActivityInfoDocument lookup(ActivityEvent event) { ActivityInfoDocument ainf = _activities.get(event.getActivityId()); if (ainf == null) { ainf = ActivityInfoDocument.Factory.newInstance(); fill(ainf.addNewActivityInfo(),event); ainf.getActivityInfo().setStatus(TActivityStatus.ENABLED); _activities.put(event.getActivityId(),ainf); _activitiesOrdered.add(ainf); } return ainf; }
public GetCommunicationResponse getCommunication(GetCommunication request, BpelDAOConnection conn) throws Exception { GetCommunicationResponse response = GetCommunicationResponse.Factory.newInstance(); for (Long iid : request.getIidList()) { response.addNewRestoreInstance().set(getCommunication(iid, conn)); } return response; }
private void fillProperties(TInstanceInfo info, ProcessInstanceDAO instance, Map<QName, String> props) { TInstanceInfo.CorrelationProperties corrProperties = info.addNewCorrelationProperties(); for (Map.Entry<QName, String> property : props.entrySet()) { TCorrelationProperty tproperty = corrProperties.addNewCorrelationProperty(); // not setting correlation-set id here -- too inconvenient for performance // tproperty.setCsetid("" + cset.getCorrelationSetId()); tproperty.setPropertyName(property.getKey()); tproperty.setStringValue(property.getValue()); } }
public ServiceConfig getServiceConfig(QName service) { ServiceConfig c = servicesConfig.get(service); if (c == null) { c = ServiceConfig.Factory.newInstance(); c.setService(service); c.addNewReplayType().setMock(XmlAnySimpleType.Factory.newInstance()); return c; } else return c; }
private void genInstanceSummaryEntry(TInstanceSummary.Instances instances, TInstanceStatus.Enum state, String pid, Map<InstanceSummaryKey, Long> summary) { instances.setState(state); Long count = summary.get(new InstanceSummaryKey(pid, state.toString())); instances.setCount(count == null ? 0 : count.intValue()); }
/** * @see BpelManagementFacade#getProcessDef(String) * @param procid */ public OProcess getProcessDef(String procid) throws ManagementException { if (_server._engine == null) throw new ProcessingException("ServiceProvider required for debugger operation."); BpelProcess process = _server._engine._activeProcesses.get(QName.valueOf(procid)); if (process == null) throw new InvalidRequestException("The process \"" + procid + "\" is not available. Please make sure it is deployed and encompassing System is activated." ); return process.getOProcess(); }
public void add(Exchange e) { ServiceConfig cfg = getServiceConfig(e.getService()); if (cfg.getReplayType().isSetMock()) { String key = getAnswersKey(e.getService(), e.getOperation()); AnswersForKey v = answersMap.get(key); if (v == null) { v = new AnswersForKey(); answersMap.put(key, v); } v.answers.add(e); } }
private void genDocumentInfo(TProcessInfo.Documents docinfo, File f) { DocumentInfoGenerator dig = new DocumentInfoGenerator(f); if (dig.isRecognized() && dig.isVisible()) { TDocumentInfo doc = docinfo.addNewDocument(); doc.setName(dig.getName()); doc.setSource(dig.getURL()); doc.setType(dig.getType()); } }
public int getEventCount(final Long iid) throws ManagementException { EventInfo einfo = getInstanceInfo(iid).getInstanceInfo().getEventInfo(); if (einfo == null) return 0; return einfo.getCount(); }
private void getInstanceSummaryActivityFailure(TInstanceSummary summary, Map<String, FailedSummaryValue> f, String pid) { FailedSummaryValue v = f.get(pid); if (v != null) { TFailuresInfo failures = summary.addNewFailures(); failures.setDtFailure(toCalendar(v.lastFailed)); failures.setCount(v.count.intValue()); } }
public int compare(Exchange arg0, Exchange arg1) { return arg0.getCreateTime().compareTo(arg1.getCreateTime()); } });
public String toString() { StringBuilder buf = new StringBuilder(); boolean first = false; for (Item i : _includes) { if (first) first = false; else buf.append(','); buf.append(i.toString()); } return buf.toString(); }
private TScopeRef genScopeRef(ScopeDAO scope) { TScopeRef tref = TScopeRef.Factory.newInstance(); fillScopeRef(tref, scope); return tref; }