intra-mart Accel Platform / IMBox Extended Programming Guide

«  Introduction   ::   Contents   ::   Message Type Addition Program  »

Application Linkage Program

Summary

Following are the examples of processes that can be made by utilizing APIs provided by intra-mart in the uniquely created applications.
  • Post notification message of application to ApplicationBox
  • Watch Application Information
  • Post Message from Application Information Watched to ApplicationBox

Sample Implementation

This sample describes the implementation method of the function to give notification from the product management system to ApplicationBox.
application1

Creation of Setting File

Please set the following file in the created application to do linkage with the application.
Example of Setting File
src/main/conf/imbox-application-config/seihin.xml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<?xml version="1.0" encoding="UTF-8"?>
<tns:imbox-application-config
    xmlns:tns="http://www.intra-mart.jp/imbox/imbox-application-config"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.intra-mart.jp/imbox/imbox-application-config ../../schema/imbox-application-config.xsd ">

  <tns:application
        applicationCd="seihin" 
        applicationName="CAPTION.IMBOX.SEIHIN" 
        iconPath="application/appli.png" 
        messageTypeCd="MESSAGE_TYPE_MESSAGE" />
</tns:imbox-application-config>
Following attributes are set in the <tns:application> tag.
Attributes Contents
applicationCd Application Identification ID
applicationName Property ID of Application Display Name
iconPath Path of Application Display Image
messageTypeCd Message Type Identification CD

Column

  • In case iconPath has not been specified, default icon image offered by IIMBox is applied.
  • In case iconPath is specified, please set the image in the Storage area.
  • In case MESSAGE_TYPE_MESSAGE  is set to messageTypeCd, it is displayed on the timeline
    in the message format offered by  IMBox.
  • If you want to display in the ApplicationBox in your own format, please add the message type and the
    message type identification CD of the added message.
  • Please refer to  Message Type Addition Program for addition of message types.
In case iconPath is not specified
application7
In case iconPath is specified
application8

Posting Process to ApplicationBox

Notification from the application with which application linkage has been set is posted to ApplicationBox.
Please implement the following process for the timing when the application notification is needed.
Implementation Example
 imbox.ApplicationBoxService#sendNoticeMessage()  is used to post a message to IMBox.
src/main/jssp/src/kintai/register.js
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
   function  send(){
     var applicationBoxService = new imbox.ApplicationBoxService();
     var message = {
         applicationCd : 'seihin',
         sendUserCd    : 'aoyagi',
         messageText   : 'Product Information was registered.',
         messageTypeCd : 'MESSAGE_TYPE_MESSAGE',
       };
     applicationBoxService.sendNoticeMessage(message, ['sekine']);
   }
Following parameters are set as Notification Message Information.
Parameter Contents
applicationCd Application Identification ID
sendUserCd Send  User Code
messageText Message for Display
messageTypeCd Message Type Identification CD

Column

  • Identification ID for each information that does the watching in application is set to the second argument.
  • The sample above sets only 1 ID, but multiple Identification IDs can be specified.
After the process listed above is completed, registration notification of the product information for Ms. Sekine (sekine) is displayed
in the ApplicationBox as shown below.
application2
application3

Implementation of Watch Process of Application Information

This is a sample of implementation that watches application information.
When the application is being watched, notification is given to ApplicationBox, if there is a change in the application information that is watched.
Please implement the following process to the application information to be watched.
Implementation Example
 imbox.ApplicationOperations#watch()  is used to watch the application.
src/main/jssp/src/kintai/watch.js
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  function  watch(){
    var applicationOperations = new imbox.ApplicationOperations();
    var applicationCd = 'seihin';
    var entry4Targets = [];
    entry4Targets.push({
        targetId   : 'iac',
        targetName : 'Accel Collaboration'
      });
    applicationOperations.watch(applicationCd,entry4Targets);
  }
Following parameters are set as Watch Information.
Parameter Contents
applicationCd Application Identification ID
targetId ID of the Watch Target
targetName Name of the Watch Target

Column

  • Identification ID for each information that does the watching in application is set to the second argument.
  • The sample above sets only 1 ID, but multiple Identification IDs can be specified.
  • Please use imbox.ApplicationOperations#unwatch()  to remove the Watch.
After the process listed above is completed, following is displayed on [ IMBox List] > [Watch Application Screen].
application4
application5

Posting Process from Application Watched to ApplicationBox

This is a sample of implementation that posts message to ApplicationBox from the Application Information watched.
If there is a change in the application information for which Watch was implemented, notification is given to the ApplicationBox.
Please implement the following processes at the update timing of application information.
Implementation Example
imbox.ApplicationBoxService#sendWatchMessage() is used to post the message to IMBox.
src/main/jssp/src/kintai/update.js
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  function  sendWatcher(){
    var applicationBoxService = new imbox.ApplicationBoxService();
    var targetId = 'iac';
    var message = {
        applicationCd : 'seihin',
        sendUserCd    : 'aoyagi',
        messageText   : 'Accel Collaboration information has been updated.',
        messageTypeCd : 'MESSAGE_TYPE_MESSAGE',
      };
    applicationBoxService.sendWatchMessage(message, [targetId]);
  }
Following are set as Watch Notification Message Information.
Parameter Contents
applicationCd Application Identification ID
sendUserCd Send User Code
messageText Message to be Displayed
messageTypeCd Message Type Identification CD
targetId ID of Application Information to be updated (ID of Watch Target used by Watch)
When the process listed above is completed, update notification of  Accel Collaboration will be displayed in the
ApplicationBox of the user who did the watch.
application6

Column

  • This time  threadSummarizeCd  is not used as an argument when sending notification message and
    watch notification message.  By specifying the threadSummarizeCd, messages can be displayed in the
    thread format for each threadSummarizeCd.

«  Introduction   ::   Contents   ::   Message Type Addition Program  »