maximo anywhere adding new view not working - maximo-anywhere

I am trying to add a new view in our application. For time being adding this view as the first page in the app. Created necessary OSLC resources in maximo and also verified that I am able to view the data by hitting the URL (ip,userid,pw removed intentionally).
http://{ipaddress}:7001/maximo/oslc/os/ABS_VERI_POINTS?_lid={maximoadminuser}&_lpwd={maximoadminpw}&oslc.select=*
I have also added the view and the resources in app.xml file but when I am logging in to the application it gives me the following message
"WorkList Record Could Not be Downloaded. If Problem persists, Contact your administrator"
After than it landed up into the view with No data. Upon inspecting the UI in browser I noticed I am getting the following error
Procedure invocation error. Runtime: Failed to parse JSON string
Error 404--Not Found
....
....
Resource Data in app.xml is as follows
<resource describedBy="http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#ABS_VERI_POINTS" id="resabsVP" name="resabsVP" providedBy="/oslc/sp/SmarterPhysicalInfrastructure">
<attributes id="absVPAttrs">
<attribute describedByProperty="spi:parent" id="vpparent" name="parent"/>
<attribute describedByProperty="spi:location" id="vplocation" name="location"/>
<attribute describedByProperty="spi:assetnum" id="vpassetnum" name="assetnum"/>
<!-- attribute describedByProperty="spi:abs_verification_pointsid" id="vpabsvpid" name="absvppointsid" -->
<attribute describedByProperty="spi:taskid" id="vptaskid" name="taskid"/>
<attribute describedByProperty="spi:description" id="vpdescription" name="description"/>
<attribute describedByProperty="spi:wonum" id="vpwonum" name="wonum"/>
</attributes>
<queryBases id="absvpqry">
<queryBase id="absvpqry1" name="getabsvp" queryUri="oslc/os/ABS_VERI_POINTS" />
</queryBases>
</resource>
View in app.xml as follows
<view id="absVPview" label="ABS Verification Points">
<requiredResources id="absVPAttrs11">
<requiredResource name="resabsVP" id="resabsVP11">
<requiredAttribute id="vpdescription1" name="description"/>
<requiredAttribute id="vpwonum1" name="wonum"/>
<requiredAttribute id="vpparent1" name="parent"/>
</requiredResource>
</requiredResources>
<list id="VP.abs_veri_points_list" resource="resabsVP" >
<listItemTemplate id="VP.abs_veri_points_list_listItemTemplate" layout="InspectionListItem">
<listtext id="VP.abs_veri_points_list_vpid" resourceAttribute="description" layoutInsertAt="item1"/>
<listtext id="VP.abs_veri_points_list_wonum" resourceAttribute="wonum" layoutInsertAt="item2"/>
<listtext id="VP.abs_veri_points_list_parenttext" resourceAttribute="parent" layoutInsertAt="item3"/>
</listItemTemplate>
</list>
</view>
Can you please give any clue whats going wrong here

Can you open a PMR on this with our support? This may be a bug where we're not correctly handling underscores in our OSLC request url to retrieve data. Also, check the URL that is failing in your javascript console, just to make sure that it's really this resource throwing the 404 exception. You might check the network tab of the debugger to see that.

#MDutta,
If the issue is in the object/attribute using underscore ("_"), you can fix this by updating the xsd validation file located at ..\Anywhere\lib\codegen\artifac-processor-7.5.2.jar.
Unzip this file and open the app.xsd located: ..\resource\xsd\app.xsd. Modify the validation
From:
<xs:simpleType name="string">
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z][a-zA-Z0-9]+"/>
</xs:restriction>
</xs:simpleType>
To:
~dk

Related

Atom.io Download not working: This XML file does not appear to have any style information associated with it.

When I try to download Atom from Atom.io, I get this error message:
This XML file does not appear to have any style information associated with
it. The document tree is shown below.
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>
releases/untagged-2abd5a23b4430027c837/atom-mac.zip
</Key>
<RequestId>98BB6E3B14114B49</RequestId>
<HostId>
Os6+3SN9TYjh70tPusdHD1Ne2vpnDROISBJLZsCSaS0EfKhq6Q3qePRBbya62xoS9fP2irq+tf4=
</HostId>
</Error>
I have no idea what's wrong, this has never happened before. Please let me know what I need to change in order to download Atom! Thanks for any help.
For some reason it is fixed, I just went back to the website and it worked. Magic!

Property tokenised set false not works

