- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-04-2023 05:32 AM
I am working on a new automation which gets triggered dynamically from layout where in I need to check a custom attribute has changed in my remote machine, then update it on the xsoar incident. The custom attribute is a list/array. This is what I am doing in the automation...if len(oldAnomalies) != len(jsonResponse):
# Update the new anomalies on this incident
# demisto.executeCommand("setIncident", {"id": incident['id'], "gracaseanomalydetails": []})
execute_command("setIncident", {"id": incident['id'], "gracaseanomalydetails": jsonResponse})When I ran for first time, oldAnomalies count were say 10 in number and jsonResponse had 8 entries. The problem is that executeCommand is updating the incident but when I refresh, it still says that oldAnomalies count is 10 while new is 8. If I change jsonResponse to have 4, it would update the xsoar incident but upon refresh, it would still say oldAnomalies count as 10. I have tried with both demisto.executeCommant and enecute_command. Am I missing something in this? Is there a way we can commit after setIncident is called?
01-09-2023 09:49 PM
I had asked this question on slack and it is resolved now. Thanks your your time.
01-09-2023 05:51 PM
Hi @sudhesub,
I think we might need more information before we can offer a solution. Maybe just add the automation to the question?
I don't see any issue with your execute_command call.
01-09-2023 09:49 PM
I had asked this question on slack and it is resolved now. Thanks your your time.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!