Friday, December 17, 2010

How to use Published Data where no subscription is possible.

During an Opalis project I hat a little problem when I wanted to work with published data within foundation objects without any additional IPs.

Of course this particular issue could be solved another way but the solution should work for other objects too.

My scenario: I have a workflow that grabs some lines from a CSV file. I wanted to add additional information to the line but because of project description I had to use foundation objects and not the Codeplex Data Manipulation IP (you find it here).

So imagine like that:

origin text World,Universe
wanted text Hello World,Universe

To do that I use the Read Line object to get the data out of the CSV file (you can use any other that makes sense to you – it doesn’t matter) and the Map Published Data object to manipulate the lines.

In the properties of the Map Published Data object I added a data mapping. Unfortunately I can’t subscribe to the published data in the Map to field by right-click, Subscribe,… . So I solved it that way:

I used the following values:

Output Published Data myWantedText *
Source Data {Line text from “Read Line”} **
Pattern World* ***
Map to Hello \`d.T.~Ed/{A610DBE8-A278-45FF-96CB-3C35191332DE}.LineText\`d.T.~Ed/ ****

To explain that shortly:

* any description you like to use later in the data bus
** the source data from the normal data bus subscription
*** the pattern you are searching for
**** the additional text including my (!) copy&pasted source data field

So you have to simple copy your subscription from the source data and paste it into the map to field so that it looks like the following screenshot:


I didn’t double-check it at the moment but I can imagine that this solution works for all other objects too. Anyway, you can try it out very easily by yourself…

All information is provided "as is" without any warranty! Try in lab before. Handle with care in production.

1 comment:

  1. Very good tip! I was trying to find a way to republish data using this activity. Thanks!