trilix-gmbh / akeneo-events-api-bundle Goto Github PK
View Code? Open in Web Editor NEWThe Events API Bundle for Akeneo PIM delivers catalog changes as events to a 3rd party systems.
License: MIT License
The Events API Bundle for Akeneo PIM delivers catalog changes as events to a 3rd party systems.
License: MIT License
I cannot see any event from PIM when I create/update the attribute option in some attributes.
Please let me know how can I receive this event or please suggest the solution for this. Thank you.
I'm using the VM from Bitnami to run an instance of Akeneo (https://bitnami.com/stack/akeneo/virtual-machine) o VirtualBox 6.0.20 r137117 (Qt5.6.3)
I followed all the steps to install the addon, but when I try to create the job I get an error. I know it's a newbie trouble, but I don't know what to try.
TIA
bitnami@debian:/opt/bitnami/apps/akeneo/htdocs$ bin/console akeneo:batch:create-job 'Deliver outer event to consumer' deliver_outer_event_to_consumer internal deliver_outer_event_to_consumer
This script is running with a memory_limit of 800M. Please visit https://docs.bitnami.com/general/apps/akeneo/ to learn more about how to change this setting.
16:57:25 ERROR [console] Error thrown while running command "akeneo:batch:create-job 'Deliver outer event to consumer' deliver_outer_event_to_consumer internal deliver_outer_event_to_consumer". Message: "The job "deliver_outer_event_to_consumer" is not registered" ["exception" => Akeneo\Tool\Component\Batch\Job\UndefinedJobException { …},"command" => "akeneo:batch:create-job 'Deliver outer event to consumer' deliver_outer_event_to_consumer internal deliver_outer_event_to_consumer","message" => "The job "deliver_outer_event_to_consumer" is not registered"]
In JobRegistry.php line 56:
The job "deliver_outer_event_to_consumer" is not registered
akeneo:batch:create-job [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> <connector> <job> <type> <code> [<config>] [<label>]
The payload for events of type product_model_created differs from the JSON returned by the Akeneo HTTP API.
Steps to reproduce:
The events API sends the following event
{
"event_type": "product_model_created",
"payload": {
"code": "foo_bar",
"family_variant": "test_family_variant_cp",
"parent": null,
"categories": [],
"values": [],
"created": "2020-01-13T10:43:34+00:00",
"updated": "2020-01-13T10:43:34+00:00",
"associations": [],
"metadata": {
"workflow_status": "working_copy"
}
},
"event_time": 1578912214
}
When you retrieve the same product model using the Akeneo HTTP API you'll get the following response:
{
"code": "foo_bar",
"family_variant": "test_family_variant_cp",
"parent": null,
"categories": [],
"values": {},
"created": "2020-01-13T10:43:34+00:00",
"updated": "2020-01-13T10:43:34+00:00",
"associations": [],
"metadata": {
"workflow_status": "working_copy"
}
}
The issue is regarding the format of the values attributes. This is has to be an object/map (like it is in the response of the Akeneo HTTP API). But if there are not values yet the Event API sends the values attribute as empty array. This is wrong.
Akeneo: 3.1.9
I'm following the installation manual.
After running a command to create a job, I'm getting:
In functions.php line 62:
[InvalidArgumentException]
URI must be a string or UriInterface
Exception trace:
() at /app/vendor/guzzlehttp/psr7/src/functions.php:62
GuzzleHttp\Psr7\uri_for() at /app/vendor/guzzlehttp/guzzle/src/Client.php:75
GuzzleHttp\Client->__construct() at /app/var/cache/dev/Container5nxyayi/getObjectSavedSubscriberService.php:8
...
Parameters and config are fine.
I have setup Akeneo CE version 3.2.3. I have attached system-info file for more details.
I have followed the document and everything looks good. Except when I update any product it should trigger the endpoint with the payload. But I don't see any job event trigger.
I have checked logs in pim-community-standard/var/logs, /var/log/akeneo_daemon.err.log, /var/log/akeneo_daemon.out.log, /var/log/apache2/akeneo-pim_*
It seems to me I am missing one of the step, Can someone help?
ubuntu@ip-10-81-13-230:~$ /usr/bin/php7.2 /path/pim-community-standard/bin/console debug:config TrilixEventsApiBundle
Current configuration for "TrilixEventsApiBundle"
trilix_events_api:
applications:
default:
uri: 'http://exampl.com/v1/pim/event/publish'
Hello Trilix gmbh,
Are there any plans to upgrade the bundle to the Akeneo v5?
The payload for events of type family_update and family_create differs from the JSON returned by the Akeneo HTTP API.
Steps to reproduce:
{
"event_type": "family_created",
"payload": {
"code": "test_family_cp",
"attributes": [
"sku"
],
"attribute_as_label": "sku",
"attribute_as_image": null,
"attribute_requirements": {
"default": [
"sku"
],
"ecommerce": [
"sku"
],
"print": [
"sku"
]
},
"labels": []
}
}
{
"code": "test_family_cp",
"attributes": [
"sku"
],
"attribute_as_label": "sku",
"attribute_as_image": null,
"attribute_requirements": {
"default": [
"sku"
],
"ecommerce": [
"sku"
],
"print": [
"sku"
]
},
"labels": {}
}
As you can see there is a difference for the labels attribute. If the labels are empty the events API sends it as empty array but it should be an empty map/object.
While trying out the events API I noticed that events with type family_removed are never published/sent
I was not able to receive a product_removed event. I tried to delete a standalone product as well as a product which belongs to a product model. But in both cases no product_removed event is sent.
Is there anything I can check or provide in order to investigate further?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.