How to debug bots
# support
m
Hi there, I am trying to create a custom bot for our service and have a few questions below. 1. how to debug the bot? I am currently console the logs by deploying the bot whenever I make changes and this is so uncomfortable 😦 2. When does the bot works? The bot is triggered by subscription, and the subscription is triggered when the resource that is indicated in
criteria
is created or updated. Or is that triggered whenever the resources are created or updated? 3. The data saved by the bot is in XML. So I will have to parse the XML to JSON first, and then transform to FHIR resources. I want to use that transformation with the bot... could you tell me how I can do this..? The parsing will be processed in the front.
2 and 3. solved... I wasn't fully understand the concept of
creteria
.
r
You should check out our guide on unit-testing bots! https://www.medplum.com/docs/bots/unit-testing-bots
Lots of practical advice on how to use the MockClient to simulate bot execution, and write robust unit tests
182 Views