flow in model-glue event handler - coldfusion

Can any body help me to understand the flow of model-glue event handler......its so confusing or simplify bellow code......
<event-handler name="Shipment.List" type="templatedPage">
<broadcasts>
<message name="needShipmentList" />
</broadcasts>
<views>
<include name="Primary" template="List.Shipment.cfm">
<value name="xe_Display" value="Shipment.Display" />
<value name="xe_Form" value="Shipment.Form" />
</include>
</views>
</event-handler>
<event-handler name="Shipment.Display" type="templatedPage">
<broadcasts>
<message name="needShipmentDetail" />
</broadcasts>
<views>
<include name="primary" template="Display.Shipment.cfm">
<value name="xe_ShipmentList" value="Shipment.List" />
<value name="xe_ItemForm" value="Item.Form" />
<value name="xe_ShipmentDisplay" value="Shipment.Display" />
<value name="xe_ItemRemove" value="doItem.Remove" />
</include>
</views>
</event-handler>

When you call for event "Shipment.List", it will broadcasts "needShipmentList" function of ShipmentController, after execution it will return on List.Shipment.cfm from on "Primary" layout of master page.
"List.Shipment.cfm" has a link whicj is triggered for needShipmentDetail function
"List.Shipment.cfm" fatches values from "Shipment.Display"-->needShipmentDetail
on display page(Display.Shipment.cfm), there are some links for remove, for listing...etc
"xe" is a convention for eXit Events

Related

How to define Decison table in DMN

How to define a Decision table in DMN designer such that,
This is one of the standard decisions : If claim amount is >10000 then hradmin approval =Y otherwise hradmin approval=N
In DMN,
a Decision table in DMN designer such that [...] If claim amount is >10000 then hradmin approval =Y otherwise hradmin approval=N
can be modeled as the following DRG for 1 InputData named claim amount and 1 Decision for the table named hradmin approval:
The hradmin approval decision table can be defined as follows:
The screenshot also shows sample data, matching your original requirements.
You can download the .dmn example here: https://kiegroup.github.io/kogito-online/?file=https://gist.githubusercontent.com/tarilabs/f9655e2f8a2c4253e66ce661e5c79879/raw/so69764028.dmn#/editor/dmn
You can save the xml to a text file, upload it, try it out and modify it here: https://consulting.camunda.com/dmn-simulator/
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:camunda="http://camunda.org/schema/1.0/dmn" id="dinnerDecisions" name="HR Approval Decision" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="4.0.0">
<decision id="beverages" name="HR Approval">
<informationRequirement id="InformationRequirement_1xvojck">
<requiredInput href="#InputData_0pgvdj9" />
</informationRequirement>
<decisionTable id="DecisionTable_07q05jb">
<input id="InputClause_0bo3uen" label="Amount" camunda:inputVariable="">
<inputExpression id="LiteralExpression_0d6l79o" typeRef="integer">
<text>amount</text>
</inputExpression>
</input>
<output id="OuputClause_99999" label="HR Approval" name="hrApproval" typeRef="boolean" />
<rule id="row-506282952-7">
<description></description>
<inputEntry id="UnaryTests_0jb8hau">
<text>>10000</text>
</inputEntry>
<outputEntry id="LiteralExpression_1kr45vj">
<text>true</text>
</outputEntry>
</rule>
<rule id="DecisionRule_05oqdbw">
<description></description>
<inputEntry id="UnaryTests_1vcdz6c">
<text><=10000</text>
</inputEntry>
<outputEntry id="LiteralExpression_0g5cscd">
<text>false</text>
</outputEntry>
</rule>
</decisionTable>
</decision>
<inputData id="InputData_0pgvdj9" name="Amount" />
<dmndi:DMNDI>
<dmndi:DMNDiagram id="DMNDiagram_0i21c0s">
<dmndi:DMNShape id="DMNShape_0a1lk6d" dmnElementRef="beverages">
<dc:Bounds height="80" width="180" x="430" y="130" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_1czaglz" dmnElementRef="InformationRequirement_1xvojck">
<di:waypoint x="500" y="287" />
<di:waypoint x="520" y="230" />
<di:waypoint x="520" y="210" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_0aea4xy" dmnElementRef="InputData_0pgvdj9">
<dc:Bounds height="45" width="125" x="437" y="287" />
</dmndi:DMNShape>
</dmndi:DMNDiagram>
</dmndi:DMNDI>
</definitions>

