Customizing WSO2 Governance Registry 4.6.0 - Service List - wso2

I'm trying to customizing in WSO2 Governance Registry 4.6.0 (G-Reg) the "Service List" table (Home > Metadata > List > Services) adding two column from "Service detail view": "Overview - Description" and "Endpoints - URL"
I've edited the "Services Artifacts" (Home > Extensions > Configure > Artifact Types > Artifact Source) with the following lines:
<artifactType type="application/vnd.wso2-service+xml" shortName="service" singularLabel="Service" pluralLabel="Services" hasNamespace="false" iconSet="27">
<storagePath>/trunk/services/#{namespace}/#{name}</storagePath>
<nameAttribute>overview_name</nameAttribute>
<!--<endpoint1Attribute>endpointstext_endpoint1</endpoint1Attribute>-->
<namespaceAttribute>overview_namespace</namespaceAttribute>
<lifecycle>ServiceLifeCycle</lifecycle>
<ui>
<list>
<column name="Service Name B">
<data type="text" value="overview_name"/>
</column>
<!-- NEW Description -->
<column name="Description">
<data type="text" value="overview_description"/>
</column>
<!-- NEW Endpoints -->
<column name="Endpoints">
<!-- <data type="text" value="endpoints_endpoint1"/> -->
<!-- <data type="text" value="endpointmgt_endpointstext_endpoint1"/> -->
<data type="text" value="endpoints_endpointstext_endpoint1"/>
</column>
<column name="Service Version">
<data type="path" value="overview_version" href="#{storagePath}"/>
</column>
<column name="Service Namespace">
<data type="text" value="overview_namespace"/>
</column>
</list>
</ui>
<content>
......
</content>
</artifactType>
The column "Descrition" is filled properly, while column "Endpoints" is empty.
How to value the tag value?(data type="text" value="???????"/>) ??

You can not add unbounded table values to list view. But if you really want see the endpoint value in the list create a new text filed and replicate the same value.
<list>
<column name="Service Name">
<data type="text" value="overview_name"/>
</column>
<column name="Service Version">
<data type="path" value="overview_version" href="#{storagePath}"/>
</column>
<column name="Service Namespace">
<data type="text" value="overview_namespace"/>
</column>
<column name="Endpoint">
<data type="text" value="endpoints_endpoint"/>
</column>
</list>
and update the endpoints table like below
<table name="Endpoints">
<subheading>
<heading>Environments</heading>
<heading>URL</heading>
</subheading>
<field type="option-text" maxoccurs="unbounded" url="true">
<name label="Endpoint">Endpoint</name>
<values>
<value>None</value>
<value>Unknown</value>
<value>Dev</value>
<value>Test</value>
<value>Stag</value>
<value>Prod</value>
</values>
</field>
<field type="text">
<name label="Endpoint">Endpoint</name>
</field>
</table>
Now you can see endpoint value in the list.
To create your own RXTs please find this article.

Related

Cocos2d-x TiledMap, return a nullptr when invoking getLayer() to get the collision layer?

I have been struggling with the null pointer for hours! It happened when I used the getLayer() method to get a layer from the tiled map in cocos2d-x (the tailed map is edited using the Tailed Map Editor).
map = TMXTiledMap::create("map/map1.tmx");
map->setAnchorPoint(Vec2(0.5, 0.5));
map->setPosition(Vec2(visibleSize.width / 2, visibleSize.height / 2 - 40));
this->addChild(map, 0, 100);
collidable = map->getLayer("collide")
collidable->setVisible(false);
The program didn't find the "collide" layer (it's a tiled layer) in my tailed map. However, it indeed exists in the TMX file :
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="24" height="18" tilewidth="40" tileheight="40" infinite="0" nextlayerid="14" nextobjectid="2">
<tileset firstgid="1" name="Background" tilewidth="40" tileheight="40" tilecount="7" columns="7">
<image source="mapItems/background.png" width="280" height="40"/>
</tileset>
<tileset firstgid="8" name="tiles" tilewidth="40" tileheight="40" tilecount="16" columns="8">
<image source="mapItems/tiles.png" width="320" height="80"/>
</tileset>
<tileset firstgid="24" source="mapItems/collide.tsx"/>
<layer id="5" name="background" width="24" height="18">
<data encoding="base64" compression="zlib">
...(some code)
</layer>
<layer id="11" name="collide" width="24" height="18">
<properties>
<property name="collidable" value="true"/>
</properties>
<data encoding="base64" compression="zlib">
...
</data>
</layer>
<layer id="6" name="bricks" width="24" height="18">
<data encoding="base64" compression="zlib">
...
</data>
</layer>
<layer id="7" name="tops" width="24" height="18">
<data encoding="base64" compression="zlib">
...
</data>
</layer>
</map>
Moreover, I set breakpoint in the getLayer() method, and the program traverses and find all layers except the collide layer. Anyone can show me how to deal with this issue?
Okay, finally I solve this problem (4 hours since it occurred)... Despite I don't even know why.
The solution is editing the collide.tsx file. I tried to read it and found a sentence:
<image source="collide.png" trans=ff00ff width="40" height="40"/>
And this "trans=" seemed quite weird... So I deleted it. Then the issue was resolved.

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.

Adding New Artifact Types and New Record to Artifact Types in WSO2 Gov. Reg 4.6

