@Test public void executeAsynch() throws Exception { }
@SuppressWarnings("unchecked") @Override public void executeAsynch(final Map<String, T2Reference> inputs, final AsynchronousActivityCallback callback) { callback.requestRun(new Runnable() { public void run() { InvocationContext context = callback .getContext(); ReferenceService referenceService = context .getReferenceService(); String id = (String) referenceService.renderIdentifier(inputs.get(IN_ID), String.class, context); String ds = (String) referenceService.renderIdentifier(inputs.get(IN_DS), String.class, context); String targetDs = null; if (isTargetted) { targetDs = (String)referenceService.renderIdentifier(inputs.get(IN_DESTDS), String.class, context); } Set<Xref> result; Xref srcRef = new Xref (id, DataSource.getByFullName(ds)); try { synchronized (this) { if (isTargetted) { result = mapper.mapID(srcRef, DataSource.getByFullName(targetDs)); } else { result = mapper.mapID(srcRef); } } } catch (IDMapperException ex) { callback.fail("ID mapping of " + srcRef + " failed.", ex); return; } Map<String, T2Reference> outputs = new HashMap<String, T2Reference>(); String simpleValue = "simple"; T2Reference simpleRef = referenceService.register(simpleValue, 0, true, context); outputs.put(OUT_IDS, simpleRef); List<String> ids = new ArrayList<String>(); List<String> dss = new ArrayList<String>(); for (Xref ref : result) { ids.add (ref.getId()); dss.add (ref.getDataSource().getFullName()); } T2Reference idsRef = referenceService.register(ids, 1, true, context); outputs.put(OUT_IDS, idsRef); T2Reference dssRef = referenceService.register(dss, 1, true, context); outputs.put(OUT_DSS, dssRef); callback.receiveResult(outputs, new int[0]); } }); }
BridgeDbActivity extends
		AbstractAsynchronousActivity<BridgeDbActivityConfigurationBean> implements AsynchronousActivity<BridgeDbActivityConfigurationBean> { @SuppressWarnings("unchecked") @Override public void executeAsynch(final Map<String, T2Reference> inputs, final AsynchronousActivityCallback callback) { callback.requestRun(new Runnable() { public void run() { InvocationContext context = callback .getContext(); ReferenceService referenceService = context .getReferenceService(); String id = (String) referenceService.renderIdentifier(inputs.get(IN_ID), String.class, context); String ds = (String) referenceService.renderIdentifier(inputs.get(IN_DS), String.class, context); String targetDs = null; if (isTargetted) { targetDs = (String)referenceService.renderIdentifier(inputs.get(IN_DESTDS), String.class, context); } Set<Xref> result; Xref srcRef = new Xref (id, DataSource.getByFullName(ds)); try { synchronized (this) { if (isTargetted) { result = mapper.mapID(srcRef, DataSource.getByFullName(targetDs)); } else { result = mapper.mapID(srcRef); } } } catch (IDMapperException ex) { callback.fail("ID mapping of " + srcRef + " failed.", ex); return; } Map<String, T2Reference> outputs = new HashMap<String, T2Reference>(); String simpleValue = "simple"; T2Reference simpleRef = referenceService.register(simpleValue, 0, true, context); outputs.put(OUT_IDS, simpleRef); List<String> ids = new ArrayList<String>(); List<String> dss = new ArrayList<String>(); for (Xref ref : result) { ids.add (ref.getId()); dss.add (ref.getDataSource().getFullName()); } T2Reference idsRef = referenceService.register(ids, 1, true, context); outputs.put(OUT_IDS, idsRef); T2Reference dssRef = referenceService.register(dss, 1, true, context); outputs.put(OUT_DSS, dssRef); callback.receiveResult(outputs, new int[0]); } }); } }
BridgeDbActivity extends
		AbstractAsynchronousActivity<BridgeDbActivityConfigurationBean> implements AsynchronousActivity<BridgeDbActivityConfigurationBean> { @SuppressWarnings("unchecked") @Override public void executeAsynch(final Map<String, T2Reference> inputs, final AsynchronousActivityCallback callback) { callback.requestRun(new Runnable() { public void run() { InvocationContext context = callback .getContext(); ReferenceService referenceService = context .getReferenceService(); String id = (String) referenceService.renderIdentifier(inputs.get(IN_ID), String.class, context); String ds = (String) referenceService.renderIdentifier(inputs.get(IN_DS), String.class, context); String targetDs = null; if (isTargetted) { targetDs = (String)referenceService.renderIdentifier(inputs.get(IN_DESTDS), String.class, context); } Set<Xref> result; Xref srcRef = new Xref (id, DataSource.getByFullName(ds)); try { synchronized (this) { if (isTargetted) { result = mapper.mapID(srcRef, DataSource.getByFullName(targetDs)); } else { result = mapper.mapID(srcRef); } } } catch (IDMapperException ex) { callback.fail("ID mapping of " + srcRef + " failed.", ex); return; } Map<String, T2Reference> outputs = new HashMap<String, T2Reference>(); String simpleValue = "simple"; T2Reference simpleRef = referenceService.register(simpleValue, 0, true, context); outputs.put(OUT_IDS, simpleRef); List<String> ids = new ArrayList<String>(); List<String> dss = new ArrayList<String>(); for (Xref ref : result) { ids.add (ref.getId()); dss.add (ref.getDataSource().getFullName()); } T2Reference idsRef = referenceService.register(ids, 1, true, context); outputs.put(OUT_IDS, idsRef); T2Reference dssRef = referenceService.register(dss, 1, true, context); outputs.put(OUT_DSS, dssRef); callback.receiveResult(outputs, new int[0]); } }); }  }
