Search This Blog
Thursday, October 19, 2017
Add embedded YouTube videos to any Maximo / SmartCloud Control Desk application
The following article will show you how to create a custom
control wrapper for an embedded YouTube player.
1. Create
the control and component registry declarations for the new control
The main registries are located in (all paths are relative
to the installation directory/application server deployment location):
applications/maximo/properties/product/control-registry.xml
applications/maximo/properties/product/component-registry.xml
We'll declare our new control in a registry extension in
order to keep the main registries clear. Registry extensions are placed in the
following location:
applications/maximo/properties/registry-extensions
Find the complete Control and Component registry files in
Tables 1 & 2.
2. Create
JavaServer Page (JSP) wrapper
The JSP file name is defined in the component registry xml;
'video' below corresponds to video.jsp:
="jsp-filename">
ault-value>video
fault-value>
All component JSP files are placed in the following
location:
applications/maximo/maximouiweb/webmodule/webclient/components
Find the complete video.jsp file in Table 3 below.
• Find the YouTube
video you want to embed and retrieve the associated metadata
a. I'll use the following video as an example: navigate to
YouTube by clicking the link:
http://www.youtube.com/watch?v=5KLnuaSJxG8
b. Click on 'Share' then click on 'Embed'
c. Note the width, height and src attributes, they will be
used in step #4.
width="560" height="315"
src="//www.youtube.com/embed/5KLnuaSJxG8"
• Add the control to
an existing application
Finally, we add the control element to an existing
application. For example, if you wanted to add a quick tutorial video to the
incident application for new service desk agents:
a. Go To → System Configuration → Platform Configuration
→ Application Designer
b. Search for application 'INCIDENT'
c. Export application XML
d. Find an appropriate place for the video (such as a new
tab) and add the following element (by default the example below will render a
SmartCloud Control Desk video
NOTE: According to the component description, the element
must be enclosed in one of the following element containers:
section, sectioncol, sectionrow, tab, page
f. Save and import the XML file.
• Finished
Table 1: control-registry_video.xml
dir="webclient\controls"
package="psdi.webclient.controls">
riptor-class="psdi.webclient.system.runtime.DatasrcDescriptor"
instance-class="psdi.webclient.system.controller.DatasrcInstance">
="jsp-filename">
ault-value>video
fault-value>
ontrol-descriptor>
Table 2: component-registry_video.xml
dir="webclient\components"
package="psdi.webclient.system">
mponent-descriptor
name="video">
="jsp-filename">
fault-value>video
efault-value>
omponent-descriptor>
mponent-registry>
Table 3: video.jsp
<%@ include
file="../common/componentheader.jsp"%>
<%
String pageid =
control.getPage().getId();
MboRemote mbo =
control.getPage().getDataBean().getMbo();
String src =
control.getProperty("src");
String height =
control.getProperty("height");
String width =
control.getProperty("width");
%>
Skip fields during duplication
This
article describes how to skip the user-defined fields during duplication of a
record.
To
skip the user-defined fields during duplication of a record, complete the
following steps:
- Extend
the existing MBO class, for example XYAsset.java
- Define
a static HashSet that contains the names of the fields whose values need
not be copied from the source MBO to the target MBO. This HashSet is
loaded in the loadXYSkipFieldCopyHashSet.
·
private static
HashSet<String> skipXYFieldCopy = new
HashSet<String> ();
- Define
private boolean variable to check whether the HashSet has already been
loaded. The HashSet is loaded only once since it is static. The same
hashSet can be used by all duplicate methods after it has been loaded.
·
private static boolean
isXYHashSetLoaded = false;
- Define
method loadXYSkipFieldCopyHashSet() that loads the static
HashSet with the names of the fields whose values need not be copied from
the source Mbo to the target Mbo when a duplicate operation is performed.
private static void
loadXYSkipFieldCopyHashSet() throws MXException,RemoteException
{
isXYHashSetLoaded = true;
skipXYFieldCopy.add("fieldname");
}
Override the skipCopyField() in the
MBO. While this MBO is being copied, this method checks if each attribute needs
to be copied by using the data from the static HashSet skipXYFieldCopy.
boolean
skipCopyField(MboValueInfo mvi) throws RemoteException, MXException
{
if(super.skipCopyField(mvi))
{
return true;
}
if(skipXYFieldCopy.contains(mvi.getName()))
{
return true;
}
return false;
}
Override duplicate method in the MBO to
skip any user defined fields.
MboRemote duplicate()
throws MXException, RemoteException
{
if(!isXYHashSetLoaded)
{
loadXYSkipFieldCopyHashSet ();
}
MboRemote dup = super.duplicate();
return dup;
}
MEA Web services do not automatically redeploy when application server restarted
Problem(Abstract)
Looking at your Maximo interfaces, the "deployed as web service" checkbox is checked, but the web service is not available for use.
Resolving the problem
WebSphere:
A generic JVM argument is required to be set for the JVM to automatically redeploy the web services after the application server is restarted.
In the WebSphere console, navigate to your application server instance.
On the right side of the screen select "Java and Process Management"
Then, select "Process Definition"
Under additional properties, select "Java Virtual Machine"
In the "Generic JVM Arguments" field, add the following parameter:
-Daxis.EngineConfigFactory=psdi.iface.webservices.WSEngineConfigFactory
Restart the application server.
WebLogic:
Modify your service script to add the axis engine class, following the instructions below:
1. from the bea/user_projects/domains/mydomain folder, run uninstallservice.cmd
2. Edit the file in the same folder called installservice.cmd using a text editor
3. Locate the "set CMDLINE" section of the file (you will see two so both lines should be modified to include the Java option).
Modify the command line to look as it does below (note that weblogic.Server must be the last entry on the line.
BEFORE:
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"
AFTER:
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" -Daxis.EngineConfigFactory=psdi.iface.webservices.WSEngineConfigFactory weblogic.Server"
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" -Daxis.EngineConfigFactory=psdi.iface.webservices.WSEngineConfigFactoryweblogic.Server"
4. run installservice.cmd and start the service.
Your web services should now deploy automatically upon a restart.
If starting WebLogic from a command line, edit the start script you use to start the application server in the same manner as above, making sure that weblogic.Server is the last entry on the command line in the script.
Friday, October 13, 2017
Enabling SSL At HTTP Web Server level
Steps :
1.
Open the Key Management tool from window start
menu
2.
Click New
3.
From the List of Key Database Type select the
CMS.
4.
Enter the File Name.
5.
Create a New Folder in HTTP Server folder and
store the .kdb file as shown in the above screen.
Note: Don’t
overwrite Existing key.kdb file.
6.
Click ok and provide the password .select the
Stash password to file option.
7.
Select the Personal Certificates option and
click Import.
8.
Select the PKCS12 option and brows the
certificate and click ok.
9.
Enter the private key password.
10.
Once certificate is imported, it will display
the Private key and Public key. Select all and click ok.
11.
Click Ok.
HTTP Server
Configuration
1.
Go to Http Server Folder E:\IBM\HTTPServer\conf
Open the httpd.conf file uncomment
the below lines.
LoadModule
ibm_ssl_module modules/mod_ibm_ssl.so
Listen
0.0.0.0:443
## IPv6
support:
#Listen
[::]:443
SSLEnable
SSLProtocolDisable
SSLv2
Key File
E:/IBM/HTTPServer/SSL/key.kdb (Add the kdb file which you created in the above
steps in this scenario sawkey.kdb)
#SSLDisable
# End of
example SSL configuration
WebSphere
1)
Login
into Web sphere console.
2)
Click
the serversà Webserver
3)
Click
the webserver1
4)
Under
ports section click the details
5)
Click
the Webserver_address and change the port number from 80 to 443.
6)
Click
Apply and save the configuration.
7)
Restart
the HTTP Webserver and Restart the Application server.
8)
Click
the Serversà Websphere application servers.
9)
Under
Server Infrastructure à Java Process Management à Click the Process definition
10)
Click
the Java virtual machine
11) Click the Custom properties
12)
Click
new and add the below property.
Value: false
13)
Apply
and save the configuration.
14)
Copy the axis2.xml file from:
IBM\SMP\maximo\applications\maximo\businessobjects\classes\psdi\iface\webservices
and paste it in the following directory:
\IBM\SMP\maximo\applications\maximo\meaweb\webmodule\WEB-INF\conf
\IBM\SMP\maximo\applications\maximo\meaweb\webmodule\WEB-INF\conf
Note that the conf directory does not exist and must be created before pasting the file
there.
Step9: Now edit the axis2.xml in the conf directory, and add the following block of text to enable the https transport in the axis2.xml
Step9: Now edit the axis2.xml in the conf directory, and add the following block of text to enable the https transport in the axis2.xml
15)
Rebuild the maximo.ear using the buildmaximoearwas8.cmd
16)
Redeploy the maximo.ear and test.
Maximo Properties
Ø
mxe.int.webappurl Change the URL http to https
EX: http://servername /meaweb/
TO
https://servername /meaweb/
Ø
mxe.report.birt.viewerurl Change the URL http to
https
EX: http://servername. /maximorpt/report
TO
https://servername /maximorpt/report
Web Services Issues after Maximo upgrade from 7.1 to Maximo7.6.0.8
Issue:
Web services issues after upgrade From 7.1 to 7.6
Solution:-
1. Delete all the web services from
Maximo
2. Recreate all the web services and
Re generate the XML
3. Check in the browsers
Ex: http://serverhost:portnmber/meaweb/services/web
servicename?wsdl
4. Add the new property in Web
sphere server
Application
servers > MXInt_Cluster_01 > Process definition > Java Virtual Machine
> Custom properties
Property Name: webservices.unify.faults
Value : false
5.
Check
the below System Properties in Maximo
mxe.int.resolveschema
=1
6.
Test
the Web services
Monday, March 9, 2015
Using conditional expressions for classifications
Prevent users from selecting some classifications but you cannot delete the classifications
- Description: As part of the implementation process, one of the tasks a customer completes is creation of the classification hierarchy. When classifications that made sense when you went through implementation no longer make sense, what can you do? You might delete the classifications that are not applicable. But if those classifications have been associated with item, you cannot delete them. You could also tell your users not to use the classifications or find every ticket that the classifications were applied to and delete them from the ticket. But both solutions have problems either from a usability perspective or from a data integrity perspective.
- Issue: You cannot delete a classification when it has been used in applied to an item.
- Solution overview: Use the configuration tools to enable an object restriction-based solution to hide the designated classifications from users, effectively preventing users from selecting them.
Solution
There are two parts to the solution because there are two fields in
the application that are available for looking up classifications.
- Hierarchical lookup is available from the Detail menu on the Classstructure.Hierarchypath field. Restrict the lookup at the highest level you wish to hide, and everything below in the hierarchy is hidden.
-
A Select Value item is available from the Classstructure.Description_Class You must restrict the individual classifications.
Restrict the lookup
In this example, classifications that are marked with the HIDE
attribute (:hide=1) are not displayed to any agents of the Service Desk
Rep (Tier 1) Service Group.
- In the Database Configuration application, add a YORN attribute called HIDE to the Classstructure record. This attribute will be used to specify the classifications to hide from the user.
- In the Application Designer, open the Classifications application.
-
Add the HIDE attribute to the application.
-
In the Conditional Expression Manager, create the expression
:HIDE=0. For information about building conditional expressions, see the
Conditional Expression Manager online help.
-
Open the Security Groups application.
-
Create a security group called SDRep1 to add users to that group.
Or - Add an object restriction to an existing group to restrict all users in that group.
-
Create a security group called SDRep1 to add users to that group.
- On the Data Restrictions tab, select the Object Restrictions tab.
- In the Object field, specify the Classstructure object.
-
In the Condition field, click Detail menu and choose Select Value to select the expression :Hide=0.
Hide a classification
In this example, Hide is selected for the top-level classification "End User Issues".
Results
The results differ depending on the type of lookup from the field.
- From the Classification field, all classifications below the hidden classification are hidden.
- From The Class Description field, only the hidden classification is hidden.
You can synchronize these fields in two ways:
- Select Hide for all the classifications in the hierarchy.
-
Remove the lookup from the Class Description field.
Classification Field Hierarchical Lookup - Nothing below the hidden classification is available
Class Description Field - Only the hidden classification is not
available. Any child classification with the terms "END USER" are still
available.
Filter items by classification at a more granular level than at the application level
- Description: Acme Service Desk distributes their incoming tickets based upon the initial classification selected by the self-service user. The default ownergroup for that classification is assigned to the ticket, when the classification is selected by the user. Ownergroup A is assigned to any ticket that has a classification that begins with a 1, 2, or 3. Ownergroup B is assigned to any ticket that has a classification that begins with a 4, 5, or 6. When agents of the service desk in ownergroup A log in, they see all tickets currently assigned to them and to any group they belong to. They select a service request and begin working on it. Part of their work is to validate that the proper classification was used and the appropriate level of classification was selected. When evaluating the classification, the agents are presented not only with the classifications they are assigned to (those beginning with 1, 2, or 3), but also the classifications that are the responsibility of ownergroup B. What do you do when you want the agents to see tickets only with the classifications their group is responsible for?
- Issue: The classification Use with flags are at the application level. You require a more granular solution.
- Solution overview: Filter the classification presentation based on security group ownership by setting a restriction.
Solution
Create a security group with a defined Object Restriction for the
Classstructure object. Create a conditional expression to present
certain nodes of the Classstructure object, based upon classificationid.
Finally, we associate the user's record to the new Security Group.
This example restricts Sinclair from seeing classification nodes
other than 1 and 2. Before the change, Sinclair has access to all
incident-related classifications.
Create the restriction
- Open the Security Groups application.
- Create a security group called Class1and2.
- On the Data Restrictions tab, select the Object Restrictions tab.
- In the Object field, specify Classstructure.
-
In the Condition field, click Detail Menu and specify an expression that shows Classifications that start only with 1 or 2.
For example, :classificationid like '1%' or classificationid like '2%'Tip Make the restriction expression as specific as you need to support which groups need to see which classifications. - Add the user Sinclair to the group.
-
In the Conditional Expression Manager, create an expression that matches the Object Restriction you created.
For information about building conditional expressions, see the Conditional Expression Manager online help.
Test the restriction
- Log in as Sinclair
- From the Incidents application, create an incident
- In the classification field, select Classify. Only Classification nodes 1 and 2 are available.
Subscribe to:
Posts (Atom)
MAS and Manage custom resources are not reconciled
After a change was applied to IBM Maximo Application Suite (MAS) or IBM Maximo Manage, the custom resources are not reconciled. For exampl...
-
Queues The IBM Maximo uses these queues for data integration purposes: Inbound sequential (sqin) - Maximo sequential queue used for...
-
Application Event Model Overview Events are sent to the user interface framework whenever an end user clicks a toolbar button in th...
-
Here is the sample code. ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23...