maintain a way to access the correlations in relation to the correlation keys
This commit is contained in:
parent
3a03b92ff0
commit
0f02baf13e
|
@ -206,6 +206,15 @@ class MessageEventDefinition(NamedEventDefinition):
|
|||
if payload is not None:
|
||||
my_task.set_data(**payload)
|
||||
|
||||
def get_correlation_keys(self, task, payload):
|
||||
correlation_keys = {}
|
||||
for property in self.correlation_properties:
|
||||
for key in property.correlation_keys:
|
||||
if key not in correlation_keys:
|
||||
correlation_keys[key] = {}
|
||||
correlation_keys[key][property.name] = task.workflow.script_engine._evaluate(property.expression, payload)
|
||||
return correlation_keys
|
||||
|
||||
def get_correlations(self, task, payload):
|
||||
correlations = {}
|
||||
for property in self.correlation_properties:
|
||||
|
|
|
@ -17,7 +17,7 @@ class StartMessageTest(BaseTestCase):
|
|||
def testParserCanReturnStartMessages(self):
|
||||
parser = self.get_parser('message_test.bpmn')
|
||||
self.assertEqual(
|
||||
parser.process_parsers['ThrowCatch'].start_messages(), ['Message_1rkbi27'])
|
||||
parser.process_parsers['ThrowCatch'].start_messages(), ['ApprovalRequest'])
|
||||
|
||||
parser = self.get_parser('random_fact.bpmn')
|
||||
self.assertEqual(
|
||||
|
|
Loading…
Reference in New Issue