I change property by adding tokenised as follows:
<property name="sci:doc">
<type>d:text</type>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
</property>
After fully rebuilding the index and restarting alfresco I searched in node browser using Lucene like this:
PATH:"/app:company_home/app:guest_home/cm:mySpace/*" AND (#sci\:doc:'my doc')
But no result was returned. I also tried (#sci\:doc:'my') OR (#sci\:doc:'doc'). This all failed.
I'm using 3.4.d. I found any property that sets <tokenised> to false has this issue: Search always returns nothing!
I tried alfresco-fts search in node browser, it works for the tokenized property above, but I'm using Alfresco web service, the default QUERY_LANG_LUCENE is lucene. I cannot switch to alfresco-fts.
Any idea how to solve this?

Alfresco FormService Fundamental WRONG

Alfresco Forms Service does not work properly.
Looks like a fundamental Form functionality does not pass form configs (control-param name="nameHere") to webscripts.
I reproduce it step-by-step.
Create the Freemarker template and register it according to the documentation under /share project. The component renders and shows successfully. Everything works well.
Create a form according to the documentation on wiki Forms page.
Register it in <TOMCAT_INST/shared/classes/alfresco/web-
extension/myclok-form-config.xml> directory and pass it for load in such manner:
<bean id="sampleShareConfig" class="org.springframework.extensions.config.ConfigBootstrap" init-method="register">
<property name="configService" ref="web.config" />
<property name="configs">
<list>
<value>classpath:alfresco/web-extension/myclok-form-config.xml</value>
</list>
</property>
</bean>
<!-- ... share/WEB-INF/classes/org/springframework/extensions/surf/bootstrap/forms-bootstrap-context.xml -->
Form inst:
<config>
<forms>
<form id="myclok">
<view-form template="/org/alfresco/components/myclok/myclok.get.html.ftl" />
<edit-form template="/org/alfresco/components/myclok/myclok.get.html.ftl" />
<create-form template="/org/alfresco/components/myclok/myclok.get.html.ftl" />
<field-visibility>
<show id="currentPath" />
</field-visibility>
<appearance>
<field id="currentPath">
<control name="currentPath" template="/org/alfresco/components/myclok/myclok.get.html.ftl">
<control-param name="currentPath">sampleData1</control-param>
</control>
</field>
<control name="currentPath" template="/org/alfresco/components/myclok/myclok.get.html.ftl">
<control-param name="currentPath">sampleData2</control-param>
</control>
</appearance>
</form>
</forms>
</config>
In official documentation is written:
If the form element exists within a config element without an
evaluator and condition the form is always found, this is useful if
you want a certain field to appear on EVERY form in your application.
So, I specified it in myclok-form-config.xml file, but this approach does not give any result. Thus when the component with such reference to param is loaded by the following URL <http://localhost:8080/share/page/site/wcmqs/myclok> the Alfresco fails with the Exception:
Exception: freemarker.core.InvalidReferenceException - Expression field is undefined on line 6, column 6 in org/alfresco/components/myclok/myclok.get.html.ftl.
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:135)
freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
In other words it's impossible to receive the value of the parameter of currentPath that is defined in FormConfigs.
So, the minimal functionality of FormsService / ConfigService does not work.
<#if field.control.params.currentPath??>
<#assign path=field.control.params.currentPath>
<#else>
<#assign path="someOtherDataValue">
</#if>
Does anyone know how to resolve it Or can demonstrate a working sample?
PS: All above described configurations of the form of FormService and the webscript component are attached.
The .AMP file for quick installation is required just to invoke the following command:
java -jar alfresco-mmt.jar install myclokStubFormComponent.amp ../tomcat/webapps/share.war
AMP file.
Config file.
I think you have mis-understood the difference betweent a form template and a field template. You are specifying the same file /org/alfresco/components/myclok/myclok.get.html.ftl to control the layout of the form as well as to render your fields.
When you use a field template to render the form you are getting an error that says the field object has not been populated. This is quite correct as the framework has not yet started to render the individual fields. You are rendering the form.
I'd suggest you try some more basic examples such as those that come with the Forms Development Kit (FDK) before you start implementing your own more complex forms, and especially before you begin to claim that the framework does not work as documented.

ccnet not deleting buildlogs

I Have the following in my ccnet.config file
....
<publishers>
<xmllogger />
</publishers>
<tasks>
<artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="5" />
....
However the build logs never get removed? Am I misunderstanding this? I would expect never seening more then 5 log files in there.
According to documentation you must put the artifact cleanup publisher in the publishers section for it to work:
<publishers>
<xmllogger />
<artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="5" />
</publishers>

Group testNG tests without annotations

I'm responsible for allowing unit tests for one of ETL components.I want to acomplish this using testNG with generic java test class and number of test definitions in testng.xmlpassing various parameters to the class.Oracle and ETL guys should be able to add new tests without changing the java code, so we need to use xml suite file instead of annotations.
Question
Is there a way to group tests in testng.xml?(similarly to how it is done with annotations)
I mean something like
<group name="first_group">
<test>
<class ...>
<parameter ...>
</test>
</group>
<group name="second_group">
<test>
<class ...>
<parameter ...>
</test>
</group>
I've checked the testng.dtd as figured out that similar syntax is not allowed.But is therea workaround to allow grouping?
Thanks in advance
You can specify groups within testng.xml and then run testng using -groups
<test name="Regression1">
<groups>
<run>
<exclude name="brokenTests" />
<include name="checkinTests" />
</run>
</groups>
....
No, this is not possible at the moment.
As a rule of thumb, I don't like adding information in XML that points into Java code, because refactorings might silently break your entire build.
For example, if you rename a method or a class name, your tests might start mysteriously breaking until you remember you need to update your XML as well.
Feel free to bring this up on the testng-users mailing-list and we can see if there's interest for such a feature.
--
Cedric

Resources