I am getting an error when adding a new record to a new artifact type I created. The error is as follows
failed to add/edit artifact details. A valid qualified name was not set for this artifact
I created a new artifact type called 'Domain'. The artifact type was added but I cannot add new records to it. Get the same error as above when I add new record to Domain artifact type. My xml is attached.
<?xml version="1.0"?>
<artifactType type="application/vnd.wso2-domain+xml" shortName="domain" singularLabel="Domain" pluralLabel="Domains" hasNamespace="false" iconSet="9">
<storagePath>/domains/#{overview_domain}/#{overview_parentname}/domain</storagePath>
<nameAttribute>overview_domain</nameAttribute>
<ui>
<list>
<column name="Domain">
<data type="text" value="overview_domain"/>
</column>
<column name="Parent Domain">
<data type="text" value="overview_parentname"/>
</column>
</list>
</ui>
<content>
<table name="Domain">
<field type="options" required="true">
<name label="Domain Name">Domain Name</name>
<values>
<value>Research</value>
<value>Development</value>
<value>Medicine</value>
<value>Marketing and Sales</value>
<value>Operations</value>
<value>Enabling Functions</value>
<value>Communications</value>
<value>Human Resources</value>
<value>Finance</value>
<value>Legal</value>
<value>Purchasing</value>
<value>Information Systems</value>
</values>
</field>
<field type="options">
<name label="Parent Domain Name">Parent Domain Name</name>
<values>
<value/>
<value>Research</value>
<value>Development</value>
<value>Medicine</value>
<value>Marketing and Sales</value>
<value>Operations</value>
<value>Enabling Functions</value>
<value>Communications</value>
<value>Human Resources</value>
<value>Finance</value>
<value>Legal</value>
<value>Purchasing</value>
<value>Information Systems</value>
</values>
</field>
</table>
</content>
</artifactType>
Also I want to know if there is a thorough document describing how to add artifact types and records. As an example I added a storage path called
/domains/#{overview_domain}/#{overview_parentname}/domain
but I do not know where this points to and if this is even valid or not. The documentation in the online help is not adequate enough to add new artifact structures and records.
Thanks
Under the <ui> tag you have listed two columns. The value attribute given to each column must be in the format {basetable}_{fieldname}
Therefor the names given under each <field> must match with the value <data attribute= of corresponding <column> under <ui>.
To get rid of the error, change the name of the first field to be "Domain" so that it matches with the name that you have given in the column(i.e. overview_domain). So that the tag of the first should look like
<name label="Domain Name">Domain</name>
You should do the same for the second field too, so that the of second field must look as follows
<name label="Parent Domain Name">ParentName</name>
Kindly find the corrected domain.rxt.
To create your own RXTs please find this article.
<?xml version="1.0"?>
<artifactType type="application/vnd.wso2-domain+xml" shortName="domain" singularLabel="Domain" pluralLabel="Domains" hasNamespace="false" iconSet="9">
<storagePath>/domains/#{overview_domain}/#{overview_parentname}/domain</storagePath>
<nameAttribute>overview_domain</nameAttribute>
<ui>
<list>
<column name="Domain">
<data type="text" value="overview_domain"/>
</column>
<column name="Parent Domain">
<data type="path" value="overview_parentname" href="#{storagePath}"/>
</column>
</list>
</ui>
<content>
<table name="Overview">
<field type="options" required="true">
<name label="Domain Name">domain</name>
<values>
<value>Research</value>
<value>Development</value>
<value>Medicine</value>
<value>Marketing and Sales</value>
<value>Operations</value>
<value>Enabling Functions</value>
<value>Communications</value>
<value>Human Resources</value>
<value>Finance</value>
<value>Legal</value>
<value>Purchasing</value>
<value>Information Systems</value>
</values>
</field>
<field type="options">
<name label="Parent Domain Name">parentname</name>
<values>
<value/>
<value>Research</value>
<value>Development</value>
<value>Medicine</value>
<value>Marketing and Sales</value>
<value>Operations</value>
<value>Enabling Functions</value>
<value>Communications</value>
<value>Human Resources</value>
<value>Finance</value>
<value>Legal</value>
<value>Purchasing</value>
<value>Information Systems</value>
</values>
</field>
</table>
</content>
</artifactType>

flow in model-glue event handler

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

WS02 G-REG new metadata type

We're testing G-Reg for use of a SOA repository. The default types are Services, WSDL's, Schemas and WS Policies, we're triying to add a new type (Persons for example).
Once added, we want to create a xml to specify the fields that needs to be filled to upload a new resource of the "Persons" type, (like the Services type actual funcionality).
We've followed the guide on http://docs.wso2.org/wiki/display/Governance411/Configurable+Governance+Artifacts, but with no success of creating the example named "Events", because there exists contradictory information, the path "/_system/governance/repository/components/org.wso2.carbon.governance/types", doesn't exists on GREG 4.1.1, so where is supposed the content to be uploaded?
And, the guide explains about a "registry extension file" and a "content", which is the difference between them?, they need a name?, content.xml and extfile.xml perhaps?
Any orientation will be greatly appreciated
Thanks,
Gabriel.
Here is a sample server.rxt file I have created.
<artifactType type="application/vnd.wso2-server+xml" shortName="server" singularLabel="Server" pluralLabel="Servers" hasNamespace="false" iconSet="5">
<storagePath>/servers/#{overview_name}/</storagePath>
<ui>
<list>
<column name="Name">
<data type="path" value="overview_name" href="#{storagePath}"/>
</column>
</list>
</ui>
<content>
<table name="Overview">
<field type="text" required="true">
<name label="name">Name</name>
</field>
<field type="text" required="true">
<name label="url">url</name>
</field>
<field type="text" required="true">
<name label="username">username</name>
</field>
<field type="text" required="true">
<name label="password">password</name>
</field>
</table>
</content>
</artifactType>
you need to save this under the directory you have mentioned.
/_system/governance/repository/components/org.wso2.carbon.governance/types
this location is not exits. But you need to create this directory and save.
After restart you should see the new type under meta data list