Not able to add columns to Document Library from Visual Studio template

I am trying to create new document library from SharePoint project template from Visual Studio 2015.
While doing so I am able to create Document Library Template and Instance. Also if I deploy solution to one of my site it creates list as well. Strange thing is if I add a column to the template and then deploy it creates the list but does not create new custom column.
Below is the schema file for the template.
<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="SharedDocuments" Direction="$Resources:Direction;" Url="SharedDocuments" BaseType="1" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE">
<MetaData>
<ContentTypes>
<ContentType ID="0x0101000dba2955561e4de0a115152637e9f8e2" Name="ListFieldsContentType">
<FieldRefs>
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" />
<FieldRef ID="{4b1bf6c6-4f39-45ac-acd5-16fe7a214e5e}" Name="TemplateUrl" />
<FieldRef ID="{cd1ecb9f-dd4e-4f29-ab9e-e9ff40048d64}" Name="xd_ProgID" />
<FieldRef ID="{fbf29b2d-cae5-49aa-8e0a-29955b540122}" Name="xd_Signature" />
<FieldRef ID="{e52012a0-51eb-4c0c-8dfb-9b8a0ebedcb6}" Name="Combine" />
<FieldRef ID="{5d36727b-bcb2-47d2-a231-1f0bc63b7439}" Name="RepairDocument" />
<FieldRef ID="{8f838bdc-4b95-4b26-b86f-3025d2df964f}" Name="TestColumn" />
</FieldRefs>
</ContentType>
<ContentTypeRef ID="0x0101">
<Folder TargetName="Forms/Document" />
</ContentTypeRef>
<ContentTypeRef ID="0x0120" />
</ContentTypes>
<Fields>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="$Resources:core,Title;" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title"></Field>
<Field ID="{4b1bf6c6-4f39-45ac-acd5-16fe7a214e5e}" Type="Text" Name="TemplateUrl" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Template_Link;" XName="TemplateUrl" Filterable="TRUE" Sortable="TRUE" Hidden="TRUE" FromBaseType="TRUE" PITarget="mso-infoPathSolution" PIAttribute="href" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="TemplateUrl"></Field>
<Field ID="{cd1ecb9f-dd4e-4f29-ab9e-e9ff40048d64}" Type="Text" Name="xd_ProgID" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Html_File_Link;" XName="ProgID" Filterable="TRUE" Sortable="TRUE" Hidden="TRUE" FromBaseType="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="xd_ProgID"></Field>
<Field ID="{fbf29b2d-cae5-49aa-8e0a-29955b540122}" Type="Boolean" Group="_Hidden" Name="xd_Signature" DisplaceOnUpgrade="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="xd_Signature" DisplayName="$Resources:core,Xml_signed;" XName="{FBF29B2D-CAE5-49aa-8E0A-29955B540122}" Filterable="TRUE" Sortable="TRUE" Sealed="TRUE" Hidden="TRUE" FromBaseType="TRUE" ReadOnly="TRUE"></Field>
<Field ID="{e52012a0-51eb-4c0c-8dfb-9b8a0ebedcb6}" ReadOnly="TRUE" Type="Computed" Name="Combine" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Merge;" Filterable="FALSE" Sortable="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Combine">
<FieldRefs>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="EncodedAbsUrl" />
<FieldRef Name="TemplateUrl" />
</FieldRefs>
</Field>
<Field ID="{5d36727b-bcb2-47d2-a231-1f0bc63b7439}" ReadOnly="TRUE" Type="Computed" Name="RepairDocument" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Relink;" Filterable="FALSE" Sortable="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="RepairDocument">
<FieldRefs>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="ID" />
</FieldRefs>
</Field>
<Field Name="TestColumn" ID="{8f838bdc-4b95-4b26-b86f-3025d2df964f}" DisplayName="TestColumn" Type="Text" />
</Fields>
<Views>
--Removed--
</Views>
<Forms>
<Form Type="DisplayForm" SetupPath="pages\form.aspx" Url="Forms/DispForm.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" SetupPath="pages\form.aspx" Url="Forms/EditForm.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main" />
--Removed--
</Forms>
</MetaData>
</List>
When you upload a document in a Document Library there's an option for you to choose the Content Type, choose your custom Content Type and you'll see the fields you defined.

