We need help and guidance to build our own Custom Connector / service Task that achieve the following :
We have a Kiosk Hardware machine that performs multiple tasks,
The API layer to control and interact with machine is written using WebSocket
We send Json request to WebSocket server , it controls the machines and return certain Json reply
here are some examples :
WebSocket Request :
{
“seq”:“ResetDevice_82ffb443-b523-42ac-89ef-46dc5672be4”,
“cmd”:“perso”,
“params”:{“act”:“ResetDevice”,“mode”:1,“RWpos”:2},
“Timeout”:“300000”,
“posidx”:“00”
}
WebSocket Response :
{
“Timeout”: “”,
“cmd”: “perso”,
“code”: “0”, /// 0 mean success , if any other value , it will be error code
“data”: {
“mCheckResult”: “10100000000000000000000000001101101001010111011100000111000011101111110001010011111000000100000001000000100010100111001000000010111111111111101101101111111111101101101100111100101010001111010101001101001010001”
},
“datetime”: “20240708060111”,
“msg”: “”,
“posidx”: “00”,
“seq”: “ResetDevice_82ffb443b52342ac89efa46dc5672be4”
}
another call ,
request :
{
“seq”: “OpenScanner_7000b568-756d-46cd-b950-d0fa0707cd69”,
“cmd”: “startdevice”,
“posidx”: “00”
}
response :
{
“Timeout”: “”,
“cmd”: “startdevice”,
“code”: “0”, /// 0 mean success , if any other value , it will be error code
“data”: {
“asd”: “”
},
“datetime”: “20240708083416”,
“msg”: “”,
“posidx”: “00”,
“seq”: “OpenScanner_7000b568756d46cdb950d0fa0707cd69”
}
we need to build a service task / connector that do some custom business logic and return result codes or certain error if exit , as shown above
we need to use the custom connector / service task inside desktop modeler