BizTalk routing messages in message box based on field value - biztalk

I have an exercise I'm working to complete; previously it was de-batching multiple XML messages from one file into individual files. Then I had to route individual files based on a field value which had been promoted using filters on a port. Now the exercise has evolved into taking a multi record XML file, breaking it down to individual XML records, and routing their output to different folders based on a value in one of the fields. The hurdles are as follow:
I can't promote a repeating field such as the one I have to use to sort the outbound messages
The value of the field is a system.int32; I am sorting on a "equal to or more than 900" and "less than 900" so I need the int type.
Beyond simple "idNUm >= 900" I am in over my head with the necessary expression(s).
I have the basic orchestration design down, I am just lacking the expressions. The node I am looking to validate against is IDNum, and occurs in each record.
UPDATE: Still not working
I put in the following in my expression: IDNumDefined.Customer.IDNum >= 900
and I get "identifier Customer does not exist in "IDNumDefined"; are you missing an assembly reference?" and "unexpected token '>=' "
Ideas? (sorry about not updating question here)

The debatching has to occur using an Envelope and Body schema.
Once you have this figured out, the debatching can occur using a simple XML disassembler. In the body schema you can quick promote your idNum field by associating a PropertySchema with it.
Once this is taken care of, it is easy to use 2 send ports in order to set your filter subscription(s).

Related

BizTalk Null Reference Error when Editing Party Agreement Envelope Properties

I am using BizTalk 2016 with Feature Update 3 (CU7), and the BizTalk Server Administration Console version 3.12.774.0
In the BizTalk Group I go to the Parties Node
Select a Party and go to it's Agreement in the Agreements list
Open the Agreement and go to the second tab (outgoing settings e.g. BizTalkApp->ThirdParty)
Go to Transaction Set Settings -> Envelopes
There is one envelope record. Go to this an change one of the values, e.g. GS4 - change from CCYYMMDD to YYMMDD
Click Apply
BizTalk displays the error Object reference not set to an instance of an object. (Microsoft.BizTalk.Administration.EdiText)
You cannot apply any changes to Envelope GS values because of this error. Changes to other agreement properties such as Interchange Settings -> Identifiers can be saved fine.
Has anyone come across this error before? How can we get past it?
It turns out that this error was caused by the fact I didn't have any value entered in the GS1 dropdown. Once I had entered this value in the row then other changes to the row could be saved.
Biztalk suspends instances of messages where the format or value of GS segments do not match those specified in the envelopes tab. So this means that I will have to analyse all the EDI documents we are receiving from our external party and make sure the GS1 values they use are covered. If there are more than one type of GS1 value used I will have to enter multiple rows in the Envelopes list.

eventAction and pageView filters in one request

I'm trying to filter website conversions from Google Analytics for a dashboard. However since it is a mixture of third party leads, events, and page path that contribute to the leads, I have to combine different types of filters. However combining folling metrics, the https://ga-dev-tools.appspot.com/query-explorer/ shows me the value 0 even if that's not correct.
Metrics: ga:totalEvents
Dimension:ga:date
ga:pagePath=#DialogNavigatorVertical,ga:eventAction==Texting form submit
I have tried multiple solutions, but can't figure out how to get the correct data. Can I not combine pagePath and evenAction?
Thank you so much for all your kind help,
Anna
Events by definition are not page views. This means that an Event dimension (category, action, label) can't have page view metrics such as page views or average time on the page because that information does not relate to the specific event.
But you can definitely combine pagePath and evenAction. You are getting wrong results because of one of the following reasons
In your filter, ga:pagePath=#DialogNavigatorVertical is wrong, it must be either == or !=. it cant be an assignment operator
IF you wish to combine two filter conditions using AND that means both must be true, use ;. Semicolon is used for AND operator in filters
IF you wish to combine two filter conditions using OR that means both must be true, use ,. Comma is used for OR operator in filters
In case you are using core reporting api from a backend script, please URL encode the call before hitting. like == must be %3D%3D, space must be %20 and so on.
Please have a look into settings here : https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters

Creating own Report in Odoo: t-field for date, Customer ID etc.?

First of all I'm kinda new to Odoo and I'm trying to understand some Basic logic. I created my own Report based on the Basic Report of Odoo.
There are a lot of fields like t-field="o.date_invoice" or t-field="o.partner_id etc. which work really fine but where can I find all functions? Is there any list?
For Example I Need a Field for the order date and for the print date or for a Customer ID.
With a t-field attribute you can access and print fields from the actual model or from a related model, for example with the following element you can print the content of the phone column (field) of the actual record:
<span t-if="o.phone"
t-field="o.phone" />
Explanation of t-field in the documentation:
The t-field directive can only be used when performing field access
(a.b) on a "smart" record (result of the browse method). It is able to
automatically format based on field type, and is integrated in the
website's rich text edition.
Check this link for further information if you want to build reports and this one, where you can read about some the elements that you can use in Qweb
In addition, you can check here a list of some attributes that you can use in a Qweb template