Quickfix MarketDataIncrementalRefresh: Tag not defined for this message type

I use Quickfix c++.
I receive FIX message from the server:
8=FIX.4.2|9=312|35=X|34=17|49=CX|52=20150413-13:33:39.691|56=CACIB_MD2|262=1|9883=IDB|268=2|279=2|269=0|55=535791|270=15|271=1|272=20150413|273=13:28:07.653|59=0|126=20150413-21:56:46.201|290=1|9139=cacib_uat2|279=0|269=0|55=535791|270=17|271=1|272=20150413|273=13:33:39.660|59=0|126=20150413-21:56:46.201|290=1|9139=cacib_uat2|10=015|
and Quickfix automatically sends back to the server reject message (tag 55 not defined for this message type):
8=FIX.4.2|9=121|35=3|34=17|49=CACIB_MD2|52=20150413-13:33:39.755|56=CX|45=17|58=Tag not defined for this message type|371=55|372=X|373=2|10=044|
But this tag (55) is defined in the dictionary file:
<message name='MarketDataIncrementalRefresh' msgcat='app' msgtype='X'>
<field name='MDReqID' required='N' />
<field name='CXMarketType' required='N' />
<group name='NoMDEntries' required='N'>
<field name='Symbol' required='N' />
</group>
</message>
...
<field number='55' name='Symbol' type='STRING' />
...
<field number='262' name='MDReqID' type='STRING' />
...
<field number='268' name='NoMDEntries' type='INT' />
...
<field number='9883' name='CXMarketType' type='STRING' />
...
And FIX options are:
UseDataDictionary=Y
DataDictionary=./conf/fix42_dictionary.xml
ValidateFieldsOutOfOrder=N
ValidateUserDefinedFields=N
I don't understand why Quickfix decides that tag 55 (symbol) is not defined, when it is part of the group.
Can you please help?
Problem is you can't directly add groups to messages, it should be inside a component first
<message name='MarketDataIncrementalRefresh' msgcat='app' msgtype='X'>
<field name='MDReqID' required='N' />
<field name='CXMarketType' required='N' />
<component name='NoMDEntriesComp' required='N' />
</message>
<component name="NoMDEntriesComp">
<group name='NoMDEntries' required='N'>
<field name='Symbol' required='N' />
</group>
</component>
NoMDEntries type should be NUMINGROUP instead of INT
<field number='268' name='NoMDEntries' type='NUMINGROUP' />
I faced same issue.It is QuickFix incorrect reporting of the error. It is necessary to define the user defined fields in the FIX4?.xml. Define the fields in the section and add them to the appropriate message as well.In your case 9883 is look like custom tag you have declared it but not defined in 35=X message properly. So if you use this custom tag in 35=X message inside NoMDEntries can solve your problem.
<message name='MarketDataIncrementalRefresh' msgcat='app' msgtype='X'>
<field name='MDReqID' required='N' />
<group name='NoMDEntries' required='N'>
<field name='Symbol' required='N' />
<field name='CXMarketType' required='N' />
</group>
</message>

InsufficientMemoryException in Appfabric