BridgeDbActivity extends
		AbstractAsynchronousActivity<BridgeDbActivityConfigurationBean> implements AsynchronousActivity<BridgeDbActivityConfigurationBean> { @SuppressWarnings("unchecked") @Override public void executeAsynch(final Map<String, T2Reference> inputs, final AsynchronousActivityCallback callback) { callback.requestRun(new Runnable() { public void run() { InvocationContext context = callback .getContext(); ReferenceService referenceService = context .getReferenceService(); String id = (String) referenceService.renderIdentifier(inputs.get(IN_ID), String.class, context); String ds = (String) referenceService.renderIdentifier(inputs.get(IN_DS), String.class, context); String targetDs = null; if (isTargetted) { targetDs = (String)referenceService.renderIdentifier(inputs.get(IN_DESTDS), String.class, context); } Set<Xref> result; Xref srcRef = new Xref (id, DataSource.getByFullName(ds)); try { synchronized (this) { if (isTargetted) { result = mapper.mapID(srcRef, DataSource.getByFullName(targetDs)); } else { result = mapper.mapID(srcRef); } } } catch (IDMapperException ex) { callback.fail("ID mapping of " + srcRef + " failed.", ex); return; } Map<String, T2Reference> outputs = new HashMap<String, T2Reference>(); String simpleValue = "simple"; T2Reference simpleRef = referenceService.register(simpleValue, 0, true, context); outputs.put(OUT_IDS, simpleRef); List<String> ids = new ArrayList<String>(); List<String> dss = new ArrayList<String>(); for (Xref ref : result) { ids.add (ref.getId()); dss.add (ref.getDataSource().getFullName()); } T2Reference idsRef = referenceService.register(ids, 1, true, context); outputs.put(OUT_IDS, idsRef); T2Reference dssRef = referenceService.register(dss, 1, true, context); outputs.put(OUT_DSS, dssRef); callback.receiveResult(outputs, new int[0]); } }); }  @Override void configure(BridgeDbActivityConfigurationBean configBean); @SuppressWarnings("unchecked") @Override void executeAsynch(final Map<String, T2Reference> inputs,
			final AsynchronousActivityCallback callback); @Override BridgeDbActivityConfigurationBean getConfiguration(); }
BridgeDbActivity extends
		AbstractAsynchronousActivity<BridgeDbActivityConfigurationBean> implements AsynchronousActivity<BridgeDbActivityConfigurationBean> { @SuppressWarnings("unchecked") @Override public void executeAsynch(final Map<String, T2Reference> inputs, final AsynchronousActivityCallback callback) { callback.requestRun(new Runnable() { public void run() { InvocationContext context = callback .getContext(); ReferenceService referenceService = context .getReferenceService(); String id = (String) referenceService.renderIdentifier(inputs.get(IN_ID), String.class, context); String ds = (String) referenceService.renderIdentifier(inputs.get(IN_DS), String.class, context); String targetDs = null; if (isTargetted) { targetDs = (String)referenceService.renderIdentifier(inputs.get(IN_DESTDS), String.class, context); } Set<Xref> result; Xref srcRef = new Xref (id, DataSource.getByFullName(ds)); try { synchronized (this) { if (isTargetted) { result = mapper.mapID(srcRef, DataSource.getByFullName(targetDs)); } else { result = mapper.mapID(srcRef); } } } catch (IDMapperException ex) { callback.fail("ID mapping of " + srcRef + " failed.", ex); return; } Map<String, T2Reference> outputs = new HashMap<String, T2Reference>(); String simpleValue = "simple"; T2Reference simpleRef = referenceService.register(simpleValue, 0, true, context); outputs.put(OUT_IDS, simpleRef); List<String> ids = new ArrayList<String>(); List<String> dss = new ArrayList<String>(); for (Xref ref : result) { ids.add (ref.getId()); dss.add (ref.getDataSource().getFullName()); } T2Reference idsRef = referenceService.register(ids, 1, true, context); outputs.put(OUT_IDS, idsRef); T2Reference dssRef = referenceService.register(dss, 1, true, context); outputs.put(OUT_DSS, dssRef); callback.receiveResult(outputs, new int[0]); } }); }  @Override void configure(BridgeDbActivityConfigurationBean configBean); @SuppressWarnings("unchecked") @Override void executeAsynch(final Map<String, T2Reference> inputs,
			final AsynchronousActivityCallback callback); @Override BridgeDbActivityConfigurationBean getConfiguration();  }