Accessing distinguished fileds in assign shape (Biztalk)

I am constructing a multipart message in construct shape. That message has a body part with distinguished field, which i want to assign in assignment shape:
As you can see, intellisense is suggesting me to select a node with my distinguished field. But when i select it, i get an error!
I've faced this before, and restarting VS always helped. But not this time :(
Message is a reserved word in XLang. Can you change the name of the element/attribute that backs this distinguished field to something else? If that does not work, you could always XPath to the element to read it and use it. Last if those two don't work, you could make this a promoted property where you are able to specify the name yourself.
Here is the list of reserved words.
http://msdn.microsoft.com/en-us/library/aa547020.aspx

What does Managed="0" in List view XML mean?

I've written a Data Extender class and editor extension that properly displays a few additional columns for items as you browse lists in the CME (folders and structure groups). I had to register my class to handle commands like GetList, GetListSearch, GetListUserFavorites, and GetListCheckedOutItems.
What I've noticed is that the code gets run even when a list of say, schemas is loaded for a drop-down list in the CME (like when creating a new component and you get the list of schemas in a drop-down). so, even though my additional data columns aren't needed in that situation, the code is still being executed and it slows things down.
It seems that it's the GetList command called in those situations. So, I can't just skip processing based on the command. So, I started looking at the XML that the class receives for the list and I've noticed when the code is run for the drop-downs, there's a Managed="0" in the XML. For example:
For a Structure Group list: <tcm:ListItems Managed="64" ID="tcm:103-546-4">
For a Folder list: <tcm:ListItems Managed="16" ID="tcm:103-411-2">
But for a Schema list: <tcm:ListItems ID="tcm:0-103-1" Managed="0">
For a drop-down showing keyword values for a category: <tcm:ListItems Managed="0" ID="tcm:103-506-512">
So, can I just use this Managed="0" as a flag to indicate that the list being processed isn't going to show my additional columns and I can just quit processing?
Managed value is representation of what items can be created inside OrganizationItem:
64 means you can create pages
16 means you can create components
10, for example would mean you can create folders (2) + schemas (8)
518 - folders (2) + structure groups (4) + categories (512)
The value is 0 for non organizational items.
Value depends on the item itself (you can't create pages in folder, for example), as well as on security settings you have on publication and organizational item
Unfortunately CME can't offer right now that kind of granularity level to allow you to tell in a data extender where a particular WCF API call is coming from. Our WCF API is not context aware yet. It may change in the future.
Trusting Managed="0" is not a great idea.
The reason for that is the model lists are client cached per filter. In the current design the filter has CM related data and nothing related to the context the request is being fired from.
Typically the client user interface is reusing cached model data whenever is possible. For instance the same model list could be used in the CME dashboard and a drop down control placed into some item view, but with different xml list definitions: the first one will have more columns defined in the list definition than the latter. They are basically different views of the same data.
Therefore you may want to think of different solutions for your problem.
Now... where is the data behind those additional columns is coming from? Is it Tridion CM or a third party provider?
Sometimes the web server caching may provide an acceptable way to improve the response times. But that's the kind of design you should evaluate and decide upon.
I think you would have a more robust solution if you read the ID of the list, and only execute your code for lists of type 2 and 4 (Folders and Structure Groups respectively). but that won't help you with search views etc.
From previous experience and what User978511 says the Managed attribute is an indication of item types that can be created from the context of that list.
Unfortunately that means that the Managed attribute may well be 0 for any user that doesn't have sufficient rights to create items. E.g. check what Managed is in a Structure Group for a user that isn't allowed to create Pages or Structure Groups. It may well be 0 in that case too, meaning it is useless for your situation.
Update
You may be able to reach your goal better by looking at the columns parameter:
context.Parameters["columns"]
In a few tests I've run I get different values, depending on whether I get a list for the main list view, the tree or a drop down list.
543
23
7
Those values are a bit mask of these constants (from Constants.js):
/**
* Defines the column filter.
* Used to specify which attributes should be included in XML list data.
* #enum
*/
Tridion.Constants.ColumnFilter =
{
ID: 1,
ID_AND_TITLE: 3,
DEFAULT: 7,
EXTENDED: 15,
ALLOWED_ACTIONS: 16,
VERSIONS: 32,
INTERNALS: 64,
URL: 128,
XML_NAME: 256,
CHECK_OUT_USER: 512,
PUBTITLE_AND_ITEM_PATH: 1024
};
So from my limited testing it seems that drop downs request DEFAULT columns, while the main list view and the tree both have ALLOWED_ACTIONS in there. This makes sense to me, since the user gets can interact with the list items in the tree and list view, while they can only select them in the drop downs. So checking for the presence of ALLOWED_ACTIONS in the columns parameter might be one way to reduce the number of places where your data extender adds information.

Resources