How to extract payload from Message Intermediate Catch Event

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2013 08:06 PM
Hi,
I have a workflow which contains a Message Intermediate Catch Event followed by a Java Service Task.
How can I extract the message payload from the Message Intermediate Catch Event from inside the Java Service Task?
I have a workflow which contains a Message Intermediate Catch Event followed by a Java Service Task.
How can I extract the message payload from the Message Intermediate Catch Event from inside the Java Service Task?
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2013 04:22 AM
How is the message passed? If the payload is a map, all the content is persisted as variables and you can access those in the service task:
(from the AbstractEventHandler class)
if (payload instanceof Map) {
@SuppressWarnings("unchecked")
Map<String, Object> processVariables = (Map<String, Object>) payload;
execution.setVariables(processVariables);
}
(from the AbstractEventHandler class)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2013 08:13 AM
Thanks! I will try it out
