Maybe it's better if we have an overview of the whole use case rather than trying to solve things piecemeal. Perhaps there's a better way to do this and we don't need the response gymnastics.
If there's no other way, maybe we can extend the syntax for the HTTP POST action so that the user can choose whether they want the response as a message or not. But I don't want to impose unsolicited HTTP responses on the user's timeline if all they wanted was to repost their message somewhere (e.g. Twitter). On Sun, Dec 13, 2009 at 1:00 PM, Vassil Dichev <[email protected]> wrote: > I'm wondering how far we can push actions to do something they are not > well suited for. Returning the response is fine but then usually it > has to be processed in one way or another. The question is: is this > something, which would only work in the 12sprints integration > scenario, or would it also be useful for other scenarios? > > In general, when using an HTTP POST, we're not interested in the > response. I think this action was conceived only as a way to resend > messages to other services, including microblogging ones, like > Twitter. I'm not sure folks would be interested in the "200 OK" > response always being returned and posted to their timeline. Besides, > if this introduces subtle to catch bugs, like infinite loops, we'd > better think twice about including such power features. > > In general, if we're interested in the response, then usually there is > complex logic associated with it- conditionals, probably XML/String > processing, and that's something not directly related to posting a > message. > > Integration scenarios is something which ESME is good at, but before > adding functionality, we have to think it through, so that it doesn't > jeopardize stability and increase complexity unnecessarily. > > > On Sat, Dec 12, 2009 at 9:33 PM, Richard Hirsch <[email protected]> wrote: >> Cool. >> >> I'll try it out tomorrow. >> >> I already created such an infinite loop when I was working on the >> akibot integration. Had to deactivate the action before it flooded the >> systems with messages. >> >> D, >> >> On Sat, Dec 12, 2009 at 8:29 PM, Ethan Jewett <[email protected]> wrote: >>> I've posted a diff to this issue >>> (https://issues.apache.org/jira/browse/ESME-143) that does what is >>> requested. Please keep in mind that this can pretty easily result in >>> an infinite loop of messages, if you are (for example) using an action >>> to post all of your messages to a third-party service. >>> >>> Ethan >>> >>> On Sat, Dec 12, 2009 at 12:00 PM, Richard Hirsch <[email protected]> >>> wrote: >>>> I'm been thinking about this integration and I think we need some way >>>> to publish the information that is return from a HTTP post action. For >>>> example, posting to 12sprints leads to a response that contains the >>>> activity ID. Without surfacing this ID, it is impossible to get the ID >>>> except by going directly to 12Sprints. >>>> >>>> To deal with this issue, I think it would useful for the HTTP Post >>>> Action to post a message with the result. >>>> >>>> I've created a JIRA item to deal with this: >>>> https://issues.apache.org/jira/browse/ESME-143 >>>> >>>> On Wed, Dec 2, 2009 at 3:05 PM, Richard Hirsch <[email protected]> >>>> wrote: >>>>> Then you would probably have a problem in that it would the tags >>>>> wouldn't be unencoded. >>>>> >>>>> D. >>>>> >>>>> On Wed, Dec 2, 2009 at 2:31 PM, Vassil Dichev <[email protected]> wrote: >>>>>> Great, does this issue still make sense? I think you are relying on >>>>>> the fact that there's a single tag in there. What if you use several? >>>>>> They would be separated with spaces. >>>>>> >>>>>> On Wed, Dec 2, 2009 at 3:25 PM, Richard Hirsch <[email protected]> >>>>>> wrote: >>>>>>> Fixed this myself:-> >>>>>>> >>>>>>> The integration with 12sprints is now based on dynamic information >>>>>>> based on message tags. I set the activity ID in the action through the >>>>>>> message tag. >>>>>>> >>>>>>> D. >>>>>>> >>>>>>> On Tue, Dec 1, 2009 at 4:28 PM, Richard Hirsch <[email protected]> >>>>>>> wrote: >>>>>>>> Unfortunately, I'm stuck now, because I can't use %t in the HTTP Post >>>>>>>> action URL. :-< >>>>>>>> >>>>>>>> I've created a Jira item ( >>>>>>>> https://issues.apache.org/jira/browse/ESME-141 ) describing the >>>>>>>> problem >>>>>>>> >>>>>>>> D. >>>>>>>> >>>>>>>> On Tue, Dec 1, 2009 at 12:24 PM, Richard Hirsch >>>>>>>> <[email protected]> wrote: >>>>>>>>> I'm asking first on a 12sprints discussion if I can provide details >>>>>>>>> about using the REST API. >>>>>>>>> >>>>>>>>> D. >>>>>>>>> >>>>>>>>> On Tue, Dec 1, 2009 at 12:13 PM, Vassil Dichev <[email protected]> >>>>>>>>> wrote: >>>>>>>>>>> Just created a 12sprints activity via an ESME action. >>>>>>>>>>> >>>>>>>>>>> Took a bit of time to get the formatting right but it works now. >>>>>>>>>> >>>>>>>>>> Great! Can you share an approximate syntax for the header/body? It is >>>>>>>>>> always better to have more info we could document. >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >
