question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use Update Activity and Delete Activity actions

See original GitHub issue

Describe the bug

I’m trying to use the Update Activity action to update an activity send before. The action accepts an Activity Id, but it’s not clear where to get the Activity Id from. The watermark suggests =dialog.lastActivityId but that property never gets polulated.

Version

1.1.1

OS

  • macOS
  • Windows
  • Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Create an empty bot with an unknown intent trigger
  2. Add a Response action
  3. Add an Update Activity action and set Activity Id to =dialog.lastActivityId
  4. Run in the emulator and type something
  5. See the error 'activityId' cannot be null.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dmvtechcommented, Oct 7, 2020

Ok, I am able to get the activity ID. But I am unable to get any activity to update.

First of all, there are only some channels that allow you to update the activity. From some poking around, it should be: Teams, Slack, Telegram, and Skype.

This contradicts what is currently listed here.

So, it should at least work in Teams. I have been able to retrive the last activity ID in the following channels: Emulator, Web Chat, Teams, Telegram and Skype.

It looks like it won’t work or be supported in Emulator or Web Chat. At least for now.

Here is my LG:

# SendActivity_003038()
- You said '${turn.activity.text}'

# SendActivity_CuRkhr()
- The last "you said" activity was ${turn.lastresult.id}

# UpdateActivity_Activity_VvGbJB()
[Activity
    Text = Should be new text
]

And here is my dialog:

{
  "$kind": "Microsoft.OnUnknownIntent",
  "$designer": {
	"id": "821845"
  },
  "actions": [
	{
	  "$kind": "Microsoft.SendActivity",
	  "$designer": {
		"id": "003038"
	  },
	  "activity": "${SendActivity_003038()}"
	},
	{
	  "$kind": "Microsoft.SendActivity",
	  "$designer": {
		"id": "CuRkhr"
	  },
	  "activity": "${SendActivity_CuRkhr()}"
	},
	{
	  "$kind": "Microsoft.UpdateActivity",
	  "$designer": {
		"id": "VvGbJB"
	  },
	  "activityId": "turn.lastresult.id",
	  "activity": "${UpdateActivity_Activity_VvGbJB()}"
	}
  ]
}

@benbrown Any other pointers or things I may be missing to get the activity to actually update once I have the activity ID?

0reactions
karloberascommented, Oct 22, 2020

Sure, this feature is not yet mature and I have reverted to re-do my bot in C#.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Delete your activity - Android - Google Account Help
Delete individual activity items · On your Android phone or tablet, go to myactivity.google.com. · Scroll down to your activity. · Find the...
Read more >
Update and delete 'recurring' Activities with Data Loader
Log into Data Loader and select Export All. · Select Task or Event, depending on which type of Activity you're deleting or updating....
Read more >
how to properly delete or update activities on bot framework?
I tried to use TurnContext.UpdateActivity , but I'm getting an error. My code: IMessageActivity responseActivity = MessageFactory.Text("Test ctm ...
Read more >
Delete or Update Activity log and Journal Field Entries
1. Get the sys_id of the task · 2. Get the audit_sysid of the exact entry you want to delete by going to...
Read more >
Delete Activity in Azure Data Factory
Search for Delete in the pipeline Activities pane, and drag a Delete activity to the pipeline canvas. · Select the new Delete activity...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found