On Wed, Jul 24, 2013 at 4:51 PM, Sanjiva Weerawarana <[email protected]>wrote:
> On Wed, Jul 24, 2013 at 4:14 PM, Samisa Abeysinghe <[email protected]>wrote: > >> OK, so, it should be at proxy level. If there are two twitter connectors >> for a proxy, they will be defined as twitterYou and twitterMe within the >> proxy scope. And we can re-use them in sequences as we wish. >> > > I don't think I understand what that means ... connector "instances" are > not named - so what does twitterYou an twitterMe mean when there's no > config separated? If there's no config reference, there's only one config > in scope .. whatever was defined earlier in the sequence. So there's only > one around. > > If you want to do a status update as "you" vs "me" then you'd need to > reenter <twitter.config> with the right creds and then use it (see below). > Yes, this is what I meant. But, can we not re-use the config, in some cases, so that, you can do more than one operation using the same config? This is what I gathered from the DevS studio discussion. For e.g. I want to tweet as Samisa (update operation) and also tweet that based on a current trend, so before update, I look up the trends available. <sequence> <twitter.config> <oauth.consumerSecret>{vault-lookup('*samisa* .twitter.oauth.consumerSecret')}</oauth.consumerSecret> <oauth.accessTokenSecret>{vault-lookup('saisa.twitter.outh.accessTokenSecret')}</oauth.accessTokenSecret> <oauth.accessToken>{vault-lookup('samisa.twitter.oauth.accessToken')}</oauth.accessToken> <oauth.consumerKey>{vault-lookup('samisa.twitter.oauth.consumerKey')}</oauth.consumerKey> </twitter.config> <!-- Find trends available as samisa from https://dev.twitter.com/docs/api/1.1/get/trends/available--> <twitter.findTrends>data filtering the trend</twitter.findTrends> <!-- do someting with the trends data. Could be using other mediators or another connector, when applicable --> <!-- tweet as samisa --> <twitter.updateStatus>Hello, World (from Samisa)</twitter.updateStatus> </sequence> The naming become useful, if and only if, in the <!-- do someting with the trends data. Could be using other mediators or another connector, when applicable --> section, we want to use another twitter account, in which case, we will have to repeat the config. In this case, would it not be ideal to name the connector instance along with the config, so that we can mix and match different configs of a connector to do various operations? However, the common use case would be to connect across heterogeneous connectors. e.g. SalesFoce, Jira, RM and then combine them in a logical sequence. Even in there, I could think of comboning different instances of the same connector type. e.g. Ref data form SF. Relate to Support Jira. Match with OT jira, update support Jira and update RM. > > Dushan why are the properties named synapse.runtime.oauth.accessToken?? >>> There are two problems with this: >>> - this has NOTHING to do with Synapse so its wrong to synapse.runtime.*. >>> - second, MORE IMPORTANTLY, many mediators will have an >>> oauth.accessToken property! So this will not work .. it needs to be >>> twitter.oauth.accessToken (which is what I said the first time IIRC). >>> >> > I made a mistake here .. the property names should be possible to be > arbitrary - otherwise we can't do Samisa's scenario above of tweeting as X > and tweeting as Y: > > <sequence> > <!-- tweet as sanjiva --> > <twitter.config> > <oauth.consumerSecret>{vault-lookup('*sanjiva* > .twitter.oauth.consumerSecret')}</oauth.consumerSecret> > > > <oauth.accessTokenSecret>{vault-lookup('sanjiva.twitter.outh.accessTokenSecret')}</oauth.accessTokenSecret> > > > <oauth.accessToken>{vault-lookup('sanjiva.twitter.oauth.accessToken')}</oauth.accessToken> > > > <oauth.consumerKey>{vault-lookup('sanjiva.twitter.oauth.consumerKey')}</oauth.consumerKey> > </twitter.config> > <twitter.updateStatus>Hello, World (from > Sanjiva)</twitter.updateStatus> > > <!-- tweet as samisa --> > <twitter.config> > <oauth.consumerSecret>{vault-lookup('*samisa* > .twitter.oauth.consumerSecret')}</oauth.consumerSecret> > > > <oauth.accessTokenSecret>{vault-lookup('saisa.twitter.outh.accessTokenSecret')}</oauth.accessTokenSecret> > > > <oauth.accessToken>{vault-lookup('samisa.twitter.oauth.accessToken')}</oauth.accessToken> > > > <oauth.consumerKey>{vault-lookup('samisa.twitter.oauth.consumerKey')}</oauth.consumerKey> > </twitter.config> > <twitter.updateStatus>Hello, World (from Samisa)</twitter.updateStatus> > </sequence> > > Now someone just has to get the right info into the vault. > > Sanjiva. > -- > Sanjiva Weerawarana, Ph.D. > Founder, Chairman & CEO; WSO2, Inc.; http://wso2.com/ > email: [email protected]; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1 > 650 265 8311 > blog: http://sanjiva.weerawarana.org/ > > Lean . Enterprise . Middleware > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- Thanks, Samisa... Samisa Abeysinghe VP Engineering WSO2 Inc. http://wso2.com http://wso2.org
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
