weixin_39729784
2021-01-11 05:35 阅读 19

Handle bpmn:DataInputAssociation and bpmn:DataOutputAssociation according to BPMN 2.0 specification

bpmn:DataInputAssociation

  • create bpmn:InputOutputSpecification if not found
  • add bpmn:DataInput element and reference as targetRef of bpmn:DataInputAssociation
  • add bpmn:InputSet and add reference to bpmn:DataInput
  • there will only ever be one bpmn:InputSet
  • always clean up bpmn:InputOutputSpecification and remove if necessary

Example:

xml
<task id="myTask">
  <incoming>incoming</incoming>
  <iospecification id="myIoSpecification">
    <datainput id="myDataInput"></datainput>
    <inputset id="myInputSet">
      <datainputrefs>myDataInput</datainputrefs>
    </inputset>
  </iospecification>
  <datainputassociation id="myDataInputAssociation">
    <sourceref>someSourceRef</sourceref>
    <targetref>myDataInput</targetref>
  </datainputassociation>
</task>

bpmn:DataOutputAssociation

  • create bpmn:InputOutputSpecification if not found
  • add bpmn:DataOutput element and reference as sourceRef of bpmn:DataOutputAssociation
  • add bpmn:OutputSet and add reference to bpmn:DataOutput
  • there will only ever be one bpmn:OutputSet
  • always clean up bpmn:InputOutputSpecification and remove if necessary

Example:

xml
<task id="myTask">
  <outgoing>outgoing</outgoing>
  <iospecification id="myIoSpecification">
    <dataoutput id="myDataOutput"></dataoutput>
    <outputset id="myOutputSet">
      <dataoutputrefs>myDataOutput</dataoutputrefs>
    </outputset>
  </iospecification>
  <dataoutputassociation id="myDataOutputAssociation">
    <sourceref>myDataOutput</sourceref>
    <targetref>someTargetRef</targetref>
  </dataoutputassociation>
</task>

Related to https://github.com/camunda/camunda-modeler/issues/984

该提问来源于开源项目:bpmn-io/bpmn-js

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

8条回答 默认 最新

  • weixin_39539807 weixin_39539807 2021-01-11 05:35

    This feature is really necessary. More or less, when do you expect the changes to be merged into main?

    点赞 评论 复制链接分享
  • weixin_39540020 weixin_39540020 2021-01-11 05:35

    This feature is really necessary.

    Please provide us with a little bit more context. Why is this feature really necessary?

    点赞 评论 复制链接分享
  • weixin_39539807 weixin_39539807 2021-01-11 05:35

    Hi Nikku. I'm sorry, I may not have been very clear. I meant the functionality illustrated by Philipp at the beginning of PR, that is the use, according to the BPMN 2.0 standard, of the tag "DataInputAssociation" and "DataOutputAssociation". Since the PR has not yet been merged into the master, I wondered if there was a closing date for this PR. If I understand your question correctly. Bye.

    Please provide us with a little bit more context. Why is this feature really necessary?

    点赞 评论 复制链接分享
  • weixin_39540020 weixin_39540020 2021-01-11 05:35

    I'm asking why the feature is important for you and not what. An answer to that question helps us to better evaluate the demand.

    点赞 评论 复制链接分享
  • weixin_39539807 weixin_39539807 2021-01-11 05:35

    I'm asking why the feature is important for you and not what. An answer to that question helps us to better evaluate the demand.

    Hi Nikku.

    If I understand the purpose of Philipp's PR, this feature is important because it would allow you to manage the associations between data and tasks through the ioSpecification tag and its dataInput / dataOutput as it should be. For a better explanation, let's consider the following trivial diagram:

    diagram

    Currently the editor produces, for task 1, the following XML:

    <bpmn:task id="Task_1" name="Task"> <bpmn:incoming>SequenceFlow_0iu53jb</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mz7m8s</bpmn:outgoing> <bpmn:property id="Property_05b30xr" name="__targetRef_placeholder" /> <bpmn:dataInputAssociation id="DataInputAssociation_0tgejuf"> <bpmn:sourceRef>DataObjectReference_1</bpmn:sourceRef> <bpmn:targetRef>Property_05b30xr</bpmn:targetRef> </bpmn:dataInputAssociation> </bpmn:task>

    As you can see, the editor created a property tag instead of using a dataInput tag within a ioSpecification tag. In my opinion, it would be better to use a dataInput because, logically, the data converge as input data within the task to undergo some processing.

    If I understood correctly, and I'm not wrong, it seems to me that the PR submitted by Philippe should solve this case too.

    Bye.

    点赞 评论 复制链接分享
  • weixin_39729784 weixin_39729784 2021-01-11 05:35

    That still doesn't answer the question. Obviously this PR would ensure compatibility with the BPMN 2.0 specification. The question is: What is your use case that requires this compatibility? What are you trying to do?

    点赞 评论 复制链接分享
  • weixin_39539807 weixin_39539807 2021-01-11 05:35

    Hi, Philipp. From the fact that you still have not understood what I meant by my last post, I am convinced that I have not understood the aims of this PR. Please ignore my previous posts. When I have more time, in the future, I will create a special Issue and there I will explain well what, in my opinion, it would be useful to implement to adhere more to the BPMN 2.0 standard with regard to tasks and the association with data objects.

    That still doesn't answer the question. Obviously this PR would ensure compatibility with the BPMN 2.0 specification. The question is: What is your use case that requires this compatibility? What are you trying to do?

    点赞 评论 复制链接分享
  • weixin_39540020 weixin_39540020 2021-01-11 05:35

    When I have more time, in the future, I will create a special Issue and there I will explain well what, in my opinion, it would be useful to implement to adhere more to the BPMN 2.0 standard with regard to tasks and the association with data objects.

    We second your opinion and may some day maybe improve handling of IO mappings in the future.

    点赞 评论 复制链接分享

相关推荐