Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Handle bpmn:DataInputAssociation and bpmn:DataOutputAssociation according to BPMN 2.0 specification #910

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

philippfromme
Copy link
Contributor

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:

<bpmn:task id="myTask">
  <bpmn:incoming>incoming</bpmn:incoming>
  <bpmn:ioSpecification id="myIoSpecification">
    <bpmn:dataInput id="myDataInput" />
    <bpmn:inputSet id="myInputSet">
      <bpmn:dataInputRefs>myDataInput</bpmn:dataInputRefs>
    </bpmn:inputSet>
  </bpmn:ioSpecification>
  <bpmn:dataInputAssociation id="myDataInputAssociation">
    <bpmn:sourceRef>someSourceRef</bpmn:sourceRef>
    <bpmn:targetRef>myDataInput</bpmn:targetRef>
  </bpmn:dataInputAssociation>
</bpmn: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:

<bpmn:task id="myTask">
  <bpmn:outgoing>outgoing</bpmn:outgoing>
  <bpmn:ioSpecification id="myIoSpecification">
    <bpmn:dataOutput id="myDataOutput" />
    <bpmn:outputSet id="myOutputSet">
      <bpmn:dataOutputRefs>myDataOutput</bpmn:dataOutputRefs>
    </bpmn:outputSet>
  </bpmn:ioSpecification>
  <bpmn:dataOutputAssociation id="myDataOutputAssociation">
    <bpmn:sourceRef>myDataOutput</bpmn:sourceRef>
    <bpmn:targetRef>someTargetRef</bpmn:targetRef>
  </bpmn:dataOutputAssociation>
</bpmn:task>

Related to camunda/camunda-modeler#984

@ghost ghost assigned philippfromme Nov 23, 2018
@ghost ghost added the needs review Review pending label Nov 23, 2018
Copy link
Member

@nikku nikku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we able to consume <= v3.0.0 style modeled diagrams and migrate them step by step to the new IO representation?

@ElCondor1969
Copy link
Contributor

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

@nikku
Copy link
Member

nikku commented Dec 19, 2018

This feature is really necessary.

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

@ElCondor1969
Copy link
Contributor

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?

@nikku
Copy link
Member

nikku commented Dec 19, 2018

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.

@ElCondor1969
Copy link
Contributor

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.

@philippfromme
Copy link
Contributor Author

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?

@ElCondor1969
Copy link
Contributor

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?

@nikku
Copy link
Member

nikku commented Jan 4, 2019

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.

@nikku nikku added ready Ready to be worked on backlog Queued in backlog and removed needs review Review pending ready Ready to be worked on labels Feb 12, 2019
@nikku nikku changed the title Handle bpmn:DataInputAssociation and bpmn:DataOutputAssociation according to BPMN 2.0 specification WIP: Handle bpmn:DataInputAssociation and bpmn:DataOutputAssociation according to BPMN 2.0 specification Oct 18, 2022
@nikku nikku marked this pull request as draft December 12, 2022 22:59
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed backlog Queued in backlog labels Dec 12, 2022
@nikku nikku added the backlog Queued in backlog label Dec 12, 2022 — with bpmn-io-tasks
@nikku nikku removed the in progress Currently worked on label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog
Development

Successfully merging this pull request may close these issues.

None yet

3 participants