Skip to content

sonnyhcl/L2L

Repository files navigation

L2L Framework

This space includes part of the source of the L2L framework and provides support material for the demo paper:

Coordinating IoT-enabled Autonomous Processes in Cross Enterprise Service Systems Authored by Biqi Zhu, Chenglong Hu, Lin Ye, Hong-Linh Truong and Liang Zhang.

Video

The demo video is here👇

placeholder

Application Scenario

This demostration bases on the supplychain management for Ship Spare Parts (SSP) problem in China shipping company. There are four particiants, namely Vessel, Manager, Supplier and Logistic.

In reality, there exist several uncertainties that either the spare parts would arrive too earlier than the vessel (leading to higher expense for warehouding), or they would miss the rendezvous port with the vessel (with great hidden danger threatening future voyage).

The docking time depends on the loading/unloading process of other vessels. If there is no vacancy of the port, other following vessels can only anchor and wait. In fact, based on data collected from harbor management, 70%-80% bulk cargo carries would be delayed on docking time for serveral days or even a few weeks. On the other hand, sometimes there are very short time slots for a vessel to dock.

All these dynamic uncertainties make current approaches, which are almost done by human and offline communication, unfitted and costly.

System Features Outline

Empowered with IoT technologies business entities can perceive context instantly within an enterprise for optimizing service-based business processes. Further, we can share to allow enterprise-to-enterprise coordinators to optimize business services under dynamic changes.

In this system, we demonstrate the L2L framework in which IoT-enablers, Event Gateway, Context Sharing and Policies are introduced to enable serverless-based Cross-Enterprise Coordinators in the cloud to deal with dynamic changes among services across enterprises. We experimented our prototype around a real SSP problem on shipping along the Yangtze river to validate the effectiveness and efficiency of L2L framework. The main system features are outlined as follows:

1. How to capture Iot events,and other asynchronous events

  • Event Gateway subscribes the IoT and asynchronous events from Business Entities through IoT Hub.
    • The vessel sends its GPS coordinates, current speed, ports to be docked, and estimated arrival time to the IoT Hub. the vessel may send delay events to Event Gateway.
    • The wagon can sends its GPS coordinates, moved distance and speed to IoT Hub. Moreover, when encountering traffic jam, result in timeout, the wagon will pubish the traffic jam event to Event Gateway.
  • Event Gateway publishes commands to Business Entities through IoT Hub.
    • The Event Gateway sends message about delivery back to vessel.
    • The wagon subscribes the new rendezvous port notification from Event Gateway.

2. How these events go through those components

  • Using Event Gateway as dispatcher, events can flow smoothly between Enterprise Information System and Businesses Entities without changing its original framework.
    • Event Gateway collects the IoT data, feeds them into IoT shadows,and encapsulates them diverse IoT-enable services.
    • Event Gateway invokes engine services to transforms these events into the workflow envents or deal with them directly.
    • The vessel process invokes these services to acquire the IoT data listens to the status changes of vessel and delay messages. and the wagon process might call services to send the rendezouvs port information to Event Gateway.
  • Enterprise Coordintor takes responsibility for informing Decision Making of changes.
    • Due to multiple times traffic jam, the wagon cannot reach the destination as expectation time. the wagon process perceives the change, and re-plan all pathes to the candidate ports. Finally through the Enterprise Coordintor, The traffic jam message reaches to the Logistic Vessel Coordinator.
  • The enterprise can share public data and events to Global IoT Hub , and they are can be subscribed by Relay Station in Cross-Enterprise Coordinators or other enterprises.
    • The delay events from Vessel Businesss Entity are shared to Global IoT Hub. Through Public Channel, they can be captured by Relay Station , then triger the decision-making.

3. How the coordinator initiates, manage collaborations between two enterprises

  • Similar configuration can be extracted outside as Enterprise Policies. We can use them in Event Gateway, Enterprise Coordintor, and Context Sharing.
    • When events incoming, we can check the message header to find which event type we receive and which policy type they use. Then we can dynamicly orchestrare the services specified in confiure policy files to deal with the dynamic changes. We can easily add new policy, and develop and publish the specified services.
  • Based on the specificed policy, Cross-Enterprise Coordinators can invoke the apropriated coordination functions as services to tackle dynamic changes.
    • As mentioned earlier, the LVC can capture the delay events from the Vessel Business Entity, In some concrete situation, the event type is IoT_DELAY and the policy type is fixed-destination. Then we call functions to extract the message and the invoke the the specified service to decide the rendezvous port.

User Guide

The project structure is as follows:

L2L
├── BusinessEntities
│   ├── vesselIoT
│   └── wagonIoT
├── Coordinators
│   ├── lvc
│   ├── msc
│   ├── slc
│   └── vmc
├── Enterprises
│   ├── logistics-A
│   ├── manager-A
│   ├── supplier-A
│   └── vessel-A
├── pom.xml
└── README.md
  • L2L Frontend

    Attention: In order to perform as demo shows, The project must be coordinated with the L2L Frontend project.

  • if you want to know how to run the system , you can see the user guide for L2L Backend

Experimental Step

First and foremost, we assume every steps have already correctly done following the above user guide. So make sure that you have started all components shown in project structure.

  • Test frontend endpoint
http://localhost:8000
  • After you see the frontend view, you can start a vessel process. The RESTful Engine services can be called to deal with the request. For example :
    @RequestMapping(value = "/process-instances/{processName}", method = RequestMethod.POST)
    public ProcessInstanceRepresentation StartProcessInstanceByName(@RequestBody Map<String, Object> mp , @PathVariable("processName") String processName) {
        logger.info("--POST /process-instances/"+processName+"--");
        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionName(processName).latestVersion().singleResult();
        logger.info(processDefinition.toString());
        Map<String , Object> vars = new HashMap<String , Object>();
        //...
        return new ProcessInstanceRepresentation(historicProcess, processDefinition, ((ProcessDefinitionEntity)
                processDefinition).isGraphicalNotationDefined(), user);
    }
  • Login the BPMS for vessel enterprise with admin role , then you can check the task list for the 'Voyaging' task and observe the real-time GPS coordinates of vessel business entity.
 http://localhost:9001/vessel-A/
  • Once the vessel process sends the application to the manager, the vmc will start a manager process. You can login the manager enterprise BPMS and find the "Approving" task.
http://localhost:9011/manager-A/
  • Once the application is approved, an order will sent to the supplier and the msc will start a supplier process.
  • Login the BPMS for supplier enterprise with admin role , then you can find the 'Approving' task and choose an appropriate policy for the logistics such as fixed-destination.
http://localhost:9021/supplier-A/
  • Once you confirm the logistics policy, the logistics task will be arranged to the specified logistics enterprise.
  • login the logistics enterprise BPMS, you can monitor the logistics state.
http://localhost:9031/logistics-A/
  • while the wagon is running following the schedule path, you can simulate to send delay event. the async event will be captured by the lvc and the lvc will make decision according to the predetermined policy.

About

L2L for ICSOC2018 demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published