OK, I got this sorted out. Ended up running:

karaf@root()> bundle:install
mvn:org.apache.unomi/unomi-plugins-webhook/1.4.0-incubating-SNAPSHOT
Bundle ID: 179
karaf@root()> bundle:start 179

Then my webhook action shows in unomi:action-list. Thanks Damien and Serge.

I'm not sure why it is that the action I added is not immediately available
like the other actions but this at least lets me give my webhook a try.

BTW, the new unomi: commands are very helpful in 1.4

On Mon, Dec 3, 2018 at 11:47 AM Michael Ghen <m...@mikeghen.com> wrote:

> Serge, I was mostly just copying exactly what was there so I just did
> everything that existed for the mail action. I will try this bunble:start
> thing and see what happens. I'll see if I can get it working with headers
> and post body and maybe I can contribute it back.
>
> On Mon, Dec 3, 2018 at 6:03 AM Serge Huber <shu...@apache.org> wrote:
>
>> Hello Michael,
>>
>> I tried your code and everything is there, the only thing is that your
>> bundle is not started. You have added it as part of the main Karaf
>> Feature of Unomi (was this intentional ? Are you intending to
>> contribute this as part as the core of Unomi ?)
>>
>> Anyway I just did a bundle:start on the bundle ID and your action was
>> up and running (it's listed in the action-list command).
>>
>> If you're just looking to build an optional extension I would
>> recommend building a seperate feature (or just a bundle) as Damien
>> suggested.
>>
>> But it's true that a webhook plugin is a really good idea !
>>
>> Regards,
>>   Serge...
>>
>>
>>
>> On Mon, Dec 3, 2018 at 10:55 AM Damien GAILLARD <dgaill...@jahia.com>
>> wrote:
>> >
>> > Hi Michael,
>> >
>> > I haven't look at your entire code yet but did you check if your bundle
>> is
>> > activated by using the command bundle:list | grep unomi it should show
>> up
>> > in the list.
>> > If the bundle is here it's a good start and if it's in resolved you
>> might
>> > just need to start it, with something like that:
>> >
>> > bundle:install
>> mvn:org.apache.unomi/login-integration-samples/${project.version}
>> >
>> > or like that:
>> >
>> > feature:repo-add
>> >
>> mvn:org.apache.unomi/unomi-salesforce-connectors-karaf-kar/${project.version}/xml/features
>> > feature:install unomi-salesforce-connectors-karaf-kar
>> >
>> > I'm pretty sure we have some documentation somewhere but I could not
>> find
>> > it, and the closest video that show how to deploy a plugin might be this
>> > one but the quality is not really good:
>> > https://www.youtube.com/watch?v=IvP_iIlw2vQ&t=1389s
>> > and this is the repo that was used for the demo so you can easily use
>> it as
>> > an example
>> > https://github.com/Jahia/unomi-twilio
>> >
>> > Cheers
>> >
>> > On Sun, Dec 2, 2018 at 6:11 PM Michael Ghen <m...@mikeghen.com> wrote:
>> >
>> > > PS: The message I get in the logs is:
>> > >
>> > > 2018-12-01T22:23:13,867 | WARN  | pool-44-thread-1 | ParserHelper
>> > >            | 185 - org.apache.unomi.services -
>> 1.4.0.incubating-SNAPSHOT |
>> > > Couldn't resolve action types : webHookAction
>> > >
>> > > On Sun, Dec 2, 2018 at 12:06 PM Michael Ghen <m...@mikeghen.com>
>> wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > I'm working on my first plugin. I'm trying to add a general webhook
>> > > action
>> > > > to send requests to another service when a condition is met in a
>> rule. I
>> > > > looked at the docs about Plugins and looked a little at OSGI. I
>> took the
>> > > > approach of trying to start with a copy of another action and
>> refactor
>> > > it.
>> > > >
>> > > > The plugin I made seems to build OK and shows up in the build.
>> > > > Unfortunately, when I use unomi:action-list, the action doesn't
>> show up
>> > > > there and when I add a rule using the action, I just get an error
>> that
>> > > > unomi can't find my action.
>> > > >
>> > > > Would anyone be able to review my plugin and help me trace down
>> what I
>> > > > missed?
>> > > >
>> > > >
>> > > >
>> > >
>> https://github.com/apache/incubator-unomi/compare/master...mikeghen:feature/webhook-action?expand=1
>> > > >
>> > > > I've been going file by file through my action and comparing it to
>> the
>> > > > mail action I copied and refactored but can't seem to see what the
>> > > problem
>> > > > is. Any suggestions? I tried walking back through the action-list
>> code to
>> > > > see if that gave me some clues but it did not.
>> > > >
>> > > >
>> > > >
>> > >
>> >
>> >
>> > --
>> > Damien GAILLARD
>> > Software Developer
>> > <
>> https://www.jahia.com/cms/render/default/en/sites/jahiacom/home/employees/grid-layout/jahia-employee/GaillardDamien.signature.html.ajax
>> >
>> > <
>> https://www.jahia.com/cms/render/default/en/sites/jahiacom/home/employees/grid-layout/jahia-employee/GaillardDamien.signature.html.ajax
>> >
>> > 8 rue du sentier | 75002 | France
>> > <
>> https://www.jahia.com/cms/render/default/en/sites/jahiacom/home/employees/grid-layout/jahia-employee/GaillardDamien.signature.html.ajax
>> >
>> > <
>> https://www.jahia.com/cms/render/default/en/sites/jahiacom/home/employees/grid-layout/jahia-employee/GaillardDamien.signature.html.ajax
>> >
>> > jahia.com <http://www.jahia.com/>
>> > SKYPE | TWITTER <https://twitter.com/> | VCARD
>> > <http://www.jahia.com/vcard/GaillardDamien.vcf>
>> >
>> > > JAHIA <http://www.jahia.com/> empowers organizations to create
>> > sophisticated websites that drive their business growth
>>
>

Reply via email to