**InsufficientMemoryException in Appfabric.
System.InsufficientMemoryException: Failed to allocate a managed memory buffer of 268435456 bytes. The amount of available memory may be low. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
Ram size was-32gb. After I set maxBufferSize="999999999", but still I am getting the same error. My configuration file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="dataCache" type="Microsoft.ApplicationServer.Caching.DataCacheSection, Microsoft.ApplicationServer.Caching.Core" />
</configSections>
<dataCache size="Small">
<caches>
<cache consistency="StrongConsistency" name="default" minSecondaries="0">
<policy>
<eviction type="Lru" />
<expiration defaultTTL="10" isExpirable="true" />
</policy>
</cache>
</caches>
<hosts>
<host replicationPort="22236" arbitrationPort="22235" clusterPort="22234"
hostId="1222497344" size="16383" leadHost="true" account="XXX"
cacheHostName="AppFabricCachingService" name="XXX.com"
cachePort="22233" />
</hosts>
<advancedProperties>
<securityProperties mode="None" protectionLevel="None">
<authorization>
<allow users="Anblicks" />
<allow users="DefaultAppPool" />
<allow users="Administrator" />
<allow users="network service" />
</authorization>
</securityProperties>
<transportProperties maxBufferSize="999999999" />
</advancedProperties>
<deploymentSettings>
<deploymentMode value="RoutingClient" />
</deploymentSettings>
</dataCache>
</configuration>

In modelglue event use different view files based on conditions/results

Following is a event handler used in a xml file in config folder.
<event-handler name="survey.completioninf">
<broadcasts>
<message name="checkLogin">
<argument name="role" value="suadmin,manager" />
</message>
<message name="getPrograms" />
</broadcasts>
<results>
<result name="NotLoggedIn" do="user.login" redirect="true" />
<result name="NotAuthorized" do="user.notauthorized" redirect="true" />
<result do="view.template" />
</results>
<views>
<include name="body" template="survey/completioninf.cfm" />
</views>
</event-handler>
Is there any way I can include a different view file based on a result value or attribute?
I need to keep the event name consistent.
You can create a new result for each include you need (based on result value or attribute). If you set redirect="false" then it will stay under your survey.completioninf event name. Basically this event becomes a filter and redirects to the appropriate include silently.
<event-handler name="survey.completioninf">
<broadcasts>
<message name="checkLogin">
<argument name="role" value="suadmin,manager" />
</message>
<message name="getPrograms" />
</broadcasts>
<results>
<result name="NotLoggedIn" do="user.login" redirect="true" />
<result name="NotAuthorized" do="user.notauthorized" redirect="true" />
<!-- Add your new results here and redirect to the desired events -->
<result name="SurveyIsNotComplete" do="survey.ContinueSurvey" redirect="false">
<result name="SurveyIsComplete" do="survey.CompletedSurvey" redirect="false">
</results>
</event-handler>
<!-- You will need to create new events to handle these results -->
<event-handler name="survey.CompletedSurvey">
<broadcasts>
<message name="checkLogin">
<argument name="role" value="suadmin,manager" />
</message>
<message name="getPrograms" />
</broadcasts>
<results>
<result name="NotLoggedIn" do="user.login" redirect="true" />
<result name="NotAuthorized" do="user.notauthorized" redirect="true" />
<result do="view.template" />
</results>
<views>
<include name="body" template="survey/completioninf.cfm" />
</views>
</event-handler>
<event-handler name="survey.ContinueSurvey">
<broadcasts>
<message name="checkLogin">
<argument name="role" value="suadmin,manager" />
</message>
<message name="getPrograms" />
</broadcasts>
<results>
<result name="NotLoggedIn" do="user.login" redirect="true" />
<result name="NotAuthorized" do="user.notauthorized" redirect="true" />
<result do="view.template" />
</results>
<views>
<include name="body" template="survey/continueSurvey.cfm" />
</views>
</event-handler>