fixed getting a send task without a message selected w/ burnettk cullerton

This commit is contained in:
jasquat 2022-08-16 14:30:45 -04:00
parent 9471a6b7bd
commit c6af750012
2 changed files with 25 additions and 18 deletions

View File

@ -11,11 +11,14 @@ export function MessagePayload(props) {
const debounce = useService('debounceInput');
const getMessagePayloadObject = () => {
const businessObject = shapeElement.businessObject;
const taskMessage = businessObject.messageRef
const messages = findMessageModdleElements(businessObject)
for (let message of messages) {
const { businessObject } = shapeElement;
const taskMessage = businessObject.messageRef;
const messages = findMessageModdleElements(businessObject);
if (taskMessage) {
for (const message of messages) {
if (message.id === taskMessage.id) {
const { extensionElements } = message;
if (extensionElements) {
return message.extensionElements
.get('values')
.filter(function getInstanceOfType(e) {
@ -23,6 +26,8 @@ export function MessagePayload(props) {
})[0];
}
}
}
}
return null;
};
@ -38,7 +43,9 @@ export function MessagePayload(props) {
const { businessObject } = shapeElement;
let MessagePayloadObject = getMessagePayloadObject();
if (!MessagePayloadObject) {
MessagePayloadObject = businessObject.$model.create('spiffworkflow:messagePayload');
MessagePayloadObject = businessObject.$model.create(
'spiffworkflow:messagePayload'
);
// if (type !== SCRIPT_TYPE.bpmn) {
if (!businessObject.extensionElements) {
businessObject.extensionElements = businessObject.$model.create(

View File

@ -48,7 +48,7 @@
</bpmn:correlationPropertyRetrievalExpression>
</bpmn:correlationProperty>
<bpmn:correlationProperty id="singer" name="Singer&#39;s Name">
<bpmn:correlationProperty id="singer_name" name="Singer&#39;s Name">
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter_response">
<bpmn:formalExpression>to.name</bpmn:formalExpression>
</bpmn:correlationPropertyRetrievalExpression>