Coder Social home page Coder Social logo

fastnt / epcis Goto Github PK

View Code? Open in Web Editor NEW
24.0 4.0 12.0 4.77 MB

.NET 5 implementation of GS1's EPCIS repository version 1.2

License: Apache License 2.0

C# 98.39% PLpgSQL 1.61%
epcis gs1 traceability track-trace logistics gs1-epcis api supply-chain visibility

epcis's Introduction

Check the new EPCIS repository using EntityFramework Core and .NET6 here!

Last Commit (develop) Build Status Maintainability codecov

Deploy to Azure Visualize in Armviz

FasTnT EPCIS

FasTnT EPCIS is a lightweight GS1 EPCIS 1.2 repository written in C# using .NET 5 and backed with PostGreSQL database.

Setup

Prerequisites:

  • PostGreSQL 9.5 or higher
  • .NET 5 SDK

Steps:

  1. Download the source code, and create a new user/database in PostGreSQL for FasTnT ;
  2. Start the repository with the command $ dotnet run -p src\FasTnT.Host\FasTnT.Host.csproj --urls "http://localhost:5102/" --connectionStrings:FasTnT.Database "{your connectionstring}" ;

That's it! You have a properly working EPCIS 1.2 repository.

HTTP Endpoints

EPCIS 1.2 endpoints:

The API is secured using HTTP Basic authentication. The default username:password value is admin:P@ssw0rd

  • Capture: POST /v1_2/Capture
  • Queries : POST /v1_2/Query.svc
  • Subscription trigger : GET /v1_2/Subscription/Trigger/{triggerName}

Capture endpoint only supports requests with content-type: application/xml or content-type: text/xml header and XML payload.

Queries endpoint supports SOAP requests on endpoint /v1_2/Query.svc. Note that it will not return the wsdl on a GET request.

The file documents\EPCIS Examples - 1.2.postman_collection.json contains XML requests examples to be run in PostMan, and the file EPCglobal-epcis-query-1-2-soapui-project.xml contains a project with SOAP example requests to be run in SoapUI.

See the wiki for more details.

Implemented Features

  • Capture
    • Events
    • Master Data (CBV)
  • Queries:
    • GetVendorVersion
    • GetStandardVersion
    • GetQueryNames
    • GetSubsciptionIDs
    • Poll
      • SimpleEventQuery
      • SimpleMasterDataQuery
  • Query Callback:
    • CallbackResults
    • CallbackQueryTooLargeException
    • CallbackImplementationException
  • Subscriptions:
    • Subscribe to an EPCIS request
    • Unsubscribe from EPCIS repository
    • Trigger subscriptions that register to specific trigger name

Authors

External contributions on FasTnT EPCIS repository are welcome from anyone. Many thanks to the people who already shown interest or contributed to this project (@grudolf, @jnoruzi and many others).

FasTnT EPCIS is primarily maintained by Louis-Axel Ambroise.

License

This project is licensed under the Apache 2.0 license - see the LICENSE file for details

Contact: [email protected]

epcis's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar devhoid avatar grudolf avatar louisaxel-ambroise avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

epcis's Issues

Improve query parameter validation

Multiple improvements needs to be made on the query parameters in order to be EPCIS 1.2 compliant:

  • Check the data type passed for every query parameter
  • Check the parameter names before query execution?
  • Merge all parameters with the same name in order to have a more optimized query

Parse correctly event extensions

Currently, all events extensions are set in the deepest level when formatting events.
It should handle the fact that the extension can be in any level of tags.

The events returned by queries/subscriptions must be formatted exactly like he captured events.

PK on source_destination

Hello,

great work so far, I really like how you organized the project.

I've encountered a problem while trying to capture some eASN test data - in my case, the same type attribute "urn:epcglobal:cbv:sdt:owning_party" is used in both source and destination list, throwing a 23505: duplicate key value violates unique constraint "PK_EVENT_SOURCE_DESTINATION" exception. Same could happen to location and possessing_party types.

Extending "PK_EVENT_SOURCE_DESTINATION" from (event_id, type) to (event_id, direction, type) would fix it.

Check performance of subscription task

Check the behaviour of subscription tasks when thousands of requests are pending.
It might be necessary to split the subscription run into multiple batches to improve performance and/or avoid errors.

Store StandardBusinessHeader if filled in

A capture event might have a StandardBusinessHeader field, containing trading partner information.
These information should be stored in the database if provided, as these information can be useful for analytic purpose.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.