mirror of
https://github.com/sartography/bpmn-js-spiffworkflow.git
synced 2025-02-23 13:08:11 +00:00
fixed getting a send task without a message selected w/ burnettk cullerton
This commit is contained in:
parent
9471a6b7bd
commit
c6af750012
@ -11,16 +11,21 @@ export function MessagePayload(props) {
|
|||||||
const debounce = useService('debounceInput');
|
const debounce = useService('debounceInput');
|
||||||
|
|
||||||
const getMessagePayloadObject = () => {
|
const getMessagePayloadObject = () => {
|
||||||
const businessObject = shapeElement.businessObject;
|
const { businessObject } = shapeElement;
|
||||||
const taskMessage = businessObject.messageRef
|
const taskMessage = businessObject.messageRef;
|
||||||
const messages = findMessageModdleElements(businessObject)
|
const messages = findMessageModdleElements(businessObject);
|
||||||
for (let message of messages) {
|
if (taskMessage) {
|
||||||
if (message.id === taskMessage.id) {
|
for (const message of messages) {
|
||||||
return message.extensionElements
|
if (message.id === taskMessage.id) {
|
||||||
.get('values')
|
const { extensionElements } = message;
|
||||||
.filter(function getInstanceOfType(e) {
|
if (extensionElements) {
|
||||||
return e.$instanceOf('spiffworkflow:messagePayload');
|
return message.extensionElements
|
||||||
})[0];
|
.get('values')
|
||||||
|
.filter(function getInstanceOfType(e) {
|
||||||
|
return e.$instanceOf('spiffworkflow:messagePayload');
|
||||||
|
})[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -38,14 +43,16 @@ export function MessagePayload(props) {
|
|||||||
const { businessObject } = shapeElement;
|
const { businessObject } = shapeElement;
|
||||||
let MessagePayloadObject = getMessagePayloadObject();
|
let MessagePayloadObject = getMessagePayloadObject();
|
||||||
if (!MessagePayloadObject) {
|
if (!MessagePayloadObject) {
|
||||||
MessagePayloadObject = businessObject.$model.create('spiffworkflow:messagePayload');
|
MessagePayloadObject = businessObject.$model.create(
|
||||||
|
'spiffworkflow:messagePayload'
|
||||||
|
);
|
||||||
// if (type !== SCRIPT_TYPE.bpmn) {
|
// if (type !== SCRIPT_TYPE.bpmn) {
|
||||||
if (!businessObject.extensionElements) {
|
if (!businessObject.extensionElements) {
|
||||||
businessObject.extensionElements = businessObject.$model.create(
|
businessObject.extensionElements = businessObject.$model.create(
|
||||||
'bpmn:ExtensionElements'
|
'bpmn:ExtensionElements'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
businessObject.extensionElements.get('values').push(MessagePayloadObject);
|
businessObject.extensionElements.get('values').push(MessagePayloadObject);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
MessagePayloadObject.payload = value;
|
MessagePayloadObject.payload = value;
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</bpmn:correlationPropertyRetrievalExpression>
|
</bpmn:correlationPropertyRetrievalExpression>
|
||||||
</bpmn:correlationProperty>
|
</bpmn:correlationProperty>
|
||||||
|
|
||||||
<bpmn:correlationProperty id="singer" name="Singer's Name">
|
<bpmn:correlationProperty id="singer_name" name="Singer's Name">
|
||||||
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter_response">
|
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter_response">
|
||||||
<bpmn:formalExpression>to.name</bpmn:formalExpression>
|
<bpmn:formalExpression>to.name</bpmn:formalExpression>
|
||||||
</bpmn:correlationPropertyRetrievalExpression>
|
</bpmn:correlationPropertyRetrievalExpression>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user