Skip to content

Commit 62202d2

Browse files
committed
ce prefix
1 parent 26bbb5e commit 62202d2

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed
Loading

documentation/modules/ROOT/pages/04-longrunning.adoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ To _start_ the workflow and subsequently _advance_ it, you have to inject two *t
133133
* `OrderEventType`
134134
* `ShippingEventType`
135135
136-
The Dev UI offers a convenient web form to inject _Cloud Events_ in the Serverless Workflow runtime:
136+
The Dev UI offers a convenient web form to inject _CloudEvents_ in the Serverless Workflow runtime:
137137

138138
. *Open* the `Workflow Definitions` page.
139139

@@ -146,18 +146,18 @@ image::04_cloud-event.png[cloud event button]
146146

147147
- *Event Type* : `OrderEventType`
148148
149-
- *Event Custom Headers* : `orderid = 1000`
149+
- *Event Custom Headers* : `ce-orderid = 1000`
150150
151151
+
152152
+
153-
image::04_ce-header.png[cloud event header]
154-
153+
image::04_ce-header.png[custom event header]
155154

156155
- *Event Data* : `{"orderId": "1000", "item": "1111"}`
157156
158157
. *Click* `Trigger`
159158

160-
IMPORTANT: The *custom event header* `orderid` matches the `contextAttributeName` used in the event definition for correlation. In other words, `orderid` is the hook to the workflow instance, you can run multiple workflow instances in parallel, but they must wait for a distinct `orderid`.
159+
IMPORTANT: The CloudEvent is sent via the HTTP protocol, and by convention the CloudEvent attributes are sent as an HTTP header with a `ce-` prefix.
160+
The *CloudEvent attribute* `orderid` matches the `contextAttributeName` used in the event definition for correlation. In other words, `orderid` is the hook to the workflow instance, you can run multiple workflow instances in parallel, but they must wait for a distinct `orderid`.
161161

162162
Open the *_Workflow Details_* page to inspect the instance status: you should see the the workflow instance still active, waiting for the shipping event:
163163

@@ -176,7 +176,7 @@ image::04_cloud-event.png[cloud event button]
176176

177177
- *Event Type* : `ShippingEventType`
178178
179-
- *Event Custom Headers* : `orderid = 1000`
179+
- *Event Custom Headers* : `ce-orderid = 1000`
180180
181181
. *Click* `Trigger`
182182

documentation/modules/ROOT/pages/05-compensation.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -143,27 +143,27 @@ image::04_cloud-event.png[cloud event button]
143143
144144
- *Event Type* : `OrderEventType`
145145
146-
- *Event Custom Headers* : `orderid = 1002`
146+
- *Event Custom Headers* : `ce-orderid = 1002`
147147
148148
- *Event Data* : `{"orderId": "1002", "item": "1111"}`
149149
150150
. *Click* `Trigger`
151151
152-
Repeat the previous step to start a second workflow instance with `orderid = 1003`.
152+
Repeat the previous step to start a second workflow instance with `ce-orderid = 1003`.
153153
154154
Inject other two CloudEvents:
155155
156156
. First event will test the happy path:
157157
158158
- *Event Type* : `ShippingEventType`
159159
160-
- *Event Custom Headers* : `orderid = 1002`
160+
- *Event Custom Headers* : `ce-orderid = 1002`
161161
162162
. Second event will test the cancellation path:
163163
164164
- *Event Type* : `CancelEventType`
165165
166-
- *Event Custom Headers* : `orderid = 1003`
166+
- *Event Custom Headers* : `ce-orderid = 1003`
167167
168168
NOTE: Even if you trigger the compensation no compensation activity is defined, so at this stage of the exercise you can only look for the `Compensate Order` string in the logs.
169169

0 commit comments

Comments
 (0)