Enhancement in AsFile
This enhancement provides an ability for the AsFile to include Math Variables of an activity which is created and processed using AsFile, in response result. In order to get Math variables included under <PostInsert> element in response result AsFile XMLDATA section should be configured.
Prerequisites
N/A
New Items
AsFile
- It controls the creation and execution of an activity when a web service call is made.
- It controls whether MathVariables of executed activity will be included in response result or not.
Changes to Existing Items
Transaction: TransactionTimeProcess
- Math variables, with and without "Log" attribute will be added in TransactionTimesProcess.
Configuration Details
TransactionTimesProcess
- Transaction "TransactionTimesProcess " at "Functional Prototype Plan" should be modified to add Math variables with and without "Log" attribute.
<MathVariables><MathVariable VARIABLENAME="MathVariable1" TYPE="VALUE" DATATYPE="TEXT">11111</MathVariable><MathVariable VARIABLENAME="MathVariable2" TYPE="VALUE" DATATYPE="TEXT">22222</MathVariable><MathVariable VARIABLENAME="ActivityGUID" TYPE="FIELD" DATATYPE="TEXT">Activity:ActivityGUID</MathVariable><MathVariable VARIABLENAME="LoggedMV1" TYPE="VALUE" DATATYPE="TEXT" LOG="Yes">Logged11111</MathVariable><MathVariable VARIABLENAME="LoggedMV2" TYPE="VALUE" DATATYPE="TEXT" LOG="Yes">Logged22222</MathVariable></MathVariables>
- AsFile: ActivityMathResponse (FileID ="AMR")
- ActivityMathResponse AsFile should be configured at "Prototype" company level with "AMR" as file ID.
- XMLDATA section should be configured to include all the Logged math variable for TransactionTimesProcess Activity in response result.
- XMLDATA section should be configured to include "MathVariable1" math variable for TransactionTimesProcess Activity in response result.
XMLDATA:
<?xml version="1.0" encoding="UTF-8"?>
<File>
<AssignAttributes>
<Attribute NAME="SystemDate" TYPE="SYSTEMDATE"/>
<Attribute NAME="GuidActivity" TYPE="GUID"/>
<Attribute NAME="TransactionName" TYPE="XPATH">/Activity/TransactionName</Attribute>
<Attribute NAME="PlanGUID" TYPE="SQL">select planguid from asplan where planname='Functional Prototype Plan'</Attribute>
<Attribute NAME="GuidTransaction" TYPE="SQL">Select TRANSACTIONGUID From ASTRANSACTION Where TRANSACTIONNAME = '[TransactionName]' AND planguid = '[PlanGUID]'</Attribute>
<Attribute NAME="CodeType" TYPE="XPATH">/Activity/CodeType</Attribute>
<Attribute NAME="CodeStatus" TYPE="XPATH">/Activity/CodeStatus</Attribute>
<Attribute NAME="NumberClient" TYPE="XPATH">/Activity/NumberClient</Attribute>
<Attribute NAME="PolicyNumber" TYPE="XPATH">/Activity/PolicyNumber</Attribute>
<Attribute NAME="GuidPolicy" TYPE="SQL">SELECT PolicyGUID FROM AsPolicy WHERE PolicyNumber = '[PolicyNumber]'</Attribute>
<Attribute NAME="OrderProcessing" TYPE="SQL">Select PROCESSINGORDER From ASTRANSACTION Where TRANSACTIONGUID = '[GuidTransaction]'</Attribute>
<Attribute NAME="CodeError" TYPE="XPATH">/Activity/CodeError</Attribute>
<Attribute NAME="CodeSuspense" TYPE="XPATH">/Activity/CodeSuspense</Attribute>
</AssignAttributes>
<PostInsert>
<Object CLASS="com.adminserver.pas.webservice.bll.AsFilePostInsertIndividualActivityProcessorBll">
<Parameters>
<Parameter NAME="ActivityClientNumber">NumberClient</Parameter>
</Parameters>
</Object>
<ActivityMathResponse ALLMATHVARIBLES="Logged">
<Transaction TransactionGUID="GuidTransaction" ALLMATHVARIBLES="Logged">
<MathVariableName>MathVariable1</MathVariableName>
</Transaction>
</ActivityMathResponse>
</PostInsert>
</File>
XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:helper="com.adminserver.webservice.helper.XsltFunctionHelper" extension-element-prefixes="helper" version="2.0">
<xsl:param name="GuidActivity"/>
<xsl:param name="GuidTransaction"/>
<xsl:param name="CodeType"/>
<xsl:param name="CodeStatus"/>
<xsl:param name="NumberClient"/>
<xsl:param name="GuidPolicy"/>
<xsl:param name="OrderProcessing"/>
<xsl:param name="CodeError"/>
<xsl:param name="CodeSuspense"/>
<xsl:param name="DateEffective"/>
<xsl:param name="DateActiveFrom"/>
<xsl:param name="DateActiveTo"/>
<xsl:param name="GmtEntry"/>
<xsl:param name="GmtCreation"/>
<xsl:param name="SystemDate"/>
<xsl:template match="Activity">
<xsl:element name="AsXml">
<xsl:element name="AsActivity">
<xsl:element name="ActivityGuid">
<xsl:value-of select="$GuidActivity"/>
</xsl:element>
<xsl:element name="TransactionGuid">
<xsl:value-of select="$GuidTransaction"/>
</xsl:element>
<xsl:element name="TypeCode">
<xsl:value-of select="$CodeType"/>
</xsl:element>
<xsl:element name="StatusCode">
<xsl:value-of select="$CodeStatus"/>
</xsl:element>
<xsl:element name="EffectiveDate">
<xsl:value-of select="$SystemDate"/>
</xsl:element>
<xsl:element name="ActiveFromDate">
<xsl:call-template name="getGMT"/>
</xsl:element>
<xsl:element name="ClientNumber">
<xsl:value-of select="$NumberClient"/>
</xsl:element>
<xsl:element name="PolicyGuid">
<xsl:value-of select="$GuidPolicy"/>
</xsl:element>
<xsl:element name="ProcessingOrder">
<xsl:value-of select="$OrderProcessing"/>
</xsl:element>
<xsl:element name="ErrorStatusCode">
<xsl:value-of select="$CodeError"/>
</xsl:element>
<xsl:element name="SuspenseStatusCode">
<xsl:value-of select="$CodeSuspense"/>
</xsl:element>
<xsl:element name="EntryGmt">
<xsl:call-template name="getGMT"/>
</xsl:element>
<xsl:element name="CreationGmt">
<xsl:call-template name="getGMT"/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template name="getGMT">
<xsl:value-of select="helper:getGmtTime()"/>
</xsl:template>
</xsl:stylesheet>