summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Mishra2012-03-14 07:05:48 (EDT)
committer Manik Kishore2012-06-19 07:21:07 (EDT)
commite67783d7c9ce3f872bcc0ed6a0d05da11d34cd95 (patch)
treedf8411bdcf07c1640407e5521880e9abf37ba04d
parent0a6b41749fa2c8623a9def03c41d33ddc8d3e538 (diff)
downloadorg.eclipse.stardust.ui.web-e67783d7c9ce3f872bcc0ed6a0d05da11d34cd95.zip
org.eclipse.stardust.ui.web-e67783d7c9ce3f872bcc0ed6a0d05da11d34cd95.tar.gz
org.eclipse.stardust.ui.web-e67783d7c9ce3f872bcc0ed6a0d05da11d34cd95.tar.bz2
Jira-ID: CRNT-23765
restored code from Rev.53619 (Jira-ID: CRNT-23497), reverted code is required for External web application. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@54531 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/controller/ExternalWebAppActivityInteractionController.java53
1 files changed, 51 insertions, 2 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/controller/ExternalWebAppActivityInteractionController.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/controller/ExternalWebAppActivityInteractionController.java
index cb6b0e6..603993b 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/controller/ExternalWebAppActivityInteractionController.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/controller/ExternalWebAppActivityInteractionController.java
@@ -224,10 +224,59 @@ public class ExternalWebAppActivityInteractionController implements IActivityInt
return true;
}
- public @SuppressWarnings("unchecked")
- Map getOutDataValues(ActivityInstance ai)
+ @SuppressWarnings("unchecked")
+ public Map getOutDataValues(ActivityInstance ai)
{
+ InteractionRegistry registry = (InteractionRegistry) ManagedBeanUtils.getManagedBean(InteractionRegistry.BEAN_ID);
+
Map<String, Serializable> outData = null;
+
+ if (null != registry)
+ {
+ // retrieve out data
+ Interaction interaction = registry.getInteraction(getInteractionId(ai));
+ if (null != interaction)
+ {
+ Map<String, Serializable> outParams = interaction.getOutDataValues();
+ if (null != outParams)
+ {
+ // performing client side OUT mappings
+ outData = newHashMap();
+ for (DataMapping outMapping : (List<DataMapping>) interaction.getDefinition().getAllOutDataMappings())
+ {
+ Serializable outParam = outParams.get(outMapping.getApplicationAccessPoint().getId());
+ if (null != outParam)
+ {
+ try
+ {
+ Object outValue = ClientSideDataFlowUtils.evaluateClientSideOutMapping(
+ interaction.getModel(), outParam, outMapping);
+
+ outData.put(outMapping.getId(), (Serializable) outValue);
+ }
+ catch (Exception e)
+ {
+ trace.warn("Failed evaluating client side of OUT data mapping "
+ + outMapping.getId() + " on activity instance " + ai, e);
+ }
+ }
+ else
+ {
+ trace.info("Missing value for data mapping " + outMapping.getId()
+ + " on activity instance " + ai);
+ }
+ }
+ }
+
+ // destroy interaction resource
+ registry.unregisterInteraction(interaction.getId());
+ }
+ else
+ {
+ trace.warn("Failed resolving interaction resource for activity instance " + ai);
+ }
+ }
+
return outData;
}