How to pass a business variable to a different pool?

1
0
-1

Hey everybody,

I'm having a problem passing business variable data to different pools. I try to use "throw message" and "receive message" to pass the business variable data to another pool, but i don't get any data in the other pool.

Could anybody help me please?

  • Pool 1: Business variable called "bestellung"
  • Pool 2: Business variable called "kundenbestellung"
  • In pool 1: throw message event. message variable "nachrichteninhalt" takes value of "bestellung"
  • in pool 2: receive message event. business variable "kundenbestellung" takes valoue of message variable "nachrichteninhalt"
  • in pool 2: task to show data of "kundenbestellung" (i tried it with normal Bonita-function and with REST-API, but nothing works)

Screenshots:
Diagram:
pgaJWdg.png


Pool 1 variable:
hCBJAN6.png


Pool 1 message throw event:
lcVbxup.png


Pool 2 variable:
loM54pU.png


Pool 2 Receive message event:
I82PoJE.png


Pool 2 show data task:
hK72lhM.png


Pool 2 show data task form:
5zwHjaP.png

1 answer

1
0
-1

Hello,

Passing the business variable as the message content might be causing an issue(check the exact error stack trace). Instead, try to send the persistence id of the business variable in the message content. After receiving the persistence id, we can always fetch the business variable using businessObjectDAO.findByPersistenceId(receivedPersistenceId).

In the form to show the received data, create a variable of type External API
with value as ../{{context.businessVariableName_ref.link}}, where businessVariableName is the name of the business variable defined at pool level. When run, the form should now display the data sent from the sender pool.

You can try this solution using this example.

Raji MALLA

Notifications