Activities producing values?

I was going on the assumption that it was possible for activities to produce values, and I was just too lazy to look up how to do it. But after a brief search today, I’m not so sure.

Is it possible to create an activity that produces a value?

What about named outcomes for activities?

To resurrect this old thread, especially now that we have a shiny new version to play with:

Is it possible? I’ve just been hacking around it with globals, but it feels inelegant.

No, activities do not produce values.

Can you use a simple rulebook instead?

Depending on what you’re doing, an activity variable (see 18.6) might be useful.

Which part of the activity should produce the value? If a Before rule gives one value and an After rule another, which should be returned? If a value has already been given, should the After rules still be followed?

This seems like it would cause lots more problems than it would solve. In this case, I’d say the global variable method is actually better.