当前位置:网站首页>Call rest port to implement nailing notification
Call rest port to implement nailing notification
2022-06-23 02:22:00 【Knowledge and action software EDI】
Nailing has become a necessary communication software for the daily work of many enterprises , Zhixing software has also made some efforts in nailing notification , Using the bridge of knowledge and action REST Port call nail robot API So as to realize the function of nail notification , So when the customer is EDI After receiving data on the system , The nailing group will also send a notification message , Customers can process information in a timely manner , Increase of efficiency .
One Create a nail robot
The nailing group has a custom robot function , This function can be used to create a nailing robot with message notification , Implement nailing notification .
1、 Open group settings , Click Add robot .
2、 Choose a custom robot
3、 Set robot name
You can customize it here, for example :【 Notice of news 】. Select the group that needs to receive the notification message , Add security settings . As shown in the figure below , Here is one out of three , Generally, you can select user-defined keywords , Note that this keyword needs to be in REST Port transmission json It's used in the file . For example, add a custom keyword :“ received ”, The message sent by this robot , Must contain “ received ” The word , To send successfully .
4、 After setting, the robot will start working
It should be noted that , The setting interface of the robot will have a access_token Of url, Copy and save , You need to use this with access_token Of url.
Two call API
At the bridge of knowledge and action REST Port settings are provided with access_token Of url, Method is :POST The head is Content_Type:application/json Another thing to note : launch POST When asked , The character set encoding must be set to UTF-8.
Configure these , The next step is to generate a copy at the end of the actual business transformation json file , This json The file needs to include the following parameters .
To implement nailing notifications , To be transmitted json The format of the file is as follows .
{
"at": {
"atMobiles": [
"180xxxxxx"
],
"atUserIds": [
"user123"
],
"isAtAll": false
},
"text": {
"content": " received 850 Receipt @180xxxxxx "
},
"msgtype": "text"
}3、 ... and Realize message transmission
1、 Nail notification - Order notification
As shown in the figure , Workflow can be built in the bridge of knowledge and action , What we want to accomplish is : For one Excel The scheme adds the nailing notification of the receiving direction demo. On normal reception X12 message , And will X12 The message is converted to XML And then through the Demo_Copy Copy a converted port xml file , Get two identical xml file . A copy continues through the normal process Excel Port and then send it to the customer's mailbox through the mailbox port , The other is for nailing notice .
But before the nail notification , You need to go through a Schedule The port is delayed for several minutes , To ensure that the real data completely enters the customer's mailbox , And then the notice of nailing . complete Schedule After the port delay, it passes Script port , Extract message name and primary key information , It can be read by the nail robot json file , And then pass by REST Port send to nail group , The function of nailing notification can be realized . The following is the interface display of several nailing notifications .
Aite's nail notice to the specific person
The nail notice of AIT's owner
Do not make any text message notification of Aite
2、 Error warning -AS2 Automatic port patrol
EDI External connection ports sometimes have problems due to various situations , For example, modify http by https after , The set... Appears SSL Certificate problem , This will lead to EDI Environment hangs up , Therefore, the nail notification function can be used for automatic patrol inspection , When something goes wrong with the environment , Users can know and handle it in time . As shown in the figure above , We are on the bridge of knowledge and action EDI Create a... On the system Script Port and AS2 port , utilize Script Port to achieve when AS2 When there is a problem with the port , Timely nail notification , It is convenient for the operation and maintenance personnel to check and correct in time . Script The specific port code is as follows :
<rsb:set attr="check.sslcert" value="*"/>
<rsb:set attr="check.url" value="AS2URL"/>
<rsb:call op="httpGet" in="check">
<rsb:catch code="*">
<rsb:set attr="notify.url" value="【 Nail custom robot url】"/>
<rsb:setm item="notify">
url = nail 【 Nail custom robot url】
postdata = {"at": {"atMobiles":\["【 By @ Man's cell phone number 】"\],"isAtAll": yes 【 no @ All the people , Is for true, No is false】},"text": {"content":" Business alerts :AS2 Port not accessible , Please check immediately ![_message | def]"},"msgtype":"text"}
contenttype = application/json
</rsb:setm>
<rsb:call op="httpPost" in="notify" />
</rsb:catch>
</rsb:call>
<rsb:set attr="o.FileName" value="[_|now]" />
<rsb:push item="o"/>among ,postdata The content in is to call the nail robot json The contents of the document . Examples of alarms :
such , adopt REST The function of port calling nail notification can be realized , Users pass the bridge of knowledge and action EDI When the system sends and receives data , You can receive notification messages in the nailing group in time , Ensure that information is processed in a timely manner , Improve response efficiency .
边栏推荐
- Digital integrated circuit design process
- Buuctf misc-[bjdctf2020] Nani
- SAP WM cannot automatically obtain the special movement mark in the material master data when receiving Po goods?
- 5g access network and base station evolution
- Ansible practice of Nepal graph
- Spread spectrum and frequency hopping
- 2022-1-14
- Use of apicloud AVM framework list component list view and flex layout tutorial
- 1. Mx6u bare metal program (2) - Lighting master (imitating 32 register version)
- C language games: sanziqi (simple version) implementation explanation
猜你喜欢

Ansible practice of Nepal graph

Information theory and coding
![Buuctf misc-[actf freshman competition 2020]outline](/img/a4/ac9d14a69e0759d1e7c65740415bf7.jpg)
Buuctf misc-[actf freshman competition 2020]outline

How to make word notes beautiful

2022-1-12

1. Mx6u bare metal program (2) - Lighting master (imitating 32 register version)

Freshman C language summary post (hold change) Part1 output diamond

Performance testing -- Interpretation and practice of 16 enterprise level project framework

Branch and loop statements (including goto statements) -part1

Nfv and SDN
随机推荐
Error in OpenCV image operation: error: (-215:assertion failed)_ src. empty() in function ‘cv::cvtColor‘
JS advanced part
The commercial s2b2b e-commerce platform of aquatic industry improves the competitiveness of enterprises and creates a strong engine for industrial development
Arm assembly syntax
Analysis of resolv Conf common parameters
C language games: sanziqi (simple version) implementation explanation
WebService details
Aikuai multi dialing + load balancing overlay bandwidth
Bubble sort - double for implementation
Single chip microcomputer (STC series 8051 core single chip microcomputer)
Practice and exploration of vivo live broadcast application technology
SAP WM cannot automatically obtain the special movement mark in the material master data when receiving Po goods?
Exploit format string vulnerability in CDE
How to make a borrowing card
JS to realize the rotation chart (riding light). Pictures can be switched left and right. Moving the mouse will stop the rotation
"Initial C language" (Part 1)
How to design API return codes (error codes)?
Push RTMP stream using ffmpeg
Mobile communication Overview - Architecture
Function part