Skip to Content

Create Custom Kanban Event, Rule Project and Action

test
0 %
Create Custom Kanban Event, Rule Project and Action
Details

Create Custom Kanban Event, Rule Project and Action

Requires Customer/Partner License
June 2, 2021
Created by
May 9, 2021
Create your own kanban Event Type and Rule Project, including Rule and Action that will allow you to process Auto-ID events and trigger kanban status updates.

You will learn

  • How to create a kanban Event Property Set Type and Event Type
  • How to create a kanban Rule Project and Rule
  • How to create a kanban Action
QR code

Prerequisites


Step 1: Configure event in SAP Internet of Things

Before you can create your Rule you need to create a custom Event Type which you will use as Output in the Rule later on. To do so, you must do the following: (For more information see SAP Help Portal )

  • Read the fully qualified package name by triggering Step 1.1 Get Package name and update the package Postman environment variable to your package name, for example iot.tenant.sap.tutorial.

  • Create your Event Property Set Type by using the Postman collection and triggering the request Step 2.1 Create Event Property Set Type.

    Created Event Property Set Type
  • Create your Event Type by using the Postman collection and triggering the request Step 2.2 Create Event Type.

    Created Event Type
Log on to answer question
Step 2: Create rule project and add property sets

You can define rules to specify conditions to generate events which can be consumed in actions to trigger a kanban container status update for Auto-ID scanner events. Multiple rules can be bundled in a Rule Project.

  1. Open the Fiori launchpad and Navigate to the IoT Rules and Actions tab and open the app Rule Projects in the Fiori Launchpad to create a new project by clicking Create.

  2. Provide a unique name for the name and description fields (for example, Kanban Tutorial) and confirm.

  3. Add your custom Event Type created in Step 2 as Event Property Set-based Data Object

    Add custom Event Type
  4. Add your Auto-ID Events and Enrichments (kanban_enrichmentXXXXXX and EPCISEvent) as well as Event Property Sets.

At the end the Rule Project’s Property Set should look as follows:

Rule Project’s Property Set
Log on to answer question
Step 3: Create rule

Now that you have a Rule Project, you can create a rule. In the Rule Projects app navigate to the Rules tab and create a Streaming - Event Creation rule.

  1. Provide a unique name for the name and description (for example, Kanban Rule).

  2. Add the Event Property Sets kanban_enrichmentXXXXXX and EPCISEvent as Input.

  3. Add the Event Property Set Rule_Output as Output.

    Rule Input and Output
  4. Click Confirm to process the maintained information. The Rule Editor and Settings section will now be loaded based on your inputs.

  5. A sample rule condition is provided below which you can enter it into the Rule Editor (you have to type the condition as copy-paste isn’t possible).

  6. Now you can Save and Activate the Rule on Cloud.

  IF  EPCISEvent.ReadpointID ='Reader_01'

    THEN      KanbanContainer:       kanban_containersXXXXXX.KanbanContainer
              KanbanContainerStatus: '2'


  ELSE IF EPCISEvent.ReadpointID = 'Reader_02'

    THEN      KanbanContainer:       kanban_containersXXXXXX.KanbanContainer
              KanbanContainerStatus: '5'

Log on to answer question
Step 4: Create service integration action

To define an action, you need to configure a Destination for the kanban API that allows you to update the kanban Status in SAP S/4HANA Cloud. Please refer to the tutorial Create Destinations for kanban APIs for more details.

If the above rule condition is satisfied, the rule will raise an Event based on your created custom Event Type. To react on this you need to define an action to trigger the API call to the SAP S/4HANA or SAP S/4HANA Cloud system. To do so navigate to the IoT Rules and Actions tab and then to Actions tile in the Fiori launchpad.

  • Once you are in the create screen, provide a unique name for Name and Description (for example, Kanban Status Tutorial Action) to avoid conflicts.

  • Select Custom Event for Triggered by field.

  • Select the Event Type created in Step 2 as the Custom Event Type

  • Select epcis as Thing Type ( Package Name: epcis)

  • Select Service Integration as Action Type

  • Finally, select your Destination and Save your Action.

The next tutorial to consider doing might be this one to ingest an EPCIS Event to see your the process end-to-end Create EPCIS Event to change Kanban status

What is the status of the kanban container when a kanban container is scanned at readpoint 'Reader_01'?
×

Next Steps